Stockeo Help
Ask or search…
K

Metafields

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.
Add Metafield in the Stockeo automation animated
Add metafield in the Stockeo automation
For example, if you want to store all of the below properties in your store:
<Item>
<ID>
<![CDATA[ ARC-18126-1-01 ]]>
</ID>
<Width>8.00</Width>
<Size>
<![CDATA[ 18.0 İnch ]]>
</Size>
<Hole>5</Hole>
<PCD>100</PCD>
<Offset>34</Offset>
<Bore>73.1</Bore>
<Stok>15</Stok>
</Item>
Use the following settings in your Data Mapping section:
Data Mapping section of Stockeo automation with added metafields annotated
Data Mapping section of Stockeo automation with added metafields
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.
<item>
<param>
<name>Brand</name>
<value>Samsung</value>
</param>
<param>
<name>Model</name>
<value>UE55TU8500UXXU</value>
</param>
<param>
<name>Screen Size</name>
<value>55 inches</value>
</param>
<param>
<name>Resolution</name>
<value>4K Ultra HD</value>
</param>
<param>
<name>Smart TV</name>
<value>Yes</value>
</param>
</item>
To get them you need to use the Liquid formula in the Mapping field with the where and map filters:
{{ param | where: "name", "Brand" | map: "value" }}
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:
How to get the value to be stored in the metafield from the param node
Get the value to be stored in the metafield from the param node
A special use case for metafields is to employ one of them as the product/variant identifier instead of the SKU field.