How to use Metafields in Shopify for business owners?

Written by: Rinal Rangani

How to use Metafield in Shopify for business owner?

Shopify's metafields feature is quite popular but can be tricky for regular users. It has various uses in Shopify, like customizing filters and adding extra fields to product pages.

To handle metafields correctly, Shopify suggests working with a knowledgeable web developer. It might be a bit of a hassle.

If you're a small business owner struggling to manage everything or don't have the time to hire someone, this post is for you.

In just about ten minutes, you'll learn how to use Shopify's metafields on your own.

What is the Metafields?

Metafields, which are custom fields, allow you to include additional data that isn't automatically included in the Shopify admin.

You can use them to enhance your online store's appearance and functionality by adding extra components.

These components can display specific information on your website or be used for internal tracking purposes. 

For example, you can create buttons for downloading files, set dates, input numbers, add special features, and more.

To create a metafields for a product, you need to provide the following information:

  1. Namespace - This groups metafields together to avoid conflicts.
  2. Key - This is the name of the metafields.
  3. Value - It's the specific value assigned to each product, visible on the frontend.
  4. Description (optional) - This helps others understand the purpose of the metafields.
How to write metafield in code

The resource is where your metafields will be placed, like products, variants, collections, or orders. 

The metafields is the specific detail you're adding, like a product description or a customer note.

The namespace helps organize metafields to avoid mix-ups, and the metafields name is like its title or label.

Where to use metafields in Shopify store?

Apart from the essential data in the Shopify admin, Metafields allow you to include customizable fields in your Shopify store.

These fields can be used to display information on your online store, keep track of internal details, and add or modify other capabilities.

For more information about the parts of a golf iron, you can visit this store. Buyers can also customize it according to their preferences.

Along with size, it indicates to customers that the item is designed for right-handed users. Metafields are extra fields that provide additional details about the product.

Where to use metafield in Shopify store

Custom Shopify metafields

In shopify, 8 custom Shopify metafields you can use.

1) Shopify metafields for Product

Shopify product metafields allow store owners to include special categories on their product pages. This lets them add extra details that aren't typically shown in the Shopify admin.

Shopify product metafields

2) Shopify metafields for Variant

Variant metafields are extra details you can add to your products on Shopify, like colors, fabric type, or pattern type. They're custom fields that give you more choices for each product.

Variant metafield in shopify
Variant metafield in namesdpace key

3) Shopify metafields for Collection

You can store more information for your product collections on your Shopify website, similar to other metafields. 

Collection metafields allow you to add extra character to your Shopify store. For example, you can use them to provide additional details about a discount promotion. 

To create a sense of urgency, you can add two metafields: one for the sales details and another for the countdown timer.

Shopify metafield for Collection

4) Shopify metafields for Customers

Customer metafields help you store and keep track of your customers' details like their contact info, email, and birthdate. You can also add extra data to make your store stand out and better serve your customers.

For example, if you sell dairy products but want to know which customers prefer soy or almond milk, you can use customer metafields to track that information.

Here's how you can use customer metafields:

  1. Send targeted emails: You can send emails to specific groups of customers, like those who have looked at a certain product recently.
  2. Remind customers to review their orders: You can leave notes for customers on their account pages to remind them to review their orders.
  3. Offer discounts based on customer segments: You can create discounts for different groups of customers based on their loyalty levels.

5) Shopify metafields for Order

To offer more choices at checkout, a seller might want to add extra details about orders. Orders metafields come in handy for this. 

They help prioritize order lists, add notes to products, indicate regular or fast delivery with a yes or no option, and rate orders.

  1. Leave comments on orders.
  2. Organize orders by importance.
  3. Specify "regular" or "express" delivery.
  4. Give orders a rating.

Now, you can use Shopify Order Metafields instead of relying on third-party software for these tasks and more.

6) Shopify metafields for Pages

Shop owners can use page metafields to add extra or unique information to various pages on their website.

These metafields are customizable, letting users customize their pages to match their preferences.

For example, you can display your store's phone number on the "Contact Us" page and provide discounts on specific pages.

7) Shopify metafields for Blogs and Blogs post

Some retailers prefer having blogs on their websites. The blog metafields helps with that. It stores information about the blog categories. 

You can find this in your Shopify admin's Online Store section. Go to "Manage Blogs and Blog Posts" from there.

Blog post metafields allow you to add unique data to specific blog entries. 

You can use this metafields, for example, if you want to display different products on different posts. Access this through your admin ⇒  Blog posts' Online Store option.

8) Shopify metafields for Markets

This special field can help you keep better track of your markets by adding more information. It's part of Liquid, a coding language mainly used for creating Shopify themes, and it's included in the code files.

Shopify has raised its limit for defining metafields from 100 to 200. This update allows retailers to add more detailed information to their products. While this should be enough for most small to medium-sized businesses (SMBs), larger stores with extensive inventories might need additional tools to manage their metafields effectively.

Steps to create Metafields in Shopify

Shopify's metafield feature is quite popular

Step:1 Create Shopify Metafields

  1. To start, let's define what a metafields is.
  2. Here's how you can create a metafields using Shopify:
  3. Go to Settings and choose Metafields.
  4. Pick the Metafields type. For this guide, we'll focus on the "Products" metafields type.
  5. Click on "Add Definition."
Add defination in metafield

Choose the type of content and fill in the name, namespaces, and key. A description is optional.

Once you've filled out the details, click Save to create a single metafields definition.

Step:2 Add value of the metafields for each product

Improve the metafields for each product.

Your task is to make the metafields for each product better. You have two ways to do this:

Add metafields one by one.
Add metafields in bulk.

Adding Metafields One by One:

  1. Go to the Shopify admin and select Products > All products. Choose the products where you want to add more metafields data.
  2. Scroll down the product settings page to find the "Metafields" section.
  3. Improve the Metafields by adding value.
Add value of the metafield for each product

But, if you have thousands of products, doing this one by one could take a lot of time.

Add metafields in bulk.

To get started, open your browser and type in resource_name=Product&edit=metafields.{namespace}:{value_format} {key}.

Once you've entered the URL, you'll be directed to the bulk editor screen. Here, you can add values to multiple products at once, which is much quicker than doing it the usual way.

Add metafields in bulk.

Using this bulk editor saves time because you can update several products simultaneously. However, you still need to input values for each product individually.

Step:3 Display metafields for your Shopify store

Shopify users now have two ways to show metafields on the front-end with the release of Online Store 2.0:

  1. Add code to any theme version.
  2. Use theme editors, available only for OS 2.0 themes.

Here's how to display metafields on product pages:

Displaying product metafields through theme code addition:

  1. Go to Metafields Setting and copy or remember the line we'll use soon.
    Displaying product metafields through theme code addition
  2. Navigate to Themes > Actions > Online Store > Edit Codes.
  3. Locate the product-template in the Section Folders.fluid.
  4. Insert the copied line into the appropriate position in the template file.
    Metafield Add in in the template fileyou can see by quickly looking at the code, we place them immediately following the description and social sharing section in the Debut theme. On the product pages, though, you can add these lines anywhere.

Displaying product metafields using theme editors can be done easily, 

Especially with the Dawn theme, which is specifically designed for OS 2.0 themes.

Here's how you can do it:

  1. Go to Products > Themes > Online Store and choose the Customize option for the theme you're using.
  2. Look for the Product Page Template or Default Products Page and select it.
    Displaying product metafields using theme editors
  3. In the Product Information panel on the left, click on Add a Text block. You can then move this block to wherever you want it on the page by dragging it.
    Add block in customizer for metafield
  4. Within the Text block, click on the icon and then choose Add Metafields.
    Choose Add Metafields in customiser.

Benefits of Shopify metafield

Shopify metafields offer a great way to provide extra product information that you can't find in the regular Shopify settings. 

By using metafields, you can give customers helpful details about your products, which can build trust and influence their purchasing decisions, potentially increasing your sales.

The type of information you include in metafields depends on the products you're selling. For example, if you're selling food items, you might need to list ingredients and allergy information. 

On the other hand, if you're selling motorcycles, technical details like suspension travel are important for buyers.


Shopify's metafields feature offers a great chance for small business owners to improve their online stores without needing advanced technical skills or hiring extra help. 

By grasping the basics of metafields and how they can be used across different parts of a Shopify store, entrepreneurs can customize their websites, show important product details, and streamline internal processes.

At Tameta Tech, we know how vital it is to use such tools to make the most of Shopify stores and stay competitive in e-commerce.

With this understanding, small business owners can fully utilize Shopify's features and boost their online businesses to greater success.

Stay Ahead of the Industry

We’ll keep you updated with latest tips and trends