Metafields

You can use metafields to add custom fields to objects such as products, customers, and orders. Metafields are useful for storing specialized information, such as part numbers, customer titles, or blog post summaries. They can be used by apps and channels to track data for internal use.

For example, you can use metafields in the following ways:

  • Add fields to a resource (such as a product, product variant, or customer).
  • Customize the appearance of your storefront and show more information.
  • Store and transfer data between your store and another ecommerce system such as a CRM, ERP, or IMS.
  • Track internal data that an app needs.

You need to use an app to create and manage metafields.

Metafields have three parts:

  • Namespace - A category or container that differentiates your metadata from other metafields.
  • Key - The name of the metafield.
  • Value - The content of the metafield. In most cases, the value is what will be displayed on the storefront or used by the app.

For example, the following metafields specify the washing instructions for an item of clothing:

Metafields that describe washing instructions for clothing.
Namespace Key Value
Acme134-instructions Wash Cold water
Acme134-instructions Dry Tumble dry

For more examples, see The metafield object.

Adding metafields to products

  1. Ensure you have metafields enabled and set up by following these instructions.
  2. In the Shopify admin go to your Products and select the product you want to add the metafield data to.
  3. On the right hand side, click the Manage option for Metafields.
  4. Select what metafields you want to add to your product.
  5. Click Save
.

Editing product or variant metafield data

  1. On a product or variant page click the Edit metafields button.
  2. Add the required information to your meta fields.
  3. Click Save.

Metafield limitations

The following limitations apply to metafields:

  • You cannot search for metafields or filter by a metafield in the Shopify admin. If you have a use case where you need to do so, then try using tags instead of metafields.
  • Shopify analytics and reports do not contain information about metafields, but there are apps that provide reports that include metafields.
  • Shopify Scripts and the Wholesale channel do not support metafields.

Learn more about metafields

See the following references for more information about metafields:

Ready to start selling with Shopify?

Try it free