List of standard metafield definitions
Standard metafield definitions are metafield definitions that we've created for some common use cases. If you need to store data for one of these use cases, then we recommend using the standard metafield definitions, because they're interoperable across the entire Shopify platform and connect more seamlessly to themes. Standards ensure interoperability across the Shopify ecosystem.
Standard metafield definition templates provide preset configurations to create metafield definitions. Each template has a specific namespace and key that we've reserved to have specific meanings for common use cases.
The following table describes the standard metafield definitions:
Name and ID | Type | Details |
---|---|---|
NameProduct subtitle ID |
single_line_text_field |
Stores a concise description of a product. All apps should use this metafield instead of the product’s full description when a brief product summary is needed. For example, SMS apps can use the product subtitle for short text messages about a product. Maximum length: 70 characters Allowed resources: Reserved namespace and key: |
NameCare guide ID |
multi_line_text_field |
Stores detailed instructions on how to take care of clothing. Themes aimed at users selling apparel can use this metafield for display on product detail pages. Maximum length: 500 characters Allowed resources: Reserved namespace and key: |
NameISBN ID |
single_line_text_field |
Stores an ISBN book identifier. Themes supporting booksellers can use this metafield to identify books to customers. Apps helping to merchandise books should write to this metafield for optimal theme integration. Value: Must be a 10-digit or 13-digit number, with optional hyphens. Allowed resources: Reserved namespace and key: |
NameUPC ID |
single_line_text_field |
Stores a Universal Product Code (UPC). Apps reading or writing UPCs should integrate this standard metafield for display purposes, or for integration with ERP systems. Value: Must be a 12-digit number with at least one zero. Allowed resources: Reserved namespace and key: |
NameEAN ID |
single_line_text_field |
Stores a European Article Number (EAN). Similar to UPCs, apps reading or writing EANs should integrate this standard metafield for display in online stores, or for integration with ERP systems. Value: Must be a 13-digit number. Allowed resources: Reserved namespace and key: |
NameProduct rating ID |
rating |
Stores the average rating for a product or variant. Product rating apps should write to this standard metafield and update it whenever a product’s rating has changed. Themes that display product ratings should reference this metafield for the aggregated average rating. Allowed resources: Reserved namespace and key: |
NameProduct rating count ID |
number_integer |
Stores the total number of ratings for a product or variant. Product rating apps should write to this standard metafield and update it whenever a product’s rating has changed. Themes that display product ratings should reference this metafield. Allowed resources: Reserved namespace and key: |
NameRelated products ID |
list.product_reference |
Stores products that are similar to a selected product. You can display potential substitutes to help customers discover other similar products that they might like. Allowed resources: Reserved namespace and key: |
NameRelated products setting ID |
single_line_text_field |
Stores a setting value that controls how manual product recommendations are displayed.
Allowed resources: Reserved namespace and key: |
NameSearch product boosts ID |
list.single_line_text_field |
Stores search terms that are associated to a product. When a customer searches a store using the search terms, the product ranks higher in the search results. Allowed resources: Reserved namespace and key: |
NameComplementary products ID |
list.product_reference |
Stores products that are often bought in addition to a selected product. You can display complementary products to help customers discover new products and to increase sales. Allowed resources: Reserved namespace and key: |
NameBirth date ID |
date |
Stores the customer's date of birth in ISO 8601 format. You can use this metafield to create a filter that segments customers by birthday to automatically send a discount. Allowed resources: Reserved namespace and key: |
NameTrade item description ID |
multi_line_text_field |
Stores a precise product description that describes specific attributes of the product for customs and import. Allowed resources: Reserved namespace and key: |
NameProduct transport declaration ID |
list.single_line_text_field |
Stores public transport declarations, such as batteries, hazardous materials, creams, liquids, or powders. Allowed resources: Reserved namespace and key: |
Interacting with standard metafield definitions
Anchor link to section titled "Interacting with standard metafield definitions"You can interact with standard metafield definitions using GraphQL queries or mutations:
Action | Query or mutation |
---|---|
Access standard metafield definition templates | Use the standardMetafieldDefinitionTemplates query to access standard metafield definition templates. |
Access metafield definition | Use the metafieldDefinition query to access a standard metafield definition. |
Create a metafield definition | Use the standardMetafieldDefinitionEnable mutation to create a metafield definition using one of the standard metafield definition templates. To specify the template you want to use, provide the ID for the template in the format gid://shopify/StandardMetafieldDefinitionTemplate/<id> , where id is the corresponding ID value from the table. |
Delete a metafield definition | Use the metafieldDefinitionDelete mutation to delete a metafield definition. |
- Learn how to manage metafield definitions using the GraphQL Admin API.
- Learn how to manage validation options using the GraphQL Admin API.