Variants that agents can buy: size, colour and stock expressed structurally
How to mark up sizes, colours and stock so an AI shopping agent picks the right variant, keep feed and page in step, and what our scan of 81 retailers found.
By the ConversionVector teamUpdated 12 min read
Contents
Direct answer: Put every variant in the page an agent receives, not just in the picker. In the Product JSON-LD, describe the product as a ProductGroup with a productGroupID, variesBy (for example size and colour) and hasVariant, and give each variant its own Product with its own SKU or GTIN, size or colour, price, availability and a URL that opens that exact variant. Mark sold-out sizes OutOfStock. Then use the same grouping and URLs in your product feeds. An agent that can see "navy, size L: out of stock; navy, size M: in stock" can recommend the right one and put it in a basket. One that sees a single price and "in stock" for the whole product is guessing.
This guide is for developers, ecommerce managers and merchandisers at retailers in the US, UK, EU and elsewhere who sell anything that comes in sizes, colours, materials or capacities. It covers the markup pattern Google documents, variant URLs, keeping Google Merchant Center and ChatGPT feeds in step with the page, what Shopify and WooCommerce output by default, what we found on 81 retailers' product pages, and a test you can run in ten minutes. ConversionVector is not affiliated with Google, OpenAI, Shopify, WooCommerce or any company named here.
Last verified: 23 November 2026 against Google Search Central's product variant structured data page (last updated 8 September 2026), schema.org version 30.1 (16 September 2026), Google Merchant Center Help (item group ID), OpenAI's product feed specification, Shopify's developer documentation (variant deep links and the Liquid structured_data filter) and the WooCommerce 11.3.1 source code.
Why variants trip agents up
A shopper asks an agent for "the waterproof jacket in navy, size L". The agent has to answer three questions about your page: does that combination exist, what does it cost, and can it be bought now? On most product pages the answers live in a size and colour picker that updates the price, image and "add to basket" button in the browser. Google's own variant documentation describes exactly that design and adds that "the markup on the page doesn't change dynamically as the user selects different variants".
So what counts is what was written into the page when it was served. An agent that fetches the page without running JavaScript sees only that. A browsing agent can work the picker, but that takes more steps, and each step is a chance to pick the wrong option. If the structured data holds one Product with one Offer, the agent sees one price and one stock status for every size. If a sold-out size is still marked in stock, the agent may recommend something the shopper can't buy.
That is why variants are a check in our scoring specification: TRX-09: variants expressed structurally. Its fix text reads: "Where a product has sizes or colours, use ProductGroup with hasVariant so an agent can pick the right one without parsing a dropdown." The check runs only on product pages that show size or colour selectors. Our product structured data guide shows one variant example alongside the other Product markup. This guide goes further: the rules, the URLs, the feeds and the test.
Single-page or multi-page: know which site you have
Google describes two designs, and the markup differs slightly:
| Design | What it looks like | ProductGroup URL | Markup on each page |
|---|---|---|---|
| Single page | All variants are picked on one page, usually with query parameters such as ?size=small&color=green | One canonical URL for the group, normally the page with no variant preselected | The whole group, every variant |
| Multi page | Each colour (say) has its own page, and changing colour loads another page | None, because no single URL represents the group | The full group definition on every page, full details for the variants on that page, and the other page's variants as entries with only a url |
Shopify and WooCommerce stores are single-page by default. Fashion sites that give each colour its own page are often multi-page. On a multi-page site, Google says each page's markup must be complete on its own, so don't define the group on one page and point to it from another.
The markup pattern
This is the pattern Google recommends as "the most compact and natural": variants nested in a ProductGroup. A rain jacket in two colours and two sizes, sold in pounds, with one size out of stock:
{
"@context": "https://schema.org",
"@type": "ProductGroup",
"@id": "https://www.example.co.uk/products/storm-jacket#group",
"name": "Storm waterproof jacket",
"description": "Lightweight waterproof jacket with taped seams and a packable hood.",
"url": "https://www.example.co.uk/products/storm-jacket",
"brand": { "@type": "Brand", "name": "Example Outdoor" },
"productGroupID": "STORM",
"variesBy": ["https://schema.org/color", "https://schema.org/size"],
"hasVariant": [
{
"@type": "Product",
"sku": "STORM-NVY-M",
"name": "Storm waterproof jacket, navy, size M",
"color": "Navy",
"size": "M",
"image": "https://www.example.co.uk/images/storm-navy.jpg",
"offers": {
"@type": "Offer",
"url": "https://www.example.co.uk/products/storm-jacket?color=navy&size=m",
"price": "89.00",
"priceCurrency": "GBP",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition"
}
},
{
"@type": "Product",
"sku": "STORM-NVY-L",
"name": "Storm waterproof jacket, navy, size L",
"color": "Navy",
"size": "L",
"image": "https://www.example.co.uk/images/storm-navy.jpg",
"offers": {
"@type": "Offer",
"url": "https://www.example.co.uk/products/storm-jacket?color=navy&size=l",
"price": "89.00",
"priceCurrency": "GBP",
"availability": "https://schema.org/OutOfStock",
"itemCondition": "https://schema.org/NewCondition"
}
},
{
"@type": "Product",
"sku": "STORM-OLV-M",
"name": "Storm waterproof jacket, olive, size M",
"color": "Olive",
"size": "M",
"image": "https://www.example.co.uk/images/storm-olive.jpg",
"offers": {
"@type": "Offer",
"url": "https://www.example.co.uk/products/storm-jacket?color=olive&size=m",
"price": "84.00",
"priceCurrency": "GBP",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition"
}
}
]
}
Add a gtin (and mpn) to each variant where the product really has one; our GTIN, MPN and SKU guide explains which identifiers to use. Add shipping and returns as in our shipping and returns guide.
The rules behind it, from Google's documentation and schema.org:
- The group needs a name and an ID.
nameis the only required ProductGroup property in Google's documentation. The group ID (your parent SKU) goes inproductGroupIDon the group, or ininProductGroupWithIDon each variant; if you give both, they must match. - Each variant needs its own ID, such as a
skuorgtin. A GTIN belongs to one variant, never to the group. - Variant names are more specific than the group name, using the words that identify the variant ("navy, size M").
variesBynames what changes. Google supportscolor,size,suggestedAge,suggestedGender,materialandpattern, written as full schema.org URLs. schema.org itself also accepts short names such as"color", but use the full form for Google.- Shared facts sit on the group: brand, description, and ratings that represent all the variants. That keeps the markup shorter.
- The group itself isn't for sale. schema.org describes a ProductGroup as a template; the offers belong to the variants. So price and availability go on each variant's
Offer, not on the group. - Variants can be linked the other way round. Instead of nesting under
hasVariant, each variantProductcan point to the group withisVariantOf. Both are valid; nesting is what Google recommends.
Give every variant a URL that opens it
Google's guidelines say the site "must have the ability to preselect each variant directly with a distinct URL", and that preselecting means showing the right image, price and availability and letting the shopper add that variant to the basket. Merchant Center asks for a different landing page URL for each variant, using a path segment or query parameters. OpenAI's feed specification gives each variant row its own URL.
For an agent, that URL is the difference between "it's on this page somewhere" and a link straight to the item the shopper asked for, with the right size already chosen at the basket.
- Shopify supports variant deep links out of the box:
?variant=followed by the variant ID. Shopify's theme documentation says themes should update the product information for the selected variant when a link carries one. - WooCommerce preselects a variation from attribute parameters, such as
?attribute_pa_size=large. - Custom builds need the same: a parameter or path per variant, rendered on the server with that variant's price and stock, and a canonical tag pointing at the group's URL on single-page sites.
Keep the feed and the page in step
Agents and AI shopping surfaces read your product feeds as well as your pages, and the two should describe the same groups. Google Merchant Center says the details on the landing page must match the variant values in the feed, including title, colour, price, availability and image. This is how the same group looks in each place:
| Concept | Product page (schema.org) | Google Merchant Center feed | OpenAI product feed |
|---|---|---|---|
| Group ID (parent SKU) | productGroupID, or inProductGroupWithID on each variant | item_group_id | group_id (item_group_id accepted as an alias) |
| Variant ID | sku (plus gtin where it exists) | id | item_id, which must differ from the group ID |
| What varies | variesBy plus color, size etc. on each variant | color, size, material, pattern, age_group, gender, plus variant_option | variant_dict, for example {"color":"Navy","size":"L"}, with listing_has_variations set to true |
| Group name | ProductGroup name | item_group_title | Not a separate field |
| Price, stock, URL, image | On each variant's Offer | On each variant row | On each variant row |
Merchant Center requires item_group_id for variants in free listings, and for Shopping ads aimed at Brazil, France, Germany, Japan, the UK and the US. Its other rules are worth copying everywhere: use the parent SKU as the group ID, keep it stable, never reuse it for another product, and don't group things that aren't variants (a suit's jacket and trousers are not variants of each other). OpenAI's specification adds that a group should contain only variants of the same product as presented on your site, with the same option names across the group.
Our product feeds guide covers the rest of the feed. Mismatched prices between feed and page have their own guide: price mismatch.
What Shopify and WooCommerce output
Shopify. Shopify's Liquid structured_data filter outputs a schema.org Product for products with no variants and a ProductGroup for products with one or more variants. Shopify's Dawn theme uses that filter on its product template. If your theme is Dawn-based or uses the filter, you probably have the group already. Older themes, heavily customised themes and some SEO apps write their own Product JSON-LD, often with one offer, and some pages end up with two competing blocks. View the source of a product page with several sizes and check.
WooCommerce. WooCommerce core does not output a ProductGroup. In version 11.3.1 (the current release when we checked), a variable product's page carries one Product with an AggregateOffer (lowest price, highest price and an offer count) when the variation prices differ, or a single Offer when they are the same. When the URL specifies every variation attribute, core describes that one variation with a single Offer, its own SKU and identifiers, and inProductGroupWithID pointing at the parent. That helps Merchant Center landing pages, but an agent on the main product page still can't see which sizes are in stock. A full group needs an SEO plugin that supports ProductGroup, or a template change. Our WooCommerce checklist covers the rest of the markup.
Everything else. Whatever the platform, the test below tells you what an agent actually receives.
What our scan found
On 23 November 2026 we looked at the Shopify-based retailers in the Agent Commerce Index (Q4 2026). For each, we took the first product with at least two real variants from the store's public product list, fetched its product page and one variant link with a desktop browser user agent, from one server in Gibraltar, without cookies or JavaScript, and read the JSON-LD. 129 scored retailers are on Shopify. 89 gave us a product with several variants (the rest blocked the product list or had no multi-variant product near the top of it), and 81 of those pages carried Product structured data. The median product had five variants. Figures are aggregate and describe one product per retailer, not whole catalogues.
| Product pages with variants and Product structured data (23 November 2026) | Retailers, of 81 |
|---|---|
Described a ProductGroup (hasVariant or isVariantOf), so would pass TRX-09 | 46 |
| Listed every variant as its own offer, identifiable by SKU or variant URL | 65 |
| Listed every variant as its own offer, but without a ProductGroup | 22 |
| Gave no offer we could tie to a variant (10 of them a single offer for the whole product) | 13 |
29 of the 81 products had at least one variant that the store's own product data listed as unavailable at the time. 23 of those pages marked every sold-out variant OutOfStock. 5 left the sold-out variants out of the structured data, and 1 marked all 16 of its sold-out variants as in stock. All 89 variant links (?variant= with a variant ID) returned the page.
What this suggests:
- Most of the data is already there. 65 of 81 pages listed each variant's price and stock. For 22 of them, the only gap is the group wrapper, which is usually a template change rather than a data project.
- About one page in six gives an agent one offer for many variants. That is the case where an agent can't tell sizes apart.
- Stock mostly matches. Where it didn't, the usual cause was variants missing from the markup, not wrong values.
The ten-minute test: will an agent pick the right size?
Pick one product with several sizes or colours and at least one sold-out variant.
- Fetch the page as an agent would. In a terminal:
curl -sL -A 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot' https://www.example.com/products/your-product > page.html, then searchpage.htmlforapplication/ld+json. Our server-rendered product data guide explains why the raw HTML is what counts. - Count the variants. Is there one Product or Offer per variant on sale, or one for everything? Is there a
ProductGroupwith aproductGroupID? - Check the sold-out one. Does its Offer say
OutOfStock? Does every in-stock variant sayInStock? - Check the IDs. Does each variant have its own SKU (and GTIN where one exists), matching your feed?
- Open two variant URLs from the markup. Does each open with that size and colour selected, at the price in the markup, ready to add to the basket?
- Ask the question an agent would. With the markup in front of you, can you answer "is the navy jacket in size L in stock, and what does it cost?" without touching the picker? If you can't, an agent can't either.
- Then try it for real. Our guide to running your first simulated agent purchase shows how to ask an agent for a specific variant and watch what it picks.
Common mistakes
- One Product block for a product with twenty variants, or an
AggregateOfferprice range with no per-variant stock. - Markup for the default variant only, so every size appears to cost the same and be in stock.
- Sold-out variants left at
InStock, or dropped from the markup so the agent can't tell "sold out" from "doesn't exist". - A GTIN on the group instead of on each variant.
- Variant URLs that don't preselect the variant, or that all canonicalise somewhere unexpected.
- Two Product blocks from the theme and an app, with different prices.
- Group IDs that change when products are re-imported, which breaks grouping in feeds.
- Grouping things that aren't variants, such as a bundle and its parts.
Fix list
- Choose the group ID for each product: your parent SKU, stable for life.
- Make every variant addressable by a URL that preselects it on the server.
- Output a ProductGroup with
productGroupID,variesByandhasVariant, one Product and Offer per variant, in the HTML the server sends. - Wire availability to stock per variant, so a sold-out size turns
OutOfStockwhen stock does. - Put identifiers on each variant: SKU always, GTIN and MPN where they exist.
- Align the feeds:
item_group_idandgroup_idequal toproductGroupID, the same variant URLs, the same prices and stock. - Validate with Google's Rich Results Test, then run the ten-minute test above on one product per template.
- Re-test after theme or app changes, because that is when variant markup usually breaks.
You can also run the free score on a product URL with several sizes to see TRX-09 alongside the identifier, stock and price checks.
Sources
- Google Search Central, Product variant structured data (ProductGroup, Product), last updated 8 September 2026
- schema.org: ProductGroup, hasVariant, isVariantOf, inProductGroupWithID and variesBy, version 30.1 (16 September 2026)
- Google Merchant Center Help, Item group ID [item_group_id], read 23 November 2026
- OpenAI, Product feed specification, variants section, read 23 November 2026
- Shopify developer documentation: Support product variants and the Liquid structured_data filter, read 23 November 2026; Shopify Dawn theme,
sections/main-product.liquid - WooCommerce,
includes/class-wc-structured-data.phpat release 11.3.1 (GitHub, released 19 November 2026) - ConversionVector, scoring specification (TRX-09), Agent Commerce Index (Q4 2026) and our variant scan of the Shopify-based scored retailers, 23 November 2026 (method above)
Questions
- How do I mark up product variants in schema.org?
- Use a ProductGroup with a productGroupID (your parent SKU), variesBy naming the properties that change, such as size and colour, and hasVariant listing one Product per variant. Each variant Product carries its own sku or gtin, its size or colour, and its own Offer with price, currency, availability and a URL that opens that variant. Shared facts such as brand and description sit on the ProductGroup.
- Why does an AI shopping agent pick the wrong size or say a size is in stock when it isn't?
- Usually because the page it received describes only one variant, or one offer for the whole product. Size and colour pickers built in JavaScript change the price and stock on screen, but Google notes that the markup on the page doesn't change as the shopper picks. An agent reading the HTML sees whatever was written into it when the page was served, so every variant and its stock needs to be there.
- Does each variant need its own URL?
- Yes. Google's variant documentation says the site must be able to preselect each variant with a distinct URL, usually a query parameter, showing the right image, price and availability and allowing that variant to be added to the basket. Merchant Center asks for a different landing page URL for each variant, and OpenAI's feed specification gives each variant row its own URL.
- Does Shopify output ProductGroup markup?
- Its Liquid structured_data filter does. Shopify's documentation says it outputs a Product for products with no variants and a ProductGroup for products with variants, and the Dawn theme uses it. Older or custom themes and some apps write their own Product markup instead, so check what your product pages actually contain.
- Does WooCommerce output ProductGroup markup?
- Not in core. In WooCommerce 11.3.1, a variable product's page carries one Product with an AggregateOffer (lowest and highest price and an offer count) when prices differ. A URL that specifies every variation attribute gets a single Offer for that variation with inProductGroupWithID. A full ProductGroup needs a plugin or template change.
- How does ConversionVector check variants?
- Check TRX-09 of the open Agent Conversion Score specification looks at product pages with size or colour selectors and asks whether their structured data uses ProductGroup, hasVariant or isVariantOf. Our free score runs it on your own product pages, with the other 48 checks.
Published . Last updated . More in Structured data and product feeds and the guide library.
Related guides
- Structured data and product feeds
Product structured data for AI shopping agents: the complete JSON-LD guide
Valid JSON-LD for Product, Offer, AggregateRating, MerchantReturnPolicy, OfferShippingDetails and ProductGroup, and how AI shopping agents use it.
Updated · 16 min read
- Structured data and product feeds
GTIN, MPN and SKU: product identifiers that let AI agents match you to the right product
Which product identifiers AI shopping agents and feeds expect, what to do for own-label goods with no GTIN, and what our scan of 99 retailers found.
Updated · 11 min read
- Structured data and product feeds
Product feeds for AI shopping: ChatGPT, Google AI Mode, Copilot and Perplexity
How your catalogue reaches ChatGPT, Google AI Mode and Gemini, Microsoft Copilot and Perplexity in October 2026: feed routes, markets and a feed checklist.
Updated · 13 min read