App development

Shopify metafields and metaobjects

Material, care instructions, dimensions, what's in the box: much of what your customers want to know has no field of its own in Shopify out of the box. With metafields and metaobjects, these details get a fixed place. We set up the structure with you and connect it to the theme, filters and integrations.

How to tell that you’re missing fields

For a product, Shopify knows a title, description, price, images and a few other details. In many stores, everything else ends up wherever there happens to be room:

  • Material, dimensions and care instructions are in the description as running text, a little different for every product.
  • The same size chart is copied into a hundred products, and a change means a hundred manual edits.
  • Tags such as “material-cotton” stand in for missing fields, and nobody knows anymore which ones still apply.
  • The filter in the collection can’t filter by material or size, because the detail isn’t available anywhere on its own.
  • Your ERP delivers details for which there is no destination in the store.

Shopify metafields solve this: they give each detail a field of its own with a fixed type. Once set up cleanly, the values can be used everywhere: on the product page, in filters, in emails and in integrations.

What metafields and metaobjects are

Metafield
An additional field on an existing entry: on products, variants, collections, customers or orders.
Definition
The template for a metafield. It sets the name, type and rules so that the same kind of value is entered for every product.
Field type
Text, number, dimension or weight with a unit, date, color, file, link, true/false, or a reference to another product.
Metaobject
A record of its own with several fields, maintained once and linked from many places.

A metafield answers the question “What value does this product have?” A metaobject fits when a detail itself consists of several parts and is needed more than once: a size chart, a material with description and care symbols, an author with photo and short bio, a manufacturer with address.

For many common details, Shopify provides standard definitions. If you assign a category to your products, you get matching attributes such as color or size as prepared fields. We use these standards wherever possible, because sales channels and apps are most likely to understand them.

Where the details appear

In the theme. If your theme supports dynamic sources, you connect a metafield to a text block or an image in the theme editor. For tables, lists with icons or collapsible areas, we build custom sections that match your product pages. Entries of a metaobject can also get pages of their own if you like, for example one page per author or brand.

In filters. The Shopify Search & Discovery app generates filters from product options, metafields and metaobjects. This only works with certain field types: single-line text, numbers, true/false fields and references to metaobjects. A store can have at most 25 filters. More on this under Search and filters.

In feeds and integrations. Metafields are accessible through Shopify’s interfaces. An ERP can fill them, and feed apps and sales channels can read them. Which fields a channel expects, we clarify channel by channel.

In custom rules. Shopify Functions and Shopify Flow also access metafields. A field “Bulky goods” on the product can control a shipping rule or a tag on the order.

Typical mistakes in structuring metafields

The technology is quickly set up. The harder part is deciding what goes where. These are the mistakes we see most often:

  • Variant instead of metafield, and vice versa. What the customer selects and what changes price or inventory is a variant. What merely describes the product is a metafield.
  • Multi-line text for everything. A free-text field can be neither filtered nor reliably analyzed. “Weight: approx. 1.2 kg” is better turned into a weight field with a unit.
  • Free entry instead of fixed values. “Cotton,” “cotton” and “100% Cotton” produce three filter values. A selection list or a metaobject prevents that.
  • Copying instead of linking. What is the same across many products belongs in a metaobject, not in every single product.
  • Fields without a definition. Old apps often leave behind metafields without a definition. They are hard to maintain in the admin and easily forgotten.
  • Too many fields. Shopify allows up to 256 definitions per area. In our experience, only fields that visibly do something in the store actually get maintained.

How we set up metafields and metaobjects

  1. Review what exists. We check which details are currently buried in descriptions, tags and old fields.
  2. Define the structure. Together we decide what becomes a variant, a metafield or a metaobject and which type each field gets.
  3. Migrate the data. We move existing values into the new fields, for large catalogs by import or integration.
  4. Display and filter. We connect the fields to the theme and filters.
  5. Hand over. Your team learns where the fields are maintained and what to keep in mind when creating new products.

Sometimes it becomes clear in the very first step that three standard fields are enough. Then we set up exactly those.

FAQ

Frequently asked questions

What is the difference between a metafield and a metaobject?

A metafield is an additional field on an existing entry, for example the material on a product. A metaobject is a record of its own with several fields, such as a size chart or an author profile. It is created once and can be linked from many products.

Do I need an app for metafields?

No. Metafields and metaobjects are part of Shopify and are created in the settings of the admin. An app is only necessary if you want to load a large number of values at once or import them from another system.

Does my theme display metafields automatically?

Not automatically. In the theme editor, metafields can be connected to sections and blocks if the theme supports so-called dynamic sources. For tables, icons or lists, you often need a section of its own, which we build for your theme.

Can customers filter by metafields?

Yes, with Shopify's Search & Discovery app. Filters only work with certain field types, though, such as single-line text, numbers or true/false fields. That is why we decide the field type before any data is entered.

We already have metafields from old apps. Can that be cleaned up?

Yes. We check which fields are still needed, create clean definitions for them and remove leftovers from apps that are no longer installed. Beforehand, we check whether the theme or integrations still access them.

Contact

Which details are missing from your products?

Tell us briefly what you need. You will get a reply from someone who would also build your project.

Phone
+49 (0) 30 – 40 36 38 90Mon–Fri 9:00 a.m.–4:30 p.m. (CET)