< Back
Print

Shopify Metafield Field Plugin

This field plugin is used for the Shopify Transmitter. We also provide a configured Template.


Configuration in Shopify

The transmitter will fill existing metafields with data. Therefore the Metafields need to be created in Shopify.
 
From the configuration you need the following values for the transmitter:

  1. Key (by default this is the name)
  2. Namespace (in most cases this is “custom”)
  3. The metafield type
  4. The value type (single value or list of values)
  5. (If the metafield type is ‘Metaobject’: the handle from the Metaobject definition)

 
Example: Metafield with type Metaobject
Shopify Metafield configuration example
 
The type of the Metaobject definition
Metaobject definition example
 
In this example:

  • Key: my_metafield
  • Namespace: custom
  • Type: Metaobject
  • Value Type: One entry
  • Type of Metaobject definition: videos

 

Configuration of the base datamap

In the datamap you always configure the metafield with the following key:

 

metafields|your-name

 

If the metafield is language dependent, you need to set |{StoreView} behind the name.
 
Example
Base datamap example for shopify metafields
 

Configuration of the field plugin

Select the entries from the Shopify metafield configuration in the shopify metafield format plugin.
 
In the example from above the plugin needs to be configured like shown in the image below.
 
Shopify Metafield field plugin configuration
 
Special cases

Metaobject-Type Value
Dimensions, Volume, Weight Value must be an Object with numeric value and string unit.
(E.g. {“value”: 4711, “unit”:”mm”})
Date and time Value must be in this format:
YYYY-MM-DDTHH:MM:SS
Date Value must be in this format:
YYYY-MM-DD
True or false Value must be ‘true’ or ‘false’
(Also works with ‘1’ or ‘0’)
Color Value must be hex color code with 6 digits
(E.g. #FFF won’t work, but #FFFFFF will work)
Rating A number between the minimum and maximum rating
URL Must include one of the following schemes:
“http”, “https”, “mailto”, “sms”, “tel”
Money Value must be an Object with numeric amount and currency (Must be shop currency).
(E.g. {“amount”: 4711, “currency_code”:”EUR”})
Link Value must be an Object with string text and string url.
(E.g. {“text”: “Hello”, “url”:”https://example.com”})
JSON Valid JSON string

 

 

Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents