---
title: "How does ProductGroup schema declare sizes and variants for agents?"
description: "How to mark up sizes and colours with ProductGroup, hasVariant and variesBy, with a JSON-LD example and the six variesBy values Google supports."
canonical: https://autobasket.store/learn/sizes-and-variants-for-agents
---

1.  [Home](https://autobasket.store/)
2.  [Guides](https://autobasket.store/learn)
3.  How does ProductGroup schema declare sizes and variants for agents?

# How does ProductGroup schema declare sizes and variants for agents?

ProductGroup schema describes one model and lists its sizes or colours as variants, each with its own price, stock and URL. Google requires only a name on the group and recommends productGroupID, hasVariant and variesBy. Without it, a page with one price and a JavaScript size picker gives an agent no variant to confirm.

Guide, Discover, published 12 October 2026, updated 16 October 2026

## What is ProductGroup in schema.org?

`ProductGroup` represents “a group of Products that vary only in certain well-described ways” ([schema.org](https://schema.org/ProductGroup)). The group is the model, say a running shoe, and each size or colour is a `Product` linked to it, with its own SKU, identifier, price and availability.

Agents need this because the variant is their first filter. A person asks for “trail running shoes in size 43”, and before comparing any price the agent has to confirm that size 43 exists and can be delivered. On many shops the size picker is filled by JavaScript after the page loads, and the structured data describes one product with one price. An agent reading the page without running the script sees no sizes at all.

## Which properties does Google require and recommend?

Google requires only `name` on the `ProductGroup`. It recommends `productGroupID`, `hasVariant` and `variesBy`, and on the variant side accepts `inProductGroupWithID` or `isVariantOf` to point back at the group ([Google Search Central, updated 8 September 2026](https://developers.google.com/search/docs/appearance/structured-data/product-variants)).

| Property | Sits on | Status at Google | What it does |
| --- | --- | --- | --- |
| `name` | ProductGroup | Required | Names the model |
| `productGroupID` | ProductGroup | Recommended | The parent SKU shared by all variants |
| `variesBy` | ProductGroup | Recommended | Which attributes change across variants |
| `hasVariant` | ProductGroup | Recommended | Lists each variant `Product` |
| `isVariantOf` or `inProductGroupWithID` | Product | Alternative to `hasVariant` | Points a variant back at its group |
| `size`, `color`, `offers`, `gtin`, `sku` | Product | Per variant | The values an agent filters and compares on |

## Which values can variesBy take?

Google supports six: `https://schema.org/color`, `https://schema.org/size`, `https://schema.org/suggestedAge`, `https://schema.org/suggestedGender`, `https://schema.org/material` and `https://schema.org/pattern`. Use only those that actually change, so an agent knows what it can filter on.

## What does the JSON-LD look like?

Here is a shoe from an invented shop, sold in several EU sizes and shortened to two variants, one of them sold out. The names, numbers and URLs are placeholders:

```
{
  "@context": "https://schema.org",
  "@type": "ProductGroup",
  "name": "Alpine Trail 2 trail running shoe",
  "brand": { "@type": "Brand", "name": "Example Outdoor" },
  "productGroupID": "AT2",
  "variesBy": ["https://schema.org/size"],
  "hasVariant": [
    {
      "@type": "Product",
      "sku": "AT2-43",
      "gtin13": "7610000000017",
      "size": "EU 43",
      "url": "https://example.ch/alpine-trail-2?size=43",
      "offers": {
        "@type": "Offer",
        "price": "169.00",
        "priceCurrency": "CHF",
        "availability": "https://schema.org/InStock"
      }
    },
    {
      "@type": "Product",
      "sku": "AT2-44",
      "gtin13": "7610000000024",
      "size": "EU 44",
      "url": "https://example.ch/alpine-trail-2?size=44",
      "offers": {
        "@type": "Offer",
        "price": "169.00",
        "priceCurrency": "CHF",
        "availability": "https://schema.org/OutOfStock"
      }
    }
  ]
}
```

A size that sells out gets `OutOfStock` on its own offer, and the other sizes stay buyable. State the size system with the size, EU, UK or US, because “43” means nothing on its own.

## Does each variant need its own URL?

Yes. Google asks that each variant can be preselected through a distinct URL, such as a path or a query parameter, so an agent can send a person straight to size 43. On a single-page site all variants share one page and differ by parameter, while on a multi-page site each variant has its own page and the group is described on each of them.

Each variant also carries its own GTIN where the manufacturer assigned one. The [GTIN guide](https://autobasket.store/learn/why-agents-need-a-gtin) states that rule and what Merchant Center and OpenAI accept.

## How do variants work in a ChatGPT or Merchant Center feed?

Through a group ID that must match the markup. Merchant Center uses `item_group_id`. OpenAI’s feed uses a group ID, `item_group_id` in its Google-compatible format, which it lists as conditionally required for variants ([OpenAI feed spec](https://developers.openai.com/commerce/specs/feed)).

Use the same value as `productGroupID` in the JSON-LD, so the page, the Google feed and the OpenAI feed describe one group with the same sizes. Then validate the page in Google’s Rich Results Test and check Merchant Center diagnostics for variant errors.

## Where should a shop start?

With the products that sell in the most variants and bring the most revenue, usually footwear, clothing and anything sold by size. In our Romandie audit, 34 of 45 fashion, footwear and accessories shops lost the most agents at product data ([Romandie audit, July 2026](https://autobasket.store/use-cases/romandie-online-shops-agent-readiness)). The [fashion](https://autobasket.store/solutions/fashion-apparel) and [furniture](https://autobasket.store/solutions/home-furniture) pages show which variant fields matter in each category, and the [Machine Readability Sprint](https://autobasket.store/services/machine-readability-sprint) adds the markup to your templates.

## Where to read next

-   [Agentic commerce for fashion](https://autobasket.store/solutions/fashion-apparel)Which size and fit fields decide AI-assisted clothing purchases and returns.
-   [GTIN for AI shopping agents](https://autobasket.store/learn/why-agents-need-a-gtin)The identifier rule for each variant, and what Merchant Center and OpenAI ask for.
-   [Agent-ready online shop in seven days](https://autobasket.store/services/machine-readability-sprint)The sprint adds variant markup to the templates your platform already uses.

## Sources

1.  [Google Search Central, product variant structured data, updated 8 September 2026](https://developers.google.com/search/docs/appearance/structured-data/product-variants)
2.  [Schema.org ProductGroup type](https://schema.org/ProductGroup)
3.  [OpenAI developers, product feed specification](https://developers.openai.com/commerce/specs/feed)

## See how your own product pages score

Bring one of your product pages to a first conversation and we read it with you the way an agent does, which is the fastest way to turn what you just read into a ticket for your developers.

[Start selling smarter](https://autobasket.store/contact#session) [Read one product page first](https://autobasket.store/#readiness-scan)
