Metafields are a flexible data-management feature essential to running a Shopify store. Beyond the standard fields, they let you freely add any information you need to products, collections, blog posts, and more. This article provides a comprehensive explanation of metafields, from the basics of how to use them to practical, real-world examples.
What Are Metafields
Shopify metafields are custom fields that let you store additional information on products, collections, blog posts, and more. Beyond the standard fields (product name, price, description, etc.), they're a feature that lets you freely add any information you need.
For example, you can add information such as:
- Detailed product specs
- Country of origin
- Size guide
- How to use the product
- Warranty period
Metafield Content Types
Metafields come in a variety of content types, and you need to choose the appropriate type depending on the kind of data you're storing. This section explains each metafield content type along with usage examples.
| Category | Content Type | Description | Usage Examples |
|---|---|---|---|
| Date and time | Date and time | ・Supports ISO 8601 date values and UTC time values |
・Campaign start/end time ・Live stream broadcast time ・Available booking time slots |
| Date and time | Date | ・Supports ISO 8601 date values and UTC time values |
・Membership registration date ・Points expiration date ・Product manufacturing date |
| Dimension | Dimension |
・Supports both integers and decimals ・Uses either metric or imperial units of measurement |
・Screen size (TVs, monitors, etc.) ・Space required to install furniture ・Clothing size measurements |
| Dimension | Volume |
・Supports both integers and decimals ・Uses either metric or imperial units of measurement |
・Recipe ingredient amounts ・Cosmetics net content ・Recommended detergent dosage |
| Dimension | Weight |
・Supports both integers and decimals ・Uses either metric or imperial units of measurement |
・Grams of raw materials like sugar or oil ・Shipping weight limits ・Weight capacity ・Portable weight |
| Number | Decimal |
・Supports decimal values ・Accepts values within the range +/-9999999999999.999999999 ・Integers can have up to 13 digits ・Decimals can have up to 9 digits |
・Gemstone carat weight ・Discount rate ・Product rating score ・Energy efficiency value |
| Number | Integer |
・Supports integer values ・Accepts values from -4,611,686,018,427,387,904 to 4,611,686,018,427,387,903 |
・Number of pages in a book ・Stock count ・Minimum order quantity ・Membership points |
| Category | Content Type | Description | Usage Examples |
| Text | Multi-line text |
・Supports plain text with line breaks ・Lets you set a minimum and maximum text length ・Lets you select a regular expression rule |
・Shipping notes ・Return policy ・Product usage precautions ・Care instructions ・Allergy information |
| Text | Rich text |
・Supports text with line breaks ・Also supports inline styles like heading styles, bold, italic, and underline ・However, whether styles are actually reflected depends on the theme's implementation |
・Longer brand stories ・Longer product stories ・Product feature descriptions ・Detailed usage instructions ・Collection stories |
| Text | Single line text |
・Supports plain text with no line breaks ・You can also restrict input to specific presets |
・Short notes ・Announcements ・Product code ・Catchphrase ・Tagline |
| Reference | Company or other organization | ・Supports links to one or more companies | ・Affiliated companies ・Manufacturer ・Business partner ・Partner organization |
| Reference | Customer | ・Supports links to one or more customers | ・Related customers ・Product reviewers ・Brand ambassadors ・VIP members |
| Reference | Product | ・Supports links to one or more products |
・Featured products ・Related products ・Coordinating products ・Replacement parts ・Components of a bundled set |
| Reference | Collection | ・Supports links to one or more collections |
・Featured collections ・Seasonal collections ・Themed collections ・Coordinated sets |
| Reference | Product variant | ・Supports a link to a single product variant |
・Other clothing items in the same color ・Size range ・Material variations ・Seasonal limited version |
| Reference | File |
・Supports uploading a single file ・Supported file types include images (PEG, PNG, WEBP, HEIC, and GIF), video (MOV and MP4), and all file types (any format other than HTML) |
・PDF product manuals ・Product dimension diagrams ・Material certificates ・Assembly guides |
| Reference | Metaobject | ・Supports links to one or more metaobject entries |
・Influencer profile ・Author profile ・Designer profile ・Brand history ・Material information |
| Reference | Page |
・Can link to an existing page ・Supports links to one or more pages |
・Product policy pages ・Detailed support guide pages ・Size guide ・Care guide ・Warranty information |
| Category | Content Type | Description | Usage Examples |
| Other | True or false | ・Creates a checkbox for choosing whether a condition is true or false |
・Whether an item can be engraved ・Whether a page should be indexed by search engines ・Whether gift wrapping is available ・Whether customization is available ・Whether a product is members-only |
| Other | Color | ・Supports RGB values in "#RRGGBB" format |
・Product color ・Seasonal color ・Color variation ・Interior color |
| Other | Rating | ・Supports decimal values based on the notation configured in the definition |
・Product audience score ・Product star rating ・Difficulty level ・Recommended age ・Comfort level |
| Other | ID | ・Supports a unique, single-line text value |
・Storing a resource's ID for another system ・Inventory management number ・Serial number ・Membership ID |
| Other | URL | ・Supports "HTTP," "HTTPS," "mailto:," "sms:," and "tel:" URLs |
・Book review hosted on a specific website ・Link to a product video ・Demonstration video ・Related blog post |
| Other | Money |
・Supports both integers and decimals ・Currency code must match the store's currency |
・Sourcing cost ・Shipping cost to the warehouse ・Detailed product cost breakdown ・Maintenance cost ・Extended warranty fee ・Bundle discount amount |
| Other | Link | ・Supports single-line plain text with no line breaks, and "HTTP," "HTTPS," "mailto:," "sms:," and "tel:" URLs |
・Book review hosted on a specific website ・Link to a product video ・Catalog PDF ・Size chart ・Certification information |
| Advanced | JSON | ・Supports raw JSON data for advanced use cases that need a structured data source |
・Table of raw materials ・Size range table ・Nutrition facts table ・Color variation information ・Spec sheets covering different products in each column |
| Advanced | Mixed reference |
・Supports any type of reference ・However, using it on the storefront requires developer support |
・Creating dynamic landing pages on a Hydrogen storefront |
How to Use Metafields
This section shows how to use a metafield to display a product's country of origin.
* This is the method for displaying a metafield on the Rise theme, so for other themes, step 3 may not work exactly as described.
Step 1. Create the Metafield Definition
Here, to display a product's country of origin, we'll create a metafield named "Country of Origin" on products.

(1) From the Shopify admin, go to Settings > Custom data
(2) In the metafield definitions list, click "Products"

(3) Click "Add definition"

(4) Enter a name (here, we entered "Country of Origin")
(5) Enter a namespace and key (here, we entered "custom.country_of_manufacture")
(6) Enter a description (this is optional)
(7) Choose the appropriate content type (here, since we're only entering a country name, we chose "Text > Single line text")

(8) Under Storefront access, choose "Read"
* Since we want to display the country of origin on the product page, be careful not to get this wrong.
(9) Click "Save"
Step 2. Set a Value in the Product's Metafield
Next, enter the country-of-origin data into the metafield created in Step 1 for each product.

(1) From the Shopify admin, click Products
(2) From the product list, select the product you want to enter country-of-origin information for

(3) In the Metafields section, enter a value into "Country of Origin"
(4) Click "Save"
Step 3. Display the Metafield Value in Your Shopify Theme
Finally, customize your Shopify theme so the country-of-origin information displays on the product page.

(1) From the Shopify admin, go to Online Store > Themes
(2) Click "Customize" on the theme where you want to display the country of origin

(3) From the select box in the top center of the screen, choose the product template
(4) On the left, click the plus icon where you want to add a block
(5) From the block list, select the "Text" block

(6) In the "Text" block settings, click the database icon
(7) Select "Country of Origin"

(8) Edit the text field of the "Text" block as needed
(9) Click "Save"
Metafield Use Cases
Beyond displaying metafield values, such as showing the country of origin on the product page as described above, metafields can be used for a variety of other purposes. This section introduces a few metafield use cases.
Use as a Filter Field in Product Management

Product metafields can be used as a filter field in product management.

To use it as a filter field in product management, you need to enable "Filter in product index" in the metafield definition's options.
The supported product metafield types are as follows (listed as Category > Content Type):
- Text > Single line text
- Reference > Product
- Other > True or false
- Reference > Collection
- Reference > Page
- Reference > Metaobject
Use as a Collection Filter Condition

Product metafields can be used as a filter condition to pull products into a collection.

To use it as a filter condition for a collection, you need to enable "Smart collection" in the metafield definition's options.
The supported product metafield types are as follows (listed as Category > Content Type):
- Text > Single line text
- Other > Rating
- Other > True or false
- Number > Integer
- Number > Decimal
Use as a Filter Field on the Product Listing Page

Product metafields can be used as a filtering option implemented through the Search & Discovery app.
The blog post below covers Search & Discovery in detail. Please use it as a reference.
Hide a Specific Product from Search Results

Shopify has a feature that lets you hide a specific product from search results by creating a given metafield definition on the product and setting its value.
The blog post below covers how to use a metafield to hide a specific product from search results, along with other ways to hide products. Please use it as a reference.
Hide the Table of Contents for Specific Content Only

With "RuffRuff Table of Contents," a Shopify app that automatically displays a table of contents, you can create a specified metafield definition, and only content that has a value set for that metafield will have its table of contents hidden.
For detailed setup instructions, see the help page below.
Use as a Level in Breadcrumb Navigation

By managing a blog post's main tag with a metafield and using it to build breadcrumb navigation, you can flexibly express a hierarchical structure such as "Home page > Blog list > List of posts filtered by main tag > Post detail."
The blog post below covers not just the implementation method but also the benefits and drawbacks of breadcrumb navigation and how to customize its design, making it a great practical example of using metafields.
3 Handy Apps Related to Metafields
Matrixify

Source: Matrixify | Shopify App Store
Matrixify is a Shopify app that lets you export data from anywhere in Shopify — products, blog posts, and more — and use its import feature to bulk-edit that data. It's handy when you want to bulk-edit metafields using a CSV file.
The blog post below covers Matrixify in detail. Please use it as a reference.
Metafields Guru

Source: Metafields Guru | Shopify App Store
Metafields Guru is a Shopify app that streamlines metafield management for your Shopify store.
You can bulk-edit metafields right from the app's admin screen. It also supports bulk edits via CSV or JSON data, and includes handy features such as preview, scheduling, and the ability to undo changes.
RuffRuff Order Limits
RuffRuff Order Limits is a Shopify app that, in a single app, lets you implement all kinds of purchase restrictions — quantity limits, amount limits, bundling restrictions, customer restrictions, payment method restrictions, shipping restrictions, and access restrictions.
Since you can enforce purchase restrictions based on customer metafields, you can, for example, run a members-only sale limited to customers at the Silver tier or above.
[Bonus] How to Bulk-Update Metafields Using GraphQL
Some of you may want to bulk-update metafields without installing a Shopify app. The article below explains how to bulk-update metafields using the GraphQL API. Please use it as a reference.
In Closing
Metafields are a powerful tool that greatly increases the flexibility of your Shopify store. This article walked through the basic setup and usage of metafields using the concrete example of displaying a product's country of origin. We also covered how metafields can be applied in various other situations, such as streamlining product management, customizing search results, and building breadcrumb navigation.
Using metafields effectively not only improves your store's operational efficiency but also lets you offer a clearer, more appealing shopping experience to your customers. Use this article as a reference and give further customization of your Shopify store a try.
Finally, if you'd like to go even deeper into custom data, including metafields, check out our detailed article on metaobjects, 'How to Use Metaobjects.' Using metaobjects lets you build more complex data structures and further extend your store's capabilities.




