Metafield-linked product options
Learn about how to link metafields to product options in the new product model.
Why we've made these changes
Anchor link to section titled "Why we've made these changes"The updated Shopify product taxonomy is an open-source comprehensive, global standard for product classification. It's a universal language that empowers merchants to categorize their products. Spanning 22 essential verticals, our taxonomy encompasses categories, attributes, and values, all thoughtfully integrated within Shopify and numerous marketplaces.
By using standard metaobjects to model each attribute's values (as metaobject entries), we ensure reusability and shop-specific customization. To connect metaobjects to any resource in Shopify, we use metafields (of type metaobject reference). Then, we introduced the ability to connect these metaobjects such that merchants can create variants for each attribute value.
Linking product options to metafields
Anchor link to section titled "Linking product options to metafields"In the new product model, variants are still a byproduct of the product's options, representing the individual SKUs derived from the various attributes that define the product. With the new Shopify Product Taxonomy, a product's category now includes standard metafield references for each associated attribute. To use these metafield references to create variants, you'll need to follow two key steps:
Step 1: Create metaobject entries for your attributes
Anchor link to section titled "Step 1: Create metaobject entries for your attributes"
First, create metaobject entries that will represent your attribute values. These entries will be based on standard definitions using Shopify Taxonomy values.
Step 2: Create or update products with linked options
Anchor link to section titled "Step 2: Create or update products with linked options"Once you have your metaobject entries, you can create or update products using these linked options. Here's an example using the productSet
mutation: