+84917212969
VIET SEO / INSIGHTS

E-commerce Schema for Products, Variants, Pricing and Shipping

Learn how to implement product and variant JSON-LD for Shopify, WooCommerce or a headless storefront, and keep prices, stock, shipping and reviews consistent with the product page and merchant feed.
Written by Viet SEO Team Updated: 6 views
E-commerce Schema for Products, Variants, Pricing and Shipping

E-commerce schema describes products, variants, prices, stock status, shipping and reviews in a format search engines can read. Start with what shoppers see on the product page, then keep that information consistent across JSON-LD and your Merchant Center feed if you use one.

This guide is for store owners, developers and SEO teams working with Shopify, WooCommerce or a headless storefront. The examples use fictional product data.

1. Choose the right markup for each product

Data Schema.org markup Implementation check
Product identity Product, Brand, sku, gtin Use the correct name, image, description and identifiers for the item. Publish a GTIN only when you have a valid one for that item.
Price and stock Offer, price, priceCurrency, availability Match the displayed price and currency. Map inventory to the actual purchase state, such as InStock, OutOfStock, PreOrder or BackOrder.
Variants ProductGroup, variesBy, hasVariant Use a separate Product for each modeled variant and attach its own Offer where applicable.
Shipping OfferShippingDetails under Offer.shippingDetails Map shippingDestination and shippingRate to actual rules. Use deliveryTime for supported handling and transit details.
Reviews AggregateRating, Review Use genuine, visible product reviews and the rating count for the product being marked up.

Google documents separate requirements for product snippets and merchant listings. Start with the requirements for your intended search feature. For a page that sells a product, verify the product image and offer data against the merchant listing guide. Add a price expiry date only when the displayed offer has a known end date.

Google product snippet documentation · Google merchant listing documentation

2. Put markup on the right pages

  • Product detail pages. Publish product markup on pages dedicated to a single product or variants of that product. Keep the offer URL aligned with the purchasable selection it describes.
  • Category pages. Use ItemList if you need to describe the visible list. Link shoppers to product detail pages for complete product and offer information.
  • Cart, checkout and order confirmation. Keep customer-specific order data within the transaction workflow. Omit customer contact details, addresses and payment data from public JSON-LD.
  • Sitemap and Merchant Center feed. Use the sitemap to help crawlers discover URLs. Use the merchant feed for catalog attributes and channel-specific data. Keep both the feed and product pages tied to the same pricing and inventory rules.

3. Model variants with ProductGroup and JSON-LD

The example uses one product detail page with two selectable color variants. Each variant has its own SKU, image, URL and offer. The URLs, prices and stock states are illustrative.

{
  "@context": "https://schema.org",
  "@type": "ProductGroup",
  "@id": "https://example.com/products/trail-bottle#group",
  "name": "Trail Bottle",
  "productGroupID": "TB-750",
  "brand": {"@type": "Brand", "name": "Example Outdoor"},
  "variesBy": "https://schema.org/color",
  "hasVariant": [
    {
      "@type": "Product",
      "@id": "https://example.com/products/trail-bottle?color=blue#product",
      "name": "Trail Bottle, Blue",
      "sku": "TB-750-BLU",
      "color": "Blue",
      "image": "https://example.com/images/trail-bottle-blue.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/products/trail-bottle?color=blue",
        "price": 24.90,
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock"
      }
    },
    {
      "@type": "Product",
      "@id": "https://example.com/products/trail-bottle?color=black#product",
      "name": "Trail Bottle, Black",
      "sku": "TB-750-BLK",
      "color": "Black",
      "image": "https://example.com/images/trail-bottle-black.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/products/trail-bottle?color=black",
        "price": 26.90,
        "priceCurrency": "USD",
        "availability": "https://schema.org/OutOfStock"
      }
    }
  ]
}
  • Single product page with a variant selector. Use one canonical group page. Make each variant directly selectable through a distinct URL that opens with the correct image, price and stock state.
  • Separate variant pages. If each variant has a dedicated indexable page, use the appropriate canonical for that page and keep the group identifier consistent across related variants. Follow the multi-page markup pattern for the entities available on each page.
  • Multiple languages or markets. Use reciprocal hreflang annotations for equivalent localized URLs where applicable. Check canonical URLs separately. Keep the offer currency, availability and shipping rules accurate for each market.

Google product variant documentation

4. Map fields and assign ownership before deployment

  1. Inventory the data sources. Identify who owns catalog identifiers, storefront prices, stock statuses, shipping rules and reviews. Record which fields still need confirmation.
  2. Write the field mapping. For each property, document its source, transformation, fallback and test case. For example, map a product that can be ordered before release to PreOrder only if the storefront allows that action.
  3. Identify the markup producer. On Shopify or WooCommerce, inspect the rendered output from themes, plugins and apps for competing Product entities. On a headless storefront, generate JSON-LD from the same data used to render the product and offer. Prefer including it in the initial HTML when feasible.
  4. Plan the update path. Verify that a promotion, stock change or shipping update reaches the UI, JSON-LD and merchant feed within the agreed refresh windows. Include cache invalidation in the test plan.

5. Validate before launch and spot-check production

  1. Check the JSON syntax and vocabulary with Schema Markup Validator. Use Google Rich Results Test to inspect eligibility for supported Google features. Use code mode when staging is access-restricted.
  2. Test a standard product, a discounted item, an out-of-stock variant and a market with distinct shipping rules. Compare the displayed information, rendered JSON-LD and merchant feed for each case.
  3. Open variant URLs directly and confirm that they select the expected product, price and availability. Check that markup, canonicals and localized alternates match the page architecture.
  4. After launch, retest representative live URLs. Review the relevant Search Console enhancement reports and Merchant Center diagnostics where available. Record the tested URLs, results, owners and remaining fixes.

6. Use structured data alongside clear product information

For AEO and GEO work, keep common buying questions easy to answer from the product page itself. Make price, availability, delivery regions and review context visible. Structured data can describe those facts in machine-readable form. Treat rich result eligibility and AI citation as separate outcomes and measure each with its own evidence.

Before signing off, confirm that the selected variant, displayed price, stock state and shipping terms agree across the storefront, structured data and feed. Repeat these checks after major template, inventory or pricing changes.

Expert Q&A

Questions & Comments

You can ask a question about this article. Viet SEO will review and reply after moderation.

No questions yet. Be the first to ask.

Your question will be reviewed before being published.

CAPTCHA
Chat Zalo VietSEO