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 as 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 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 .

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


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





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.

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 cell is blank. If the feed have a blank cell for a product, then the default value will be added the metafield value instead. The default value can't be left blank.