Skip to content
Can Elmas

Shopify · 8 min read

Shopify Metafields and Metaobjects: Structure Product Data That Scales

TL;DR

Use metafields for details unique to one product or variant, like fit or dimensions, and metaobjects for content many products share, like size guides or ingredients. Plan the data model before creating fields, choose typed fields that filters and feeds can read, and connect them to your theme through dynamic sources instead of pasting specs into descriptions.

· Published · Updated

Metafields store details that belong to one product or variant, such as fit, dimensions or care instructions. Metaobjects store content that many products share, such as a size guide or an ingredient profile, and products point to them. Move specs out of descriptions and into both, and your theme, filters, translations and feeds all read the same structured data.

Metafields vs metaobjects: what each is for

A metafield is a custom field attached to a Shopify resource: a product, variant, collection, customer, order, page or the shop. You create a definition once (name, namespace and key, type, validation), and every product gets that field in the admin. A value like specs.fit = "Relaxed" lives on that one product.

A metaobject is a custom content type with its own fields and entries. You define “Size guide” with a name, measurements and fit notes, create one entry per guide, then point each product to the right entry through a metaobject reference metafield. Edit the entry once and every product that references it updates.

Product descriptionTagsMetafieldMetaobject
StructureFree-form HTMLFree textTyped field with validationTyped fields, reusable entries
Best forStory and selling copyInternal flags, automationsDetails unique to a product or variantContent shared across many products
Usable as a filterNoYes, but messyYes, for supported typesYes, through reference metafields
Survives a redesignOnly as one blobYesYesYes
TranslationWhole block at onceNot practicalPer fieldPer entry

The rule of thumb: if the value differs on nearly every product, it’s a metafield. If you’d otherwise paste the same block into dozens of products, it’s a metaobject.

Planning your product data model

Messy setups come from creating fields one request at a time. Plan the model first.

  1. Inventory your descriptions. Pull 20 to 30 products across your main categories and list every distinct piece of information: materials, dimensions, care, ingredients, warnings, what’s in the box.
  2. Decide the level of each field. Product-level if it’s true for every variant (fit), variant-level if it changes by option (weight per size).
  3. Pick the narrowest type that fits. A dimension type instead of text for “Width: 40 cm”, an integer for piece count, true or false for “vegan”. Typed values are what filters and feeds can use.
  4. Mark shared content as metaobjects. Size guides, ingredients, designers, certifications.
  5. Name for the long term. Use a consistent namespace and plain keys (specs.fit, specs.width), never names tied to a theme section or campaign.
  6. Record where each field is used, so you know what breaks if someone changes it.

A simple model sheet keeps everyone aligned:

FieldLevelTypeShared?Used in
FitProductSingle line text, preset choicesNoPDP, filter
WidthVariantDimensionNoPDP, comparison table
Size guideProductMetaobject referenceYesPDP drawer
Key ingredientsProductList of metaobject referencesYesPDP, filter, glossary
VeganProductTrue or falseNoFilter, feed

Before creating custom definitions, check what Shopify already provides. Shopify has been rolling out category metafields tied to its standard product taxonomy: assigning a product category can suggest attributes like color, size and material, designed to work with filters and sales channels. Shopify also offers standard definitions for some common fields, such as review ratings. Use them instead of inventing parallel custom fields.

Common uses: specs, size guides, ingredients and FAQs

Specs

Technical specs belong in individual metafields, not a pasted table. As fields, they render as the same spec list on every product, and a comparison table across a collection needs no retyping. Use the dimension, weight and volume types so the unit is stored with the value.

Size guides

A size guide is the classic metaobject. Create a definition with a name, a measurements field and fit notes, make one entry per garment type, and reference the right entry from each product. When a pattern changes, you update one entry instead of every affected description.

Ingredients and materials

For beauty, food and supplement brands, make each ingredient a metaobject entry with a name, a short description and notes like allergen information. Products reference a list of ingredients. The same entries feed the product page, filters like “contains niacinamide” and, because metaobject entries can be published as their own web pages with a theme template, an ingredient glossary.

FAQs

Product FAQs work well as metaobjects: each entry holds a question and an answer, and products reference a list of them. Shipping or warranty questions are written once; product-specific ones get their own entries.

Connecting metafields to theme sections without code

In an Online Store 2.0 theme, many section and block settings can pull their value from a metafield. In the theme editor, open the product template, select a block such as a text block or collapsible row, and click the “Connect dynamic source” icon next to the setting. The editor lists every metafield whose type matches.

Common no-code connections:

  • A text block under the title showing fit or material
  • A collapsible row filled from a care-instructions rich text metafield
  • An image block pulling a product-specific diagram from a file metafield

Three limits to know. First, you can only connect to the blocks and setting types your theme exposes. Second, rendering a metaobject’s full structure, like a size table or an ingredient grid, usually needs a small custom Liquid section. That’s a one-time build: once it exists, merchandisers manage content in the admin and nobody touches code. Third, check what each block does when a connected field is empty. Some themes hide the block; others leave an orphaned heading.

What to show on the product page, and in what order, is its own decision; product page optimization covers it.

Shopify’s Search & Discovery app lets you add product and variant metafields as storefront filters, next to built-in options like availability, price and vendor. Filters only work with certain types, mainly single line text, numbers, true or false and metaobject references, plus lists of those. Rich text and JSON can’t become filters, so choose types carefully during planning.

What makes metafield filters work in practice:

  • Consistent values. “Navy”, “navy” and “Navy blue” become three filter options. Preset choices or metaobject references prevent this.
  • Full coverage. Products with a blank field vanish as soon as a shopper picks any value. Fill the field across the collection before switching the filter on.
  • Clean labels. The filter shows the stored value, so store “Linen”, not “100% linen, stonewashed for softness”.

Which filters to show on which collections is a merchandising call; collection page optimization walks through it.

Search needs its own check, because metafield values aren’t always indexed. Search your storefront for a term that only exists in a metafield. If nothing comes back, check whether your search app can include metafields, or make sure key terms also appear in titles or tags.

Feeding structured data to Google and marketplaces

Google Merchant Center, Meta catalogs and marketplaces ask for attributes like color, size, material, gender and age group, and missing or vague values limit where products show. Metafields keep them in one place.

Three routes get them out:

  1. Shopify’s channel apps. The Google & YouTube and Facebook & Instagram apps read core product fields, and some attributes can come from metafields the app recognizes. Check each app’s mapping rather than assuming a metafield syncs.
  2. A feed management app. Most feed tools can map any metafield to any feed attribute and apply rules, such as building titles from brand, product type and material. For large or multi-channel catalogs, this is the most flexible route.
  3. On-page structured data. A developer can add metafield values like material or pattern to your theme’s Product structured data, so the page and the feed describe the product the same way.

Metafields can also carry internal data that never appears on the storefront but shapes campaigns:

MetafieldFeed attributeWhat it enables
MaterialmaterialMatches attribute-specific searches
PatternpatternDistinguishes similar variants in listings
Gender, age groupgender, age_groupRequired for apparel in some countries
Margin tier (internal)custom_label_0Separate bids for high- and low-margin products
Season or launch (internal)custom_label_1Split new arrivals from the core range

Migrating existing content into metafields

Most stores I work on have specs scattered across descriptions written by different people in different formats. The order matters more than the tooling.

  1. Export products and study the description HTML. Look for patterns: spec tables, “Material:” lines, repeated care paragraphs.
  2. Create definitions first, with validation on. Values stored without a definition won’t appear as dynamic sources or filter options until you add one.
  3. Build shared content before references. Create metaobject entries like size guides, then set each product’s references.
  4. Extract the values. Consistent HTML can be parsed with a script or spreadsheet formulas. Inconsistent copy suits an AI extraction pass with human review; spot-check every category before importing.
  5. Load in bulk. The bulk editor handles small catalogs; for thousands of products, use a bulk import app or a script against the Admin API.
  6. Connect and QA on a duplicate theme before publishing.
  7. Clean the descriptions last, so information never disappears from the page mid-migration.

Before you call it done:

  • Every definition has a clear name, description and owner
  • Filter fields are filled across every collection where the filter shows
  • Storefront API access is enabled for fields a headless front end reads
  • Translations exist for each language your markets use
  • Empty-value behavior is checked on every product template

Data modeling and migration is a standard part of my Shopify development work, whether it’s a redesign, a replatform or a store that has outgrown its descriptions.

Get it built

If every redesign or new market means re-editing hundreds of product descriptions, I can model your data, migrate it and connect it to your theme, filters and feeds. Shopify builds and migrations start at $6,000. See pricing or get in touch.

FAQ

Frequently Asked Questions

Should I use tags or metafields for storefront filters?

Use metafields for anything with a defined set of values. Tags are free text with no type or validation, so they drift into near-duplicates that clutter filters. Keep tags for internal flags and automation triggers.

Can I set up metafields without a developer?

Yes, for most of the work. You can create definitions, fill values in the admin or bulk editor, and connect them to theme settings in an Online Store 2.0 theme. You need a developer for custom layouts, such as a size table built from a metaobject, and for large migrations.

What happens to metafields when I change themes?

The data stays, because metafields belong to the product, not the theme. You reconnect them in the new theme's editor, which is far less work than rewriting specs buried in hundreds of descriptions.

Can metafields and metaobjects be translated?

Yes. Text values in metafields and metaobject entries can be translated with Shopify's Translate & Adapt app or a third-party translation app, so each market sees localized specs without duplicate products.

Work with me

Let’s find your biggest growth lever

Tell me about your growth challenge. I’ll tell you honestly if I can help — and if I can’t, who can.

  • ✓ No obligation
  • ✓ No sales script
  • ✓ Honest feedback
  • ✓ Clear next steps