Metafields and metaobjects as a product content model
Stop hard-coding product details into descriptions. How we model structured content in Shopify so it scales across templates and markets.

Open the product description of most Shopify stores and you will find a small archive of HTML: a size chart pasted as a table, ingredients in a bulleted list, care instructions in bold, and a shipping note that was accurate three years ago. It works until the brand wants to show ingredients in a tab, filter by material or translate the store into French. At that point every product has to be edited by hand. Metafields and metaobjects solve this by turning product details into structured data, and a good content model is one of the highest-leverage investments a growing store can make.
Metafields versus metaobjects
A metafield is a typed field attached to a resource, such as a product, variant, collection or customer. A product might have a specs.material text field or a specs.weight measurement field. A metaobject is a standalone content entry with its own fields, which can be referenced from many resources. A single "Fabric" metaobject for organic cotton, with a description, care instructions and a certification badge, can be referenced by hundreds of products.
The rule of thumb we use: if the information is unique to one product, it belongs in a metafield. If it is shared by many products and should be edited once, it belongs in a metaobject.
If the same sentence appears in 200 product descriptions, it is not copy. It is data that has not been modeled yet.
Designing the model
We run a short workshop with merchandising, content and operations before creating any definitions. The goal is a model that reflects how the business thinks about products, not how the last developer structured the theme. The steps:
- Inventory the content. Pull 30 to 50 representative product pages across categories and highlight every distinct piece of information.
- Group and type it. Decide what is text, rich text, a number with a unit, a boolean, a file, a list or a reference.
- Find the shared entities. Materials, ingredients, designers, collections of care instructions and size guides are common metaobject candidates.
- Name things consistently. We use a small number of namespaces, such as
specs,contentandmerch, and descriptive keys that make sense to a merchandiser reading the admin. - Decide where each field appears on the storefront and whether it should be filterable in collections.
A typical apparel model ends up with around 12 to 20 product metafields and three to five metaobject types. More than that is usually a sign that fields are being created for one-off exceptions.
Connecting the model to the theme
Online Store 2.0 lets merchandisers connect metafields to section settings as dynamic sources, which means a single product template can show different content for different product types without code changes. In our themes we build sections that expect specific metafields, degrade gracefully when they are empty, and render structured content consistently.
{% assign fabric = product.metafields.specs.fabric.value %}
{% if fabric != blank %}
<div>
<h3>{{ fabric.name }}</h3>
{{ fabric.care | metafield_tag }}
</div>
{% endif %}
Metafields defined with the right types also flow into the Search and Discovery app as filters, into structured data for richer search results, and through the Storefront API for any headless or app use. Modeling content once pays off in several places at the same time.
One caution: metaobject references add Liquid lookups to each render. Shopify caches rendered storefront pages well, but a product template that loops through dozens of references, each with nested references of its own, can still slow server response on uncached requests. We keep reference depth shallow, avoid loading every field of a referenced entry when only its name is needed, and test templates with the largest real products in the catalogue rather than tidy sample data.
Migrating out of product descriptions
The hardest part is usually moving existing content. For a catalogue of a few hundred products, a careful manual migration may be fastest. For thousands, we script it.
- Export products and parse the description HTML for recognizable patterns such as headings, tables and labeled lines.
- Map each pattern to a metafield or metaobject reference, and flag products that do not parse cleanly for human review.
- Import through the Admin API in batches, then compare rendered product pages against the originals before removing content from descriptions.
On a recent catalogue of about 4,000 products, roughly 85 percent parsed automatically. The remaining 600 took a merchandiser about a week to clean up, which was still far faster than editing every product by hand.
Keeping it governed
Content models decay without ownership. We document every definition with a description in the admin, add validation rules such as allowed values or character limits where they help, and pin the most-used fields so they appear at the top of the product editor. We also recommend a quarterly review: any metafield with near-zero usage is either poorly understood or unnecessary, and both are worth fixing.
This work sits at the heart of our custom Shopify themes and Liquid section builds, where sections are designed around the model rather than around pasted HTML. For stores selling in several regions, structured content also makes translation far easier with Shopify Markets, since each field can be translated once instead of every description being rewritten.
Ready to untangle your product content?
If your product pages depend on HTML pasted into descriptions, we can design the model and migrate the catalogue for you. Tell us about your catalogue and we will come back with a fixed-price quote within 24 hours.



