Metafields
Last updated
Last updated
You can update product and variant metafields based on the supplier feed.
To be able to add a metafield in the Stockeo automation, you need to add a metafield definition in the Custom Data section of your store settings first.
Add a Metafield field in the Data Mapping section. Select the metafield to be updated, and specify which column/node contains a corresponding value in the supplier feed.
For example, if you want to store all of the below properties in your store:
Use the following settings in your Data Mapping section:
It may be the case that the values you want to store in the metafield are nested in the param node, while the property name and its value, are in separate nodes.
To get them you need to use the Liquid formula in the Mapping field with the where and map filters:
In this code, param refers to a node that contains other nodes with the property name and its value. "name" is the name of the node that contains the "Brand" property, while "value" is the information to be stored in the metafield.
For the feed above use the following settings:
A special use case for metafields is to employ one of them as the product/variant identifier instead of the SKU field.
Check out how to use a variant metafield to recognize a product from the feed.