Articles on: Shopify

Custom Data (Metafield)

Available on: ✔️ Add ✔️ Update ✔️ Export
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.
If the feed file doesn't have any column as metafield and wants to apply the metafield as the default value for all the products. You can use fixed value to set it.



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, if it is blank, it will not create a metafield.



For example: To prevent the creation of a metafield when the value is blank in the feed, you can enable this option.


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 a comma. Search will match any word to find any part of the word, including *



For example: (Find: *man) will include - woman, manicure etc from the feed file. The Find field also supports regular expressions

Another example: 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.



NameDescriptionExample value
Single line textA single-line text field.This item contains dairy products.
Multi-line textA multi-line text field.Ingredients: Flour, Water, Milk, Eggs
IntegerA whole number in the range of +/-9,007,199,254,740,991.10
DecimalA number with decimal places in the range of +/-9999999999999.999999999.10.4
DateA date in ISO 8601 format without a presumed timezone.%Y-%m-%
Date and timeA date and time in ISO 8601 format without a presumed timezone.2021-01-01T12:30:00
URLA URL with one of the allowed schemes: https, http, mailto, sms, tel.https://www.shopify.com
JSON stringA JSON-formatted string. N**ote:** The json_string type is deprecated but still exists because it behaves differently than the new json type in Liquid.[{ "k": "v1" }, { "k": "v2" }]
BooleanA true or false value.TRUE
ColorThe hexadecimal code for a color.#fff123
WeightA value and a unit of weight. Valid unit values: oz, lb, g, kg{ "unit": "kg", "value": 2.5 }
VolumeA 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 }
DimensionA value and a unit of length. Valid unit values: in, ft, yd, mm, cm, m{ "unit": "cm", "value": 25.0 }
RatingA rating measured on a specified scale-


Please note that we currently do not support the following content types: Rich Text and anything that ends with 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:
NamespaceKeyValue
EstimatedTimeArrivalETA1 days
EstimatedTimeArrivalETA2 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.

To remove the metafield of blank value If you need assistance to remove the metafield of blank values, you can reach out to us at support@stock-sync.com to enable it.

Updated on: 22/10/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!