Product Synchronization: To Synchronize Stock Items with Attributes

The following activity will walk you through the processes of creating an attribute for a stock item and synchronizing this item with the BigCommerce store.

Story

Suppose that the SweetLife Fruits & Jams company wants to display the sugar levels of jams it sells in the online store on the product detail pages on the storefront.

Acting as an implementation consultant helping SweetLife to set up the integration of MYOB Advanced with the BigCommerce store, you need to define an attribute for the sugar level and then export these sugar levels to the BigCommerce store.

Configuration Overview

In the U100 dataset, the following tasks have been performed for the purposes of this activity:

  • On the Item Classes (IN201000) form, the JAM item class has been defined.
  • On the Stock Items (IN202500) form, the CHERJAM96 stock item of the JAM item class has been created.

Process Overview

In this activity, you will perform the following:

  1. On the Attributes form, create an attribute for the sugar level of the products.
  2. On the Item Classes form, add the attribute to the JAM item class.
  3. On the Stock Items (IN202500) form, assign a value to the created attribute for a particular stock item.
  4. On the Entities form, map the attribute field with a product field in the BigCommerce store.
  5. On the Prepare Data (BC501000) form, prepare stock item data for synchronization.
  6. On the Process Data (BC501500) form, process the data prepared for synchronization.
  7. In the control panel of the BigCommerce store, review the exported product.

System Preparation

Before performing the instructions of this activity, do the following:

  1. Make sure that the following prerequisites have been met:
  2. Launch the MYOB Advanced website with the U100 dataset preloaded, and sign in with the following credentials:
    • Username: gibbs
    • Password: 123
  3. Sign in to the control panel of the BigCommerce store as the store administrator.

Step 1: Creating an Attribute

To create an attribute that will indicate the sugar level of products, do the following:
  1. On the Attributes (CS205000) form, add a new record.
  2. In the Summary area, specify the following settings:
    • Attribute ID: SUGARLEVEL
    • Description: Sugar Level
    • Control Type: Text
  3. On the form toolbar, click Save.

Step 2: Adding the Attribute to the Needed Item Class

To add the Sugar Level attribute to the JAM item class, do the following:

  1. Open the Item Classes (IN201000) form.
  2. In the Item Class Tree pane, select the JAM item class.
  3. In the upper table on the Attributes tab, click Add Row on the table toolbar.
  4. In the added row, in the Attribute ID column, select SUGARLEVEL.
  5. On the form toolbar, click Save.

Step 3: Assigning a Value to the Added Attribute

To assign a specific value to the created attribute for the CHERJAM96 stock item, do the following:

  1. Open the Stock Items (IN202500) form.
  2. In the Summary area, in the Inventory ID box, select CHERJAM96.
  3. In the Attributes table on the Attributes tab, in the row with the Sugar Level attribute, enter Sugar-free as the Value.
  4. On the form toolbar, click Save.

Step 4: Mapping the Attribute to a Field in the BigCommerce Store

To map the Sugar Level attribute with the BigCommerce field, do the following:

  1. Open the Entities (BC2020PL) form.
  2. In the Store Name box of the Selection area, select SweetStore - BC.
  3. In the Entity column of the table, click the Stock Item link.
  4. On the Entities (BC202000) form, which opens with the SweetStore - BC store and the Stock Item entity selected in the Summary area, on the Export Mapping tab, click Add Row.
  5. In the row you have added, specify the following settings:
    • Active: Selected
    • External Object: Product → Custom Fields
    • External Field: <<Auto_Mapping>>
    • ERP Object: Stock Item → Attributes
    • ERP Field / Value: Sugar Level
  6. On the form toolbar, click Save.

Step 5: Preparing Product Data for Synchronization

To prepare the product data for synchronization, do the following:

  1. Open the Prepare Data (BC501000) form.
  2. In the Summary area of the form, specify the following settings:
    • Store: SweetStore - BC
    • Prepare Mode: Incremental

    This setting controls which data will be loaded. Incremental indicates that the system will load only the data that has been modified since the previous data synchronization.

  3. In the table, select the Selected check box in the rows of the Stock Item and Non-Stock Item entities, and on the form toolbar, click Prepare.
  4. In the Processing dialog box, which opens, review the results of the processing, and click Close to close the dialog box.

    Notice that the Ready to Process column shows the number of synchronization records that have been prepared and are ready to be processed. The Processed Records column shows the number of records that have been processed (that is, records that have been successfully synchronized).

Step 6: Processing the Prepared Product Data

To process the product data that has been prepared for synchronization, do the following:

  1. While you are still viewing the Prepare Data (BC501000) form, click the link in the Ready to Process column in the row of the Stock Item entity.

    The Process Data (BC501500) form opens with the SweetStore - BC store and the Stock Item entity selected in the Summary area. The table displays all synchronization records of the Stock Item entity that the system prepared in the previous step.

  2. In the row of the CHERJAM96, Cherry jam 96 oz stock item, select the unlabeled check box, and on the form toolbar, click Process.
  3. In the Processing dialog box, which opens, click Close to close the dialog box.

Step 7: Viewing the Exported Products

To view the exported product data in the BigCommerce store, do the following:

  1. Open the Sync History (BC301000) form.
  2. In the Summary area of the form, specify the following settings:
    • Store: SweetStore - BC
    • Entity: Stock Item
  3. In the row of the CHERJAM96, Cherry jam 96 oz item, click the link in the External ID column.
    Attention: If you are not signed in to the control panel of the BigCommerce store in the same browser, you will need to enter your sign-in credentials.
  4. On the View Products page, which opens for the Cherry jam 96 oz product in the BigCommerce control panel, review the details of the exported item.

    Notice that in the Custom Fields section, the Sugar Level custom field has been created and set to Sugar-free.

  5. In the left pane, click View Store (above the Home menu item) to open the storefront.
  6. On the storefront, in the list of categories, click Jams.
  7. On the page that lists products of the Jams category, click the link of the Cherry jam 96 oz product.

    On the page for the Cherry jam 96 oz product, notice that the name of the custom field (Sugar Level) and the assigned value (Sugar-free) are displayed, as shown in the following screenshot.

Figure 1. The custom attribute shown on the storefront