Articles in this section

Map metafields at product level using the saved search

Shopify metafields allow you to store additional information for products, collections, orders, blogs, pages, and your shop that cannot be managed using Shopify’s native fields. For example, if you want to maintain extra description fields for your catalog, such as detailed descriptions or featured descriptions, you can easily create custom fields in NetSuite. However, in Shopify, this is achieved using the metafields functionality. A Shopify metafield includes a namespace, a key, a value, and an optional description. For additional info, refer to the Shopify help article.

Tip

The integration app enables you to map NetSuite standard/custom fields to Shopify metafields (if they already exist) and/or create the metafields in Shopify directly via the integration app and then map and update them. 

Mapping NetSuite Standard/Custom fields to Shopify metafields (recommended approach)

Start by selecting the standard or custom field(s) in NetSuite that you want to map to the corresponding metafield in Shopify. In the example below, we have highlighted two fields (Long Text and Free Form) of an item that will be mapped to their respective Shopify metafields.

1st_image_.png

Next, navigate to the saved search in NetSuite used for exporting items from NetSuite to Shopify. If you are using the saved search provided by the bundle, its name should begin with "Celigo Shopify Item Export [your store name]." Open the saved search in edit mode and go to the Results tab.

2nd_image.png

Pre-requisite: Update the saved search with the metafields you want to sync to Shopify.

  1. In the Results tab, click Edit > Edit this Search.

  2. From the Field dropdown list, select Free form (Custom). 

  3. In the Custom Label textbox, copy and paste the format “<namespace>:<key>:<custom Label> (Meta)” of the Shopify field where you want to sync. For example, if the Shopify product metafield name is namespace1, follow these steps to copy the format:

    1. Click the namespace1 field name and you will see an underlined link as shown in the screenshot below.

    2. Click the hyperlink, which will redirect you to the namespace1 field details page.

      3rd_image.png
    3. Copy the text in the field Namespace and key.

      4th_image.png
  4. Now, update the format in the NetSuite custom label to: namespace1:key1:nameofyourchoice (Meta)

    Important

    In the formatted text, the period (.) has been replaced with a colon (:), and a custom label  has been added before the keyword (Meta) at the end.

  5. In NetSuite Saved Search, navigate to the results column. From the Field dropdown list, select Long Text (Custom).

  6. In the Custom Label textbox, copy and paste the format “<namespace>:<key>:<custom Label> (Meta)” of the Shopify field where you want to sync and apply the same formatting changes as you did for the Free Form (Custom) field.

    Important

    The Saved Search label name must be suffixed with "(Meta)" for the integration app to recognize it as a product metafield (see image below). For example, if you need to map the "namespace1" field, the Custom Label should be:namespace1:key1:nameofyourchoice (Meta).

    This Custom Label format for product metafields is similar to that of variant metafields, with the only difference being the suffix:

    • For product metafields, use (Meta)

    • For variant metafields, use (Variant Meta)

    You can add as many fields as needed, and then save the changes to the Saved Search.

    Field

    Custom Label

    Custom Field Values

    Long Text (Custom)

    custom:testtemplate:Valuetest (Meta)

    Metafield Test iPad Simple Map

    Free form (Custom)

    namespace1:key1:Freeformvalue (Meta)

    Demo Custom Mapping Simple Map

    5th_image.png
Map Shopify metafields to NetSuite
  1. Now, go to integrator.io and navigate to the Shopify - NetSuite integration app.

  2. In the Flows > Product, click NetSuite Item to Shopify Product Add/Update flow.

  3. Click Post products to Shopify > Field Mappings.

    6th_image.png
  4. You will see a few standard fields, such as Title, ID, Product Type, etc. Now, click the + icon next to the Title to add a new row under the Product object.

  5. Select the data type as [Object] - array of object.

  6. From the source object dropdown list, select the metafields object. In this case, it is meta [*].

  7. In the destination object field, enter savedSearchProductMetafields.

    Note

    The field names are case-sensitive. Ensure that you enter the names with the correct capitalization.

    7th_image.png
  8. Now, click Settings or Gear icon across the destination object. In this example, the savedSearchProductMetafields object. 

    8th_image.png
  9. In the Copy an object array from the source as-is? setting, select Yes. This setting will sync all your metafields from NetSuite to Shopify.

  10. Click Save & close.

Once the mapping is complete, run the flow and you will see the updated metafield data in Shopify.

Viewing metafields in Shopify 

Go to Shopify > Products to verify that the metafield values have been successfully synced to Shopify.

10th_image.png
Important: The "Specify your Shopify metafield components for products and variants" setting is recommended if you are not using handlebars to sync metafields. If you are using handlebars, you must rely on the recommended mapping approach to sync metafields properly.
  • At the setting level: Handlebars are not supported.
  • At the mapping level:
    • For simple items, variant-level metafields will not sync.
    • In such cases, it is recommended to use the "Specify metafield components" setting instead.