Marketplaces / Big Commerce Technical Scope / Big Commerce Product Management / Big Commerce Channel Assignment

Big Commerce Channel Assignment

Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)

Date Version Name Applied changes
12/042023 1.0 Bogomil Pavlov First Publish

Some merchants want to sell their products in different places and manage all of this on BigCommerce. They may want to maintain multiple website-based eCommerce storefronts, or sell products from their store's catalog on other channels, such as Amazon, eBay, in-person POS (point-of-sale) systems, and so on.

This is all managed through the so called multi-store section in BC. This means that a merchant using BC can split off each of these channels in separate “channel” (similar to how we split each channel in a separate account). Those “channels” do not require any other specific information. It just helps streamline data in BC, which means we will NOT need separate accounts in Hemi for each channel.

What it means though is we will need to provide a bit more data to the products so we can identify on which BC “channel” they should be active.

BC store can be either a single or multi store so we want to have additional option in Account Big Commerce which allows the user to select the channels or by default be single store By setting the type as Multi Store additional required dropdown field should be displayed in the UI holding all of the channels available for this store (enumeration - see GetChannels below) and allow the user to select one or more than one channel. This way when we have multi store we always will have selected channels. Note:Please add the proper description of the field that it is required when Multi Store is selected.

In terms of creating or updating a products additional step will be required to specify the channel ids. Details for all the flows below:

Get Channels

First we should be able to get all channel ids from BigCommerce and store them in Hemi as an enumeration which can then be used to select the needed channels from Account Big Commerce > Channels or Product Account Big Commerce > Channels. The new fields should be a a drag and drop field with more than one possible selection. So we should be able to select if needed more than one channel. (The same logic like we have for the eBay Exclusions). We are always aiming to download all channels for every BC store we have in Hemi. If the channel already exist in Hemi we just skip it, If there is a new channel we add it as an enumeration and if we have in Hemi a channel which no longer exist in BC we simply mark it as deleted from the enumerations. By this we will have a non existing channel id selected and we need to make sure we are validating this and we are pushing only the existing channel ids.

Please note we can have cases where we have more than one active BigCommerce account per instance and we need to make sure the enumerations are displayed for the correct account.

API Call: GET https://api.bigcommerce.com**/stores/{store_hash}/v3/channels** Doc: https://developer.bigcommerce.com/docs/rest-management/channels#get-all-channels

Sample Request: GET https://api.bigcommerce.com**/stores/12afh3d/v3/channels**

Sample Response: Status 200 OK

{
    "data": [
        {
            "id": 1,
            "name": "AutoFixa Limited - Store 1",
            "platform": "bigcommerce",
            "type": "storefront",
            "date_created": "2023-02-01T16:21:03Z",
            "date_modified": "2023-05-25T11:50:37Z",
            "external_id": "",
            "icon_url": "https://s3.amazonaws.com/bc-channel-platform/channel-icons/bigcommerce.svg",
            "is_listable_from_ui": true,
            "is_enabled": true,
            "is_visible": true,
            "status": "active"
        }
    ],
    "meta": {
        "pagination": {
            "total": 1,
            "count": 1,
            "per_page": 250,
            "current_page": 1,
            "total_pages": 1,
            "links": {
                "current": "?page=1&limit=250"
            }
        }
    }
}

Response Mapping: From the response we want to store the id and the name in Hemi as enumerations. In the UI we want to display the name and when updating the product to use the id

Channel Assignment

Once we have the channels stored in Hemi we can select the in which channels the suser want to make the products active. As an overlayer we are introducing additional field Product Account Big Commerce > Channels which will be picked with priority against Account Big Commerce > Channels

The Channel Assignment should pick all products with status Product Account > Product Status = Product Created.

API Call: PUT https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/channel-assignments Doc: https://developer.bigcommerce.com/docs/rest-catalog/products/channel-assignments#create-products-channel-assignments

Sample Request: PUT https://api.bigcommerce.com/stores/i3kt5xjesl/v3/catalog/products/category-assignments Body:

[
  {
    "product_id": 14280,
    "channel_id": 1
  },  {
    "product_id": 14280,
    "channel_id": 2
  },  
  {
    "product_id": 14281,
    "channel_id": 1
  }
]

Please note if we have selected more than one Channel Id we add the product ID for each channel in the payload.

Mapping:

BC Field Hemi Field Comment
product_id Product Account > Channel Item ID
channel_id Account Big Commerce > Channels

OR Product Account Big Commerce > Channels | Product Account Big Commerce > Channels is with priority.

If both fields are empty we do not include it in the payload |

There are different flows for product creation and product update when we have BC multi store logic. Please refer to Big Commerce Create Product and Big Commerce Update Product

Sample Response: Status 204 OK

Sample Error Response: Have not managed to make a call and receive an error.

Please note for the moment we are not able to unassign channels from a product. The product will have to be deleted, created again and then assign the correct channels.

Is this article helpful?
0 0 0