How to create and use Shopify Metafields in Syncspider

Created by Maja Bradonjic, Modified on Wed, 10 Aug, 2022 at 8:47 AM by Igor Galic

 

 

1. What are Metafields?

 

Metafields enable you to customize the functionality and appearance of your Shopify store.

 

By letting you save special kind of information that isn't usually captured in the Shopify admin. You can use metafields for internal tracking, or to display specialized information on your online store in a variety of ways.

 

 

IMPORTANT NOTE: You can add metafields to your products, collections, customers, orders, and other parts of your store, either directly from your Shopify admin or by using an app from the Shopify App Store.

 

 

1.1 Setting up metafields

 

To create new metafields the following steps need to be taken : 

 

  1. Adding metafield definitions to add fields for your specialized information to pages in your Shopify admin

     

  2. Adding metafield values to parts of your store, such as products or variants

     

  3. Optional: Connecting metafields to your theme to display specialized information on your online store

 

 

Metafield definitions act as templates that specify what part of your store a metafield applies to and what values the metafield can have.

 

You need to create a custom definition in the following circumstances:

 

IMPORTANT NOTE: Before you can add metafield values to specific products, orders, or other parts of your store, you need to add the metafield definition for that information. Adding metafield definitions ensures that the same validation rules apply to every value that you enter for a specific metafield.

 

 

 

1.3 Adding metafield values 

 

After you add a metafield definition, you add values for your metafield on the corresponding pages in your Shopify admin. For example, if you create a metafield definition for product expiration date, then you enter the specific values for expiration date on your product pages in your Shopify admin.

 

IMPORTANT NOTE: Each metafield displays the name that you selected when you created your metafield definition. Metafields can only accept the supported values for their content type.

 

 

 

After you add metafield definitions and assign metafield values to parts of your store, you can connect metafields to your theme to display your specialized information on your online store in a variety of ways.

 

For example, a watch seller might want to display a battery time for the watch on their product pages, while a grocery store might want to display a product expiration date for canned goods.

 

IMPORTANT NOTE: If you have an Online Store 2.0 theme, then you can connect most metafields to your theme by using the theme editor.

 

 

 

 

2. How to create and use meta fields in Shopify?

 

First you will need to navigate to the Metafields Section.

 

Navigate to your dashboard and click on "Settings" in the bottom right corner.

 

Click on "Metafields".

 

Now navigate to the "Product" Section as we will use the products as an example.

 

Click on "Add Definition".  

 

2.1 Here we have options for our metafield: 

 

Name - Name of the metafield ( in this case we will be creating Brand)

Namespace and key - This system uses this to identify the definition of the Metafield

Description - Description of the metafield ( Optional)

Expose this metafield to storefront API Request - If you want to allow custom storefronts to display your metafields, then you can give access to the Storefront API when you create or edit a metafield definition. You might want to give access to the Storefront API if you sell your Shopify products through a non-Shopify website, video game, or other custom shopping experience.

Content Type - In this case we use text ( single line) as we don't need a multi line for this specific metafield. 

 

Content Type possibilities (Color, Date and time, File , JSON, Measurement, Number, Rating, Reference, Text, True or false and URL)

 

2.2 After we have set up our options we can add some extra rules for the metafield :

 

Minimum length - Minimum length of the text characters ( In this case 2 because rarely a brand has less than 2 characters)

Maximum length - Maximum length of the text characters ( In this case 20 because rarely a brand has more than 20 characters)

 

Now that  we have defined everything we need click on "Save" on the top right corner.

 

 

With this completed, we can instantly add it to our Products by simply going to any product that we use. And scroll down to the bottom of the specific Product page and put the value for the specific product. 

 

In this case we are using a Controller as a product with the brand name "AimController" so we will type out the value in the box field shown by the arrow.

 

 

3.How to use meta fields in SyncSpider?

 

To use Metafields in Shopify, You will have to go to Target configuration in your Syncspider task, where you will check the checkbox named "Check this if you want to create meta fields".

 

At that section add a new metafield named "Brand" as we are adding the Brand metafield that we previously created.

 

If you want to create metafields for variations check this checkbox and add a metafield to your preference.

 

 

3.1 Now we move on to mapping

 

As we can see the under "Metafields" our "Brand" Metafield appeared because we set it up in one of our products.

 

We can see that on the right side of mapping it appeared too because we added it in the "Target Section" of the task.

 

Simply connect them together after you have mapped everything in your task according to your preference. 

 

To check if it is mapped correctly click on "Preview Values" at the top right corner.

 

IMPORANT NOTE: In the mapping section metafield that we created will only appear in Left side of mapping ( source) if we have set it to any of our Shopify products.

 

With this we will finish our article.

 

_______________________________________________________________

 

If you got any questions or need assistance, feel free to contact our support team via the chat widget on our site and within the SyncSpider app.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article