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.

Notes

  • Celigo supports all Shopify metafields except list types and metaobjects.

  • Ensure that all metafields are accurately defined in the saved search and mapping or setting to prevent the deletion of existing metafields in Shopify for a product. As stated by Shopify, any list field (e.g., collections, metafields, variants) will be updated such that included entries are created or updated, while existing entries not included will be deleted. For more details, refer to productSet.
    Effective March 17, 2025: this behavior will change, aligning with the default REST flow behavior.

    • Metafields will no longer be deleted, even if they are not defined in the mappings or are incorrectly defined.

    • Mapping metafields explicitly will not be necessary, as the default behavior of REST flows ensures that mappings are retained and not deleted.

Mapping Shopify metafields to NetSuite standard/custom fields 

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 a few fields that will be mapped to their respective Shopify metafields.

Map_meta_1.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.

map_2.png

In the Results tab, you will find all the fields configured for transfer to Shopify. In this use case, the fields ValueDemo(Meta) and ValueiPad(Meta) are utilized for metafield mapping.

Map_meta_3.png

Important

The label name must be suffixed with (Meta) to be identified as a meta field by the integration app (see image below). So for example: if you need to map the "ValueiPad" field, the custom label should be "ValueiPad (Meta)". Add as many fields as you like and then save the changes to the Saved Search.

Map_meta_4.png
  1. Now, go to integrator.io and navigate to the Shopify - NetSuite integration app.

  2. In the Flows > Product section, open the "Field Mappings" for the NetSuite Item to Shopify Product Add/Update flow.

  3. Click Post products to Shopify.

  4. Click + 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 the name of your choice. In this case savedSearchProductMetafields.

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

    Map_meta_5.png
  8. Click + within the object, to add a new row to your field mappings. 

    1. Click the field dropdown list.

    2. Type in ValueiPad (Meta)and select.

      Map_meta_6.png
  9. Click + to add another field. 

    1. Click the field dropdown list.

    2. Type in ValueDemo (Meta)and select.

Map_meta_7.png

Note

Namespace and key are colon-separated.

Map_meta_8.png

The following is an example of a namespace and key value in a sample Shopify Product API.

Map_meta_9.png

In the mapping section for destination fields, enter the namespace and key values for the ValueiPad (Meta) and ValueDemo (Meta) fields using the specified format above. Then,  click Save to complete the mapping successfully.

Map_meta_10.png

Once the mapping is done, you can run the flow and you view the updated metafield data in Shopify.

Creating metafields if they do not exist 

If you don't have metafields already created, directly add the 'namespace' and 'key' values in the mapping editor in the specified format (product.metafields[*].namespace:key) and the integration app will create the metafields in Shopify.

Viewing metafields in Shopify 

Go to a Shopify Product and in the URL, append with the term 'metafields.json' and press 'Enter'.

Map_meta_11.png
Map_meta_12.png

Related Topics