Skip to main content

Shopify product data

Shopify metafields: definitions, types and how to manage them

Shopify gives every product a fixed set of fields: title, description, vendor, product type, price, SKU and a few more. Everything else, from material and warranty to care instructions, lives in metafields. This guide explains how Shopify metafields are built, why definitions matter, which types and limits apply, the ways to add and edit them in bulk, and how a PIM such as WISEPIM writes them.

Diego Nijboer · WISEPIMLast updated:

Short answer

A Shopify metafield is a custom field on a product, variant or other resource, identified by a namespace and key (such as custom.material) and stored with a type (such as single_line_text_field). A metafield definition is the schema for that field: it makes the field show up as a typed, validated input in the admin. You can write a value without a definition, but then you must send the type yourself and you lose the admin field.

What Shopify metafields are

Metafields are key-value pairs that add custom data to a Shopify resource. Products are the most common owner, but variants, collections, customers, orders and the shop itself can carry metafields too. Every metafield has the four parts in the table below. Together, the namespace and key form its identifier, so custom.material on a product is a different field from specs.material.

Merchants usually work in the custom namespace, which Shopify suggests when you create a field in the admin. Apps use their own namespaces, and Shopify reserves an app-owned namespace ($app in the API) for data that belongs to one app. See the metafields overview on shopify.dev for the full model.

PartWhat it isExample
OwnerThe resource the value belongs toA product, a variant or a collection
NamespaceA group that keeps fields from different teams and apps apartcustom, specs, wisepim
KeyThe field name inside the namespacematerial, warranty_years
TypeHow Shopify validates and reads the valuesingle_line_text_field, number_integer, json

Metafield definitions versus values

A metafield definition is the schema: name, namespace and key, type, optional description and validation rules. The value is the data stored on one product. Shopify's own advice is to create the definition first, because the definition is what turns a metafield into a field in the product page of the admin, enforces validation, and lets you use it in smart collections, admin filters and, when your theme supports dynamic sources, the theme editor.

A value can exist without a definition. The Admin API accepts it as long as you send the type, which it requires when no definition exists for that namespace, key and owner type. Those values are stored, but nobody sees a typed input for them in the admin. If you later add a definition with the same namespace, key and type, you can migrate the existing values to it, and values that fail the new validation rules can then be fixed.

  • To create a definition in the admin: go to Settings > Metafields and metaobjects, choose Products, click Add definition, then set the name, namespace and key, type and any validation
  • You can also start from a product page: open a product and click Add definition in its Metafields section
  • Validation options depend on the type, such as a character limit for text or a minimum and maximum for numbers
  • Pinned definitions show automatically on every product page in the admin; Shopify allows 50 pinned definitions per resource type

Metafield types you can choose

The type decides what a value may contain and how themes and apps read it. Shopify groups the types roughly as in the table. Most basic and all reference types also exist as a list, such as list.single_line_text_field, except boolean, id, json, language, money, multi_line_text_field and rich_text_field. The full, current list is on the metafield data types page.

GroupTypesUse it for
Textsingle_line_text_field, multi_line_text_field, rich_text_field, url, colorMaterial, care instructions, a spec sheet link
Numbersnumber_integer, number_decimalWarranty in years, cost, wattage
Other basicsboolean, date, date_time, money, jsonFlags, launch dates, structured data such as FAQs
Measurementsdimension, weight, volume and more, stored as value plus unitProduct dimensions, net content
Ratingrating, stored as value with a scaleA review score
Referencesproduct_reference, file_reference, metaobject_reference and moreRelated products, a size chart, a downloadable manual

Category metafields and the taxonomy

Shopify's standard product taxonomy gives each product one category, separate from the free-text product type. The category powers category metafields: attributes that belong to that category, such as size, neckline and color for shirts. Their values are metaobject entries with default values that link to Shopify's standardized values, and you can rename an entry (black to graphite, for example) or link a field to a variant option so one edit updates everywhere.

You set the category on the product page, where the Category metafields section then shows the fields for that category, or in bulk through the bulk editor or a CSV with the category ID or breadcrumb. When you change a category, metafields that have a value or a variant link carry over and empty ones do not. Shopify documents this on its product category page.

Ways to add and edit metafields

One product at a time, the product page in the admin is enough. For a catalog, you need one of the bulk routes below. Each has its own rules, so check them before you change hundreds of products. For the bulk routes in more depth, see how to bulk edit Shopify products.

  • CSV column headers look like Fabric (product.metafields.custom.fabric) or just product.metafields.custom.fabric; the Shopify CSV guide covers the rest of the format
  • A product CSV can be at most 15 MB, rows match on handle, and an empty cell overwrites an existing value when you import with Overwrite products with matching handles
  • metafieldsSet creates a value if it does not exist yet and updates it if it does, so the same call works for new and existing products
MethodHow it worksWatch out for
Product pageFill in the Metafields section of a productOnly fields with a definition appear as inputs
Bulk editorSelect products, click Bulk edit and add metafield columnsA metafield validation error blocks the save until you fix the value
Product CSVColumns named product.metafields.namespace.keyOnly defined metafields of supported types are exported; no variant metafields
AppsSpreadsheet and bulk edit apps from the Shopify App StoreCheck which namespaces and types the app reads and writes
Admin APIThe metafieldsSet mutation, up to 25 metafields per callAtomic: one invalid value fails the whole call

Metafield limits to know

Limits rarely bite on day one, but they shape how you design fields for a growing catalog. Every app and every team that adds its own definitions draws from the same allowance per resource type. The figures below come from Shopify's metafield limits and the MetafieldsSetInput reference; check them again before a large build, because Shopify adjusts them.

WhatLimit
Namespace3 to 255 characters: letters, digits, hyphen and underscore
Key2 to 64 characters: letters, digits, hyphen and underscore
Merchant definitions256 per resource type (apps get their own 256 each)
Pinned definitions50 per resource type
Value size64 KB for most types, 2 KB for url and id, 128 KB for json
List values128 items for most list types
metafieldsSet25 metafields per call, 10 MB total payload

Managing metafields from a PIM

When product data lives in a PIM, the PIM becomes the place where you edit specs, and the Shopify connection writes them to metafields. That keeps one source for the values your webshop, feeds and marketplaces share. The part to get right is the split of work: the PIM writes values, and the definitions that make those values visible in Shopify are set up in Shopify.

WISEPIM's Shopify PIM connection writes metafield values with metafieldsSet. By default it writes wisepim.ean, wisepim.mpn and wisepim.country_of_origin, wisepim.cost as number_decimal and wisepim.short_description as multi_line_text_field. Brand goes to Shopify's native vendor field, not a metafield. Product FAQs, when you use them, go to wisepim.faqs and wisepim.faq_schema as json.

Any attribute you enable for Shopify in attribute management is written too: under the wisepim namespace with a key derived from the attribute code, or back to its original namespace, key and type when the attribute came from an imported Shopify metafield definition. Per-connection field mappings can switch an entry off or fill it from another attribute, a fixed value or a template, and a value that does not fit its type is skipped rather than sent.

  • Importing definitions: WISEPIM can read your store's product metafield definitions and create a matching attribute for each, skipping app-reserved app-- namespaces, so later product imports fill those attributes
  • No definitions are created: WISEPIM writes values only. For wisepim.* fields to appear as typed, editable inputs in the Shopify admin or as dynamic sources in the theme editor, create a definition in Settings > Metafields and metaobjects with exactly the same namespace, key and type
  • Themes do not show these values on their own: connect them to a theme block or add them in your theme code
  • Metaobjects and category metafields stay in Shopify; WISEPIM does not sync them

Sources

Vendor documentation we read for this guide, as of October 2026. Features and names change, so check the current documentation before you decide.

Frequently asked questions

Shopify metafields are custom fields that store extra data on products, variants, collections, customers, orders and other resources. Each metafield has a namespace and key that identify it, a type that controls validation, and a value. Merchants use them for specs such as material, dimensions or warranty that Shopify has no standard field for.

A metafield definition is the schema for a metafield: its name, namespace and key, type and optional validation rules. With a definition, the field shows up as an input on the product page in the admin, values are validated, and you can use the field in smart collections, filters and themes that support dynamic sources.

Yes. The Admin API stores a value without a definition as long as you send the type. Such values are not shown as typed inputs in the admin. If you later create a definition with the same namespace, key and type, you can migrate the existing values to it.

Shopify allows 256 merchant metafield definitions per resource type, such as products, and each installed app gets its own 256 per resource type. Up to 50 definitions per resource type can be pinned. Standard definitions do not count toward these limits unless Shopify says otherwise.

Use the bulk editor with metafield columns, a product CSV with columns named product.metafields.namespace.key, a bulk edit app, or the Admin API mutation metafieldsSet. Product CSVs only include defined metafields of supported types and do not support variant metafields, so variant fields go through the bulk editor, an app or the API.

No. WISEPIM writes metafield values, under the wisepim namespace or the original namespace of an imported definition, but it does not create definitions. To see wisepim fields as typed inputs in the Shopify admin or use them as dynamic sources in your theme, create a definition in Shopify with the same namespace, key and type.

Still have questions?

Can't find the answer you're looking for? Please get in touch with our team.

Contact Support

Keep your specs in one place, write them to Shopify

WISEPIM imports your Shopify metafield definitions as attributes, lets you enrich and translate the values, and writes them back as typed metafields. Free for up to 100 products.

Keep exploring

Hand-picked next steps to go deeper.