Articles on: Shopify

Custom Data (Metafield)

Available on: ✔️ Add ✔️ Update ✔️ ExportIf 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.Custom data (Metafield) allows multiple columns, but it must be of type multi-line text or list of values. If a metafield column is missing from the feed file and you want to set a default value for all products, you can use a fixed value for configuration.



When it comes to metafields, several options are available such as metafield 1, 2, 3, and so on. Additionally, a few settings are provided. 


Let's take a closer look at the explanation of these settings below.


1. Metafield Namespace and Key


The dropdown will display the list of metafields available in the store. It also displays the Owner and Content Type respectively.


How to update Google Fields using Metafields with Stock Sync? Please click here to know more.


2. Metafield Owner


Based on your Shopify admin settings, this field has been prefilled.



3. Skip update when feed value is blank (value zero is not blank)


When enable this option, it will skip the update when the feed value its blank. By default its enable the option.



For example: To skip the update for products with feed value blank can enable this option.


4. Remove metafield when value is blank in feed


When this option is enabled, a blank value in the feed will automatically be set as empty in the store instead of as a hyphen.


For example: Enable this option to avoid a hyphen in the metafield value when the feed value is blank; see the image below for details.


5. Only update if the current metafield is empty (Only Shopify Update Feed)


The toggle icon will update the empty product metafield in the Shopify store.


For example: To update products with NO metafield without disrupting the products with metafield, enable this option.


6. Find


Find multiple words or phrases separated by commas. The search will match any part of the words include * and supports regular expressions.



For example: (Find: *man) will include - woman, manicure etc from the feed file.


Example of regular expression: To remove all links from the description field, enter <a href=.?>,<a id=.?>,</a>


7. Replace with


Replace the words or phrases that were used with Find above separated by a comma.



For example: To replace the words with the column name, use {{**description**}} and place the column mane inside the bracket {{}}


8. Translation From


Please select the translation from to translate the metafield. There are more than ten languages available. Its only available for **content type single line text. **



9. Translation To


Please select the translation to translate the metafield. There are more than ten languages available. Its only available for content type single line text.



10. Metafield Content Type


Based on your Shopify admin settings, this field has been prefilled.


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.

%Y-%m-%

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 still exists 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


We do not support the following content types: Reference (e.g., Product Reference, Page Reference, File Reference, Variant Reference, Metaobject Reference, etc.).


How do I set the metafield content type true and false value?To know more about this can refer here.


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 days

EstimatedTimeArrival

ETA

2 days


The Namespace is the Estimated Time of Arrival, the Key is ETA, and the Value will be 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 must also be the same in Stock Sync and Shopify; otherwise, it will generate an error. Refer here for more information.


11. Default value if cell is blank



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.

Updated on: 08/04/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!