Stockeo Help
  • What is Stockeo?
  • Update inventory from a Google Sheet
  • Update inventory from an XML feed
  • Create products from a JSON feed
  • Data Mapping
    • Format
      • CSV
      • JSON
      • XML
    • SKU
    • Price calculation
    • Quantity settings
    • Quantity format
    • Image URL settings
    • Variants
    • Metafields
    • Title
    • Description
    • Translations
    • Continue selling when out of stock
    • Charge tax
  • Filters
  • TROUBLESHOOTING
    • Invalid Closing Quote
    • Invalid Record Length
Powered by GitBook
On this page
  • Update metafield single value
  • Update metafield lists
  • Supported metafields types
  1. Data Mapping

Metafields

PreviousVariantsNextTitle

Last updated 4 months ago

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 in the Custom Data section of your store settings first.

Update metafield single value

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:

<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:

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:

A special use case for metafields is to employ one of them as the product/variant identifier instead of the SKU field.

Update metafield lists

Stockeo enables you to update metafield lists that allow storing multiple values in a single metafield.

Stockeo can only overwrite a current metafield list. There is no mode to add new items and keep the old ones.

To pass a list of values to Shopify correctly, ensure commas separate values:

If a different separator is used, a semicolon, for instance, add a Liquid formula to convert it to commas:

{{ Ingredients | replace: ";","," }}

You can also use Liquid to pass values from multiple columns/fields:

To assign a fixed metafield list of values for each variant, use another Liquid formula:

Supported metafields types

Stockeo enables you to update values for the following types of metafields:

Single values

  • Boolean

  • Color

  • Data

  • Date and Time

  • Multi-line text

  • Single-line text

  • Decimal

  • Integer

  • URL

Lists of values

  • Single-line texts

  • Decimals

  • Integers

  • URLs

Check out how to .

add a metafield definition
use a variant metafield to recognize a product from the feed
Add metafield in the Stockeo automation
Data Mapping section of Stockeo automation with added metafields
Get the value to be stored in the metafield from the param node
Commas separated values to be passed as a metafield list
Replace semicolons with commas using Liquid
Values to be passed included in separate columns
Use Liquid to pass values from different columns
Use Liquid to pass a fixed values list
Add Metafield in the Stockeo automation animated
Data Mapping section of Stockeo automation with added metafields annotated
How to get the value to be stored in the metafield from the param node