Skip to main content
Blog

Ecommerce growth

What are Shopify metafields?

Shopify metafields store product details Shopify has no field for, like a size chart or an ingredient list. What a metafield is, the metafield types, and how to add one.

Start for free

Shopify metafields are custom fields that store extra information on a product or order, like a size chart, an ingredient list or care instructions. Shopify gives every product a title, price and description. Metafields hold the rest, so one product page template shows the right facts for each product. Landing pages built in Replo can show the same Shopify metafields as your product pages.

SeaVees started in 1964 as a California sneaker brand, and relaunched in Santa Barbara after it was rediscovered in a Tokyo thrift store.

On Shopify, its content team used metafields to put each shoe's size information, style origin and materials guide on its product page. "We built almost all new features using Metafields in some way or another," former ecommerce manager Pete Hardie told Shopify. Shopify reported in 2022 that metafields saved the SeaVees team at least 10 hours of development work a week.

What is a metafield?

A metafield is a labeled slot for one piece of information that Shopify doesn't track by default. In Shopify's words, metafields "extend an existing platform data model, such as products, customers, and orders with your own custom data" (Shopify Help Center).

Shopify's illustration of metafields: a Metafields checklist with Specifications, Nutritional info, Flavor profile and Allergen info ticked, beside a hot sauce product page that shows those four as rows under the size and quantity pickers
In Shopify's own example, each metafield ticked on the left becomes a row on the product page. Source: Shopify.

Every metafield has three parts.

  • Namespace and key are its address, like custom.care_instructions.
  • Type is the kind of value it holds, such as text, a number, a date, a file or a link to another product.
  • Value is the information itself, filled in per product, like "Machine wash cold."

Before you fill in values, you create a metafield definition, which sets the name, type and rules. A product metafield is a metafield on a product. You can also add metafields to variants, collections, customers, orders, pages and blog posts. Shopify allows "up to 256 metafield definitions for each type, such as products or customers" (metafield definitions).

What are metafields used for?

Use metafields for anything a shopper needs to decide that doesn't fit in the title, price or description.

  • Apparel needs a size chart, fit notes, inseam, fabric and care.
  • Beauty and skincare need the full ingredient list, skin type and key actives.
  • Food and supplements need nutrition per serving, allergens and flavor notes.
  • Home and furniture need dimensions, materials, assembly time and warranty.
  • Electronics and parts need compatible models, battery life and specs.

A sewn-in clothing label carries the same facts. It names the fabric, shows the care symbols and gives the size. SeaVees puts the same kinds of facts, size and materials, on each shoe's page.

A black woven label inside a brown wool sweater reading Shetland, 100% wool, dry clean or hand wash with care, with laundry care symbols down one side and a size tab reading 56
This one label holds three separate facts, fabric, care and size, which is how you'd split them into three metafields. Photo: Wikimedia Commons, public domain, by Elkagye

Metafields on customers and orders mostly stay behind the scenes. They hold things like a loyalty tier, a wholesale price list or a gift note for the packing team. Shopify Flow and apps can read and write them too.

Oats Overnight's Apple Pie product page on two phones, with five details labeled: 1 the protein line in the description, 20g protein; 2 the nutrition facts label; 3 the key ingredients list, apple, cinnamon, chia seeds, plant-based protein; 4 protein and sugar as two numbers, 20g and 9g; 5 each flavor card's own numbers, such as 20g protein and 260 calories
Every Oats Overnight flavor page uses the same layout with its own nutrition, ingredients and numbers, the kind of per-product facts metafields hold.

We can't see inside Oats Overnight's admin. Still, every labeled part above is a per-product fact of the kind metafields hold. Add a new flavor, fill in its numbers, and the page lays them out the same way.

What are the Shopify metafield types?

Pick the narrowest type that fits, because the type decides how Shopify checks and shows the value (metafield types).

  • Text comes as single line for short labels ("Made in Portugal"), multi-line for paragraphs, and rich text for formatted copy.
  • Numbers come as integer or decimal, for calories, grams of protein or a capacity.
  • Measurements cover dimension, weight and volume, with units Shopify formats for you.
  • True or false works for flags like "vegan" or "ships in 24 hours". SeaVees used one, hide_product, to keep shoes sold out for months off its collection pages.
  • Dates, files and references hold a launch date, a sizing guide PDF, or a link to another product, collection or metaobject.
  • Money, rating, color, URL and JSON do the jobs their names describe.

Most types also come as a list, which holds several values in one field. Use a list for three scent notes, five compatible models or a set of related products.

The back label of a Sebamed shower lotion bottle, with a printed ingredient list, a 200 ml volume, a 12 M shelf-life symbol and a barcode
A back label holds the same types a metafield does: the ingredients as text, 200 ml as a volume and 12 months as a shelf life. Photo: Wikimedia Commons, CC BY-SA 3.0, by Abdull

Category metafields are a special case. When you set a product's category, Shopify suggests attributes for it, such as color, size or fabric (category metafields). Fill them in, because they can power your store's filters.

Shopify admin's Search & Discovery app, Add filter screen, with two parts outlined: 1 the Source field, here the product option Color, and 2 the values shoppers can tick, such as Orange and Tangerine
A filter's source can be a product option or a metafield, so clean metafield values become filters shoppers can tick. Source: Shopify's Search & Discovery app listing.

How do you add a metafield in Shopify?

Shopify's current steps start on the product itself. This example adds care instructions.

Left: the Shopify admin menu with Products outlined. Right: Shopify Help Center's steps for a metafield definition, with four highlighted: navigate to the resource you want to add a metafield to, such as Products, and open a product; in the Metafields section, click Add definition; in the Name field, enter a name; click Select type and choose the type that best matches your metafield
Open a product, find the Metafields section, and click Add definition. Source: Shopify admin and Shopify Help Center.
  1. Open a product. In Shopify admin, go to Products and open any product.
  2. Add a definition. In the Metafields section, click Add definition and name it "Care instructions". Shopify fills in the namespace and key.
  3. Choose the type. Click Select type and pick Multi-line text. Add validation if you need it, then save.
  4. Fill in the values. Enter each product's care instructions in its Metafields section. Shopify's bulk editor fills in many products at once.
  5. Connect it to the page. Go to Online Store, Themes, Customize. Open your product template, add a text or collapsible row block, and use the dynamic source button to connect it to Care instructions.

You can also see, edit and delete every definition from Settings in Shopify admin. Older themes without dynamic sources need a line of Liquid in the product template. Shopify's Liquid reference documents it, for example {{ product.metafields.custom.care_instructions.value }}.

Which product pages show metafield details well?

These Shopify stores show per-product details in the same spot on every product. We can't see inside their admin, but each block is a per-product fact of the kind metafields hold.

Drift: three notes for every scent

Drift wood car freshener product page listing scents, each with three scent notes such as coconut, bergamot and cedarwood
Each scent in the picker shows its own three notes with an icon, which fits a list field per scent.

Every scent on Drift's wood car freshener page shows three notes with an icon each. Cabana, for example, is coconut, bergamot and cedarwood. That fits a list field on each scent, so a new scent means three notes to fill in, not a new card to design.

Alo: fit, fabric and care in one row

Alo product page with description, fit and fabrication columns listing a 28 inch inseam, 86% polyester and 14% elastane, and care instructions
Fit, fabric and care sit in three columns under the photos, one field each per product.

Under the photos on Alo's Suit Up trouser page, three columns answer the questions that stop an apparel sale. The first covers fit (size down, 28" inseam). The second covers fabric (86% polyester, 14% elastane), and the third covers washing. Each column is one field per product.

What's the difference between metafields, metaobjects and tags?

  • A metafield holds one detail on one product, like its fabric. Use it for facts that differ per product.
  • A metaobject is a reusable entry with its own fields, like a size chart, a designer profile or a recipe. Make it once and point every product that uses it there through a metafield (metaobjects).
  • A tag is a loose label for sorting, like "summer". Tags work for smart collections but can't hold a value or check its format. Move product details out of tags and into metafields.
Shopify's illustration of a metaobject: a Recipe definition with 3 entries feeding a recipe card for Spicy Beef and Peppers Burrito, with prep time, cook time, servings and an ingredient list
One Recipe definition feeds many recipes, each with its own prep time, cook time and ingredients. Source: Shopify.

How do you keep metafields clean?

  • Use Shopify's standard definitions first. Themes and apps already understand ready-made ones, such as product subtitle or care guide.
  • Name each field for the shopper. "Care instructions" reads better in the admin and the theme editor than "ci_txt".
  • Put one fact in each field. You can sort, filter and reuse calories and protein as two numbers, but not as one text blob.
  • Don't change a type in place. Create a new definition, copy the values over, check the page, then delete the old one.
  • Hide empty blocks. If some products have no value, make the block disappear instead of showing a blank heading.

Can landing pages show metafields too?

Yes. A size chart or nutrition panel shouldn't vanish when an ad sends shoppers to a landing page instead of the product page. Replo reads your Shopify products, collections, metafields and discounts. A landing page built for one ad can then show the same details as the product page. Every buy button goes to your Shopify cart and checkout.

Replo's chat with the Shopify Products picker open, listing a store's real products and prices, beside page workflows such as Build a landing page and Build a Shopify product page
Type @ in Replo's chat to pull a product from your Shopify catalog into the page you're building.

See how the Shopify integration works, or read how to create product pages in Shopify. Start for free and build a landing page with your real product data.

Frequently asked questions

What is a metafield in Shopify?
A metafield is a custom field on a Shopify product, variant, collection, customer or order. It stores information Shopify has no built-in field for, such as a size chart, an ingredient list or care instructions. Each one has a namespace and key, a type and a value.
What is a product metafield?
A product metafield is a metafield attached to a product. You define it once, for example Care instructions as multi-line text, then fill in a value on each product. Your product page template shows each product's own value in the same spot.
How many metafields can a Shopify product have?
Shopify allows up to 256 metafield definitions for each resource type, such as products or customers, according to its help center. Plan your names and group related details, like one fabric field instead of one field per fiber, so you stay well under the limit.
What's the difference between metafields and metaobjects?
A metafield adds one detail to something that already exists, like a product's fabric. A metaobject is a reusable entry with its own fields, like a size chart or a designer profile. Many products can point to one metaobject through a metafield.
Do metafields help SEO?
Indirectly. Metafields don't rank on their own, but they put specific details on every product page, such as materials, dimensions or ingredients. Shoppers search with those words. Category metafields also feed your store's filters and search.
Why isn't my metafield showing on my store?
Check three things. The product needs a value filled in, the definition needs storefront access, and the theme block needs a connection to that metafield as a dynamic source. Older themes need a line of Liquid in the product template instead.
Can I show metafields without code?
Yes. Online Store 2.0 themes connect metafields to blocks in the theme editor through dynamic sources, with no code. Landing pages built in Replo can also show your Shopify products, collections and metafields, and every buy button goes to your Shopify cart.

Find trends in your business

Ask a question about your store and Replo answers it from every tool you connect.