A recurring data-modeling question on Shopify: a client has product-category-specific data they want to display - size charts for pants, measurements for shoes, care instructions for shirts. The fields differ per category, but within each category they're identical across hundreds of products. How do you model this without duplicating data on every product?
Four approaches show up in merchant discussions. Only one holds up when the catalog grows.
What doesn't scale
Custom fields on each product as individual metafields. Every product gets three metafields: category, measurements (JSON), instructions (Rich Text). Works for 10 products. By product 500, the measurements JSON for "pants" has been typed 500 times, and when the size chart needs a correction, a merchant updates it 500 times - or, more likely, forgets a few and ends up with inconsistent data.
Hard-coding category content in Liquid snippets. A snippet per category (pants-sizing.liquid, shoes-sizing.liquid) rendered conditionally on the product page. Developer-only edit path, no merchant self-service, and the size charts become buried in theme code where content managers can't touch them.
Theme settings JSON for shared content. Fine for site-wide config, wrong for product-linked content. Theme settings aren't queryable per product and merchants can't reference them cleanly from individual records.
The pattern that works
Metaobjects are Shopify's purpose-built type for repeatable structured data that can be referenced from multiple resources. Create a metaobject definition (e.g., SizeChart) with the fields you need (category, measurements, instructions), create one entry per category ("pants", "shoes", "shirts"), and reference the right metaobject from each product via a metaobject reference metafield.
The structure that earns its place:
Metaobject definition: size_chart
- category - single-line text
- measurements - JSON (rows of size + measurements)
- instructions - Rich Text
Three metaobject entries: one per category. Each entry carries the category's specific measurements and instructions.
Product metafield: size_chart_ref - metaobject reference to one entry
Now: 500 pants products all point at the same size_chart entry. Update the chart once; all 500 products display the new version. Add a new category? Create a fourth metaobject entry, point the new products at it. Theme code renders the referenced metaobject's fields dynamically.
What metafields still fit
Metafields aren't obsolete. They fit when the data is genuinely per-product:
- A specific product's unique certification number
- A specific product's manufacturing origin (if unique)
- Custom bundled-product configuration (per product)
The test: if the value would be identical for 50+ products, it belongs in a metaobject, not a metafield. If it's unique per product, it's a metafield.
Storefront rendering
In Liquid, rendering the referenced metaobject is straightforward:
The theme code is the same regardless of which category the product belongs to - all the variation lives in the data.
Merchant self-service
The real payoff: merchants edit metaobject entries in the admin UI without touching code. Content manager updates the pants size chart → change appears on 500 products instantly. Developer's involvement stops at theme-render setup; ongoing content care is merchant-owned.
This is the separation of concerns that makes Shopify themes scale - structured data for merchants, Liquid rendering for developers.
Migration from per-product metafields
Merchants who started with per-product metafields can migrate:
- Create metaobject definition matching the existing metafield structure
- Script via Admin API to find unique value sets across products
- Create one metaobject entry per unique set
- Bulk-update products to reference the correct metaobject
- Remove the old per-product metafields
The migration is a one-time effort. The payoff is immediate: editing a size chart once instead of 500 times.
What ships with the pattern
A well-designed metaobject setup has:
- Metaobject definitions matching distinct data shapes
- Metaobject entries for each real-world instance
- Product metafields referencing the right metaobject
- Theme code that renders the referenced metaobject fields dynamically
- Admin UX that lets merchants edit entries without developer help
Metaobjects are Shopify's answer to "structured data that shouldn't be duplicated". Use them wherever the same value would otherwise repeat across many products.