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.
In this guide
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.
| Part | What it is | Example |
|---|---|---|
| Owner | The resource the value belongs to | A product, a variant or a collection |
| Namespace | A group that keeps fields from different teams and apps apart | custom, specs, wisepim |
| Key | The field name inside the namespace | material, warranty_years |
| Type | How Shopify validates and reads the value | single_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.
| Group | Types | Use it for |
|---|---|---|
| Text | single_line_text_field, multi_line_text_field, rich_text_field, url, color | Material, care instructions, a spec sheet link |
| Numbers | number_integer, number_decimal | Warranty in years, cost, wattage |
| Other basics | boolean, date, date_time, money, json | Flags, launch dates, structured data such as FAQs |
| Measurements | dimension, weight, volume and more, stored as value plus unit | Product dimensions, net content |
| Rating | rating, stored as value with a scale | A review score |
| References | product_reference, file_reference, metaobject_reference and more | Related 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
| Method | How it works | Watch out for |
|---|---|---|
| Product page | Fill in the Metafields section of a product | Only fields with a definition appear as inputs |
| Bulk editor | Select products, click Bulk edit and add metafield columns | A metafield validation error blocks the save until you fix the value |
| Product CSV | Columns named product.metafields.namespace.key | Only defined metafields of supported types are exported; no variant metafields |
| Apps | Spreadsheet and bulk edit apps from the Shopify App Store | Check which namespaces and types the app reads and writes |
| Admin API | The metafieldsSet mutation, up to 25 metafields per call | Atomic: 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.
| What | Limit |
|---|---|
| Namespace | 3 to 255 characters: letters, digits, hyphen and underscore |
| Key | 2 to 64 characters: letters, digits, hyphen and underscore |
| Merchant definitions | 256 per resource type (apps get their own 256 each) |
| Pinned definitions | 50 per resource type |
| Value size | 64 KB for most types, 2 KB for url and id, 128 KB for json |
| List values | 128 items for most list types |
| metafieldsSet | 25 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.
- Shopify.dev: About metafields
- Shopify.dev: List of metafield data types
- Shopify.dev: Metafield limits
- Shopify.dev: MetafieldsSetInput (GraphQL Admin API)
- Shopify.dev: metafieldsSet mutation
- Shopify Help Center: Metafields
- Shopify Help Center: Creating custom metafield definitions
- Shopify Help Center: Product category
- Shopify Help Center: Using CSV files to import and export products
Frequently asked questions
Still have questions?
Can't find the answer you're looking for? Please get in touch with our team.
Contact SupportKeep 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 reading
Shopify bulk edit products
The bulk editor, CSV, apps and a PIM compared, with a safe checklist.
Read moreShopify product CSV
Every column of the Shopify product CSV, including metafield columns.
Read moreAttribute management
Define attributes once and choose which ones each channel receives.
Read more
Keep exploring
Hand-picked next steps to go deeper.