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 a few settings as well. So, let's look at the explanation of the setting below:

1. Metafield Namespace and Key

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

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

For example:

From the Shopify admin, you can see that these are the namespace and key.

Namespace: my_fields

Key: ssff

Namespace and Key are separated by .


Shopify UI added the product owners into the key. So it will be products.namespace.key


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

Namespace: washing_machine

Key: clothes

Namespace and Key are separated by .

For namespace min 2 character and key min is 3 charactersThe character limit error will display as below.



Metafields provided TWO components :

  • namespace - A category or container that differentiates 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.


How to update Google Fields using Metafields with Stock Sync?

Please click here to know more.



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

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

{ "unit": "kg", "value": 2.5 }

Volume

A value and a unit of volume. Valid unit values: mlcllm3 (cubic meters), us_fl_ozus_ptus_qtus_galimp_fl_ozimp_ptimp_qtimp_gal.

{ "unit": "ml", "value": 20.0 }

Dimension

A value and a unit of length. Valid unit values: inftydmmcmm

{ "unit": "cm", "value": 25.0 }

Rating

A rating measured on a specified scale


Rich TextWe do not support this at the moment.



To view the accurate format of metafield, please do open your feed file via notes or notepad so that can see it clearly. If open via excel, it could change some of the value formatting such as numbers and dates. 



For example, if you have a metafield like this:

Namespace
Key
Value
EstimatedTimeArrival
ETA
1 day
EstimatedTimeArrival
ETA
2 days


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

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.




Default value if the cell is blank. If the feed has a blank cell for a product, then the default value will be added to the metafield value instead. The default value can't be left blank.