Picture a shopper asking an AI tool for a waterproof rain jacket in navy, size medium, in stock. Your shop sells that jacket in three colors and four sizes. If your page carries one block of code for the jacket as a whole, with one price and one stock status, the tool cannot tell which color is in stock, which size costs more, or whether the navy medium even exists. It has to guess, and a guess about stock is a guess that costs you an order. Variants need their own facts, tied together so the tool knows they belong to one product.

The tool Google and schema.org provide for this is called a ProductGroup. The group is the jacket as a whole. Inside it, each variant is its own Product, with its own price, its own stock status, and its own address. This guide shows how that shape works, when to use it, and the mistakes that break it.

It changes nothing your customers see. It lives in the code behind the page. It speaks a shared vocabulary from schema.org, so Google, Bing, and AI tools can all read the same block.

The example business here is a clothing shop selling a rain jacket. Swap in your own business, product, and web address.

The shape: one group, many products

A ProductGroup represents a group of products that vary only in certain well described ways, such as by size, color, or material. The group itself is not directly offered for sale. The variants inside it are the things a shopper can buy. The group holds what every variant shares, like the name, the brand, and the description, so you do not have to repeat those facts twelve times. Each variant holds what differs: its size, its color, its own price, and its own stock status.

Google says to use the ProductGroup class with the properties variesBy, hasVariant, and productGroupID to group variants together, in addition to Product structured data. Adding this markup also makes your products eligible for display with variant information in merchant listing experiences.

Here is a complete example for one jacket in three variants. The group holds the shared facts. Each variant holds its own offer.

code
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "ProductGroup",
  "name": "Harbor Rain Jacket",
  "description": "A waterproof rain jacket with a hood and sealed seams, for wet weather walking.",
  "url": "https://example-shop.com/products/harbor-rain-jacket",
  "brand": {
    "@type": "Brand",
    "name": "Harbor Outdoor Clothing"
  },
  "productGroupID": "HRJ-100",
  "variesBy": [
    "https://schema.org/size",
    "https://schema.org/color"
  ],
  "hasVariant": [
    {
      "@type": "Product",
      "name": "Harbor Rain Jacket, Navy, Medium",
      "sku": "HRJ-100-NVY-M",
      "color": "Navy",
      "size": "Medium",
      "image": "https://example-shop.com/images/harbor-jacket-navy.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example-shop.com/products/harbor-rain-jacket?size=medium&color=navy",
        "price": "89.00",
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    },
    {
      "@type": "Product",
      "name": "Harbor Rain Jacket, Navy, Large",
      "sku": "HRJ-100-NVY-L",
      "color": "Navy",
      "size": "Large",
      "image": "https://example-shop.com/images/harbor-jacket-navy.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example-shop.com/products/harbor-rain-jacket?size=large&color=navy",
        "price": "89.00",
        "priceCurrency": "USD",
        "availability": "https://schema.org/OutOfStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    },
    {
      "@type": "Product",
      "name": "Harbor Rain Jacket, Forest, Medium",
      "sku": "HRJ-100-FOR-M",
      "color": "Forest",
      "size": "Medium",
      "image": "https://example-shop.com/images/harbor-jacket-forest.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example-shop.com/products/harbor-rain-jacket?size=medium&color=forest",
        "price": "95.00",
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    }
  ]
}
</script>

What each part does, in plain terms:

One page or many pages

Google describes two ways shops lay out variants, and the markup follows the layout.

On a single page site, all variants are selectable on one page, usually through query values in the address, without a page reload. The group sits on that one page with all its variants nested inside it under hasVariant. That is the example above, and Google calls it the most compact and natural representation of a group and its variants.

On a multi page site, each variant has its own page. Then each variant page carries its own full Product block, and points back to the parent group with isVariantOf, or with inProductGroupWithID carrying the group identifier. The group itself is defined on its own, and each variant page links to it. Google also describes a version of the single page layout where the variants are defined separately from the group and linked the same way, which some shop systems find easier to generate.

Whichever layout you use, keep it consistent. Do not nest all variants on the main page and also give each variant its own page with a second, different group. Pick the layout that matches how your shop actually works, and make the code follow it.

One more layout rule matters for the single page case. When a shopper selects a variant on the page, the image, price, and availability shown on the page change, but the markup on the page does not change with each click. That is expected. The markup already lists every variant, so a tool reading the page gets all of them at once. What matters is that the address for each variant, when opened directly, shows the right image, the right price, and the right stock status, and lets the shopper add that exact variant to the cart.

Do not use AggregateOffer for variants

This is the mistake to avoid above all others. An AggregateOffer describes one product sold by many sellers, with a low price, a high price, and a seller count. It is not for sizes and colors. If you squeeze your variants into an AggregateOffer, their prices collapse into a range, and the per variant stock facts vanish. Those stock facts are exactly what a shopper asks about when they name a size and a color.

The same goes for putting a single Offer on the group itself. The group is not sold. Only its variants are. A price on the group tells a tool what the jacket costs in general, which is not a fact any shopper can act on. Give each variant its own Offer, and leave the group without one.

Shared facts go on the group, variant facts go on the variant

The group is also where shared facts live, which keeps the block shorter and easier to keep correct. Brand, description, material, pattern, and audience information that apply to every variant can sit on the group once, instead of being repeated inside every variant. Google says the group lets you specify common product properties for all variants, such as brand and review information, as well as the variant determining properties, which can reduce duplication.

Reviews need care here. If your shop collects reviews per variant, put them on the variant. If it collects reviews for the jacket as a whole, put the average on the group. Do not copy the same average onto every variant if the reviews were collected for the jacket as a whole and you cannot say how each variant scored. And do not invent a per variant average by splitting the group average. An average with no reviews behind it for that variant is a fact with nothing to back it.

The same split applies to the description. A common description sits on the group. A variant specific description, such as a note that the forest color runs slightly darker in person, sits on that variant. Keep the variant name and description specific to the variant, and the group name and description general.

Keep the code and the page on the same data

Variant markup fails most often when the code and the page drift apart. A size that sold out last week still shows InStock in the code. A color that was added to the page never made it into the hasVariant list. A price that changed on the page stayed old in one variant's offer.

Build the group from the same product data that renders the page, so a stock change updates the variant's availability at the same time, and a new variant appears in the code when it appears on the page. A block typed by hand and left alone will drift out of sync, and with variants the drift is multiplied: one stale variant is enough for a tool to recommend a jacket in a size you no longer carry.

Check for a block before you add one. Many themes and apps already write product markup, and some write a single Product for a variant page without any group at all. Open a product page, view the page source, and search for application/ld+json. If a block is already there, improve that block. Adding a second block beside it creates two competing sets of facts, and tools may pick one at random or drop both.

Test it before you trust it

Two free tools need no signup, and they check different things.

Google's Rich Results Test shows which variant fields Google finds on a page, with errors and warnings per field. Paste a product address and check that every variant appears, each with its own price and availability.

The Schema Markup Validator checks your JSON-LD against the schema.org vocabulary, which catches misspelled field names the Google tool may miss.

Run both on a few pages. Include a product with many variants, a product with only two, and a product where one variant is out of stock. Open each variant address directly as well, and confirm it shows the right image, the right price, and the right stock status. Validators will not tell you a stock value is stale or a variant is missing from the list. Only a comparison against your real catalog tells you that.

What variant markup alone cannot do

Markup makes your variants readable. It does not create variant pages, keep stock fresh as it changes, or let an AI tool finish a purchase. Those are separate jobs: catalog setup, monitoring, and checkout. It also does not guarantee a rich result. Google says it does not guarantee that structured data will show up in search results, and the same holds for AI tools: readable variants are a requirement for being quoted with confidence, not a promise of being quoted.

Start with a group that lists every variant honestly, then work through the rest.

Frequently Asked Questions

Do I need a ProductGroup if my product comes in one size and one color?

No. A single variant is just a Product with an Offer. Use a ProductGroup when a product genuinely comes in versions that differ by size, color, material, or a similar property.

Can I put one price on the group for all variants?

No. The group itself is not sold, so it should not carry an offer. Give each variant its own Product with its own Offer, price, and availability.

What is variesBy for?

It names the properties by which your variants differ, such as size and color, written as full schema.org addresses. Name only the properties that genuinely differ between your variants.

My variants live on separate pages. How do I link them?

Give each variant page its own full Product block, and point it back to the parent group with isVariantOf, or with inProductGroupWithID carrying the group identifier. Each variant page needs complete markup for what it shows.

Does variant markup guarantee my variants will show in search?

No. It makes your products eligible for display with variant information in merchant listing experiences. Google does not guarantee that structured data will show up in search results.