Start a conversation

Metafields

NOTE: If the metafield you are trying to update is not created in your store, then Stock Sync will create the metafield but Adding snippets into Shopify Theme Liquid needs to be done manually.


For the metafield, there are many metafield that you can apply as metafield 1, 2, 3,... and so on. And there also provided few settings as well. So, let's look the explanation of the setting as below:-

1. Metafield Namespace and Key

Namespace is a category or container that differentiate your metadata from other metafields.

You need to enter the Key for metafield as your choice. You can choose any name that preferable for you.

For example:

You want to put the instruction of washing for the clothes product. So, you can use this metafield as the reference on it.

Namespace: washing_machine

Key: clothes

Namespace and Key are separated by .

*Note:- For namespace min 2 character and key min is 3 characters
It will appeared the character limits error below of the field

Metafields provided TWO components :

  • namespace - A category or container that differentiate your metadata from other metafields
  • key - The name of the metafield

Namespaces will be used to group different metafields, keys will be used to reference our information, and values will contain our unique content.

2. Metafield Owner

There are two options for metafield owners which are product or variant. You can choose whether the metafield owner is the Product or Variant.


3. Metafield Type

For the metafield type, there are 18 options provided as below:


Name
Description
Example value
Single line text
A single-line text field.
This item contains dairy products.
Multi-line text
A multi-line text field.
Ingredients:
Flour
Water
Milk
Eggs
Integer
A whole number in the range of +/-9,007,199,254,740,991.
10
Decimal
A number with decimal places in the range of +/-9999999999999.999999999.
10.4
Date
A date in ISO 8601 format without a presumed timezone.
2021-02-02
Date and time
A date and time in ISO 8601 format without a presumed timezone.
2021-01-01T12:30:00
URL
A URL with one of the allowed schemes: https, http, mailto, sms, tel.
https://www.shopify.com
JSON string
A JSON-formatted string.
Note: The json_string type is deprecated but does still exist because it behaves differently than the new json type in Liquid.
[{ "k": "v1" }, { "k": "v2" }]
Boolean
A true or false value.
true
Color
The hexadecimal code for a color.
#fff123
Weight
A value and a unit of weight. Valid unit values: oz, lb, g, kg
{ "unit": "kg", "value": 2.5 }
Volume
A value and a unit of volume. Valid unit values: ml, cl, l, m3 (cubic meters), us_fl_oz, us_pt, us_qt, us_gal, imp_fl_oz, imp_pt, imp_qt, imp_gal.
{ "unit": "ml", "value": 20.0 }
Dimension
A value and a unit of length. Valid unit values: in, ft, yd, mm, cm, m
{ "unit": "cm", "value": 25.0 }
Rating
A rating measured on a specified scale


For example, if you have a metafield like this:

Namespace
Key
Value
Estimated Time of Arrival
ETA
1 day
Estimated Time of Arrival
ETA
2 days


The Namespace is Estimated Time of Arrival, Key is ETA and the Value will attached to the Product of Variant according to the metafield owner.

*Note:-
For the metafield type, you should choose the correct data type. The data type also must be the same in Stock Sync and Shopify. If not, it will get an error.

Can refer here to know more.


Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Support

  2. Posted
  3. Updated

Comments

  1. silvertree-interiors.myshopify.com

    I have followed these steps but the meta fields haven’t appeared on my product page, is this because it’s needs coding in?