XooCode(){

TypeAndQuantityNode

TypeAndQuantityNode is a tiny but indispensable StructuredValue: it represents a quantity-of-something inside a bundle, offer, or order. Think of it as "N units of product X, for business function Y, measured in unit Z."

It has 5 direct properties:

  • amountOfThisGood (Number): how many.
  • typeOfGood (Product or Service): what.
  • unitCode: UN/CEFACT code for the unit of measure.
  • unitText: human label.
  • businessFunction: the GoodRelations BusinessFunction (Sell, LeaseOut, Rent, ConstructionInstallation, Dispose, etc.).

Full example of schema.org/TypeAndQuantityNode json-ld markup

The markup is verified as valid with Rich Results Test from Google.

Highlight legend:Required by GoogleRecommendedOptional
schema.org/TypeAndQuantityNode
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Offer",
  "itemOffered": { "@type": "Product", "name": "Xoo Code Starter Kit", "sku": "XOO-KIT-01" },
  "price": 62.00,
  "priceCurrency": "USD",
  "includesObject": [
    {
      "@type": "TypeAndQuantityNode",
      "amountOfThisGood": 3,
      "unitCode": "C62",
      "unitText": "item",
      "typeOfGood": { "@type": "Product", "name": "XooTee Classic", "sku": "XOO-TEE-CLASSIC" },
      "businessFunction": "https://purl.org/goodrelations/v1#Sell"
    },
    {
      "@type": "TypeAndQuantityNode",
      "amountOfThisGood": 1,
      "unitCode": "C62",
      "unitText": "item",
      "typeOfGood": { "@type": "Product", "name": "XooMug", "sku": "XOO-MUG-STD" },
      "businessFunction": "https://purl.org/goodrelations/v1#Sell"
    },
    {
      "@type": "TypeAndQuantityNode",
      "amountOfThisGood": 12,
      "unitCode": "C62",
      "unitText": "sticker",
      "typeOfGood": { "@type": "Product", "name": "Xoo Code Vinyl Sticker", "sku": "XOO-STK-001" },
      "businessFunction": "https://purl.org/goodrelations/v1#Sell"
    }
  ]
}
</script>

Where it appears

  • Offer.includesObject / Demand.includesObject: describe what is inside a bundle offer.
  • Order.orderedItem: component line items of an order.
  • Product.includesObject: the contents of a product bundle.

It is the cleanest way to express "a starter kit that includes 3 XooTees, 1 XooMug, and 12 stickers."

Minimal valid version

The smallest markup that still produces a valid TypeAndQuantityNode entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.

schema.org/TypeAndQuantityNode (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "TypeAndQuantityNode",
  "amountOfThisGood": 3,
  "unitCode": "C62",
  "typeOfGood": { "@type": "Product", "name": "XooTee Classic" },
  "businessFunction": "https://purl.org/goodrelations/v1#Sell"
}
</script>

Google rich results this unlocks

Markup matching this example makes your page eligible for the following Google Search rich results. The primary target drives the required / recommended property classification in the advanced code block above.

  • No dedicated rich result (used by bundle, cart, and order consumers)
    Google docs

Common TypeAndQuantityNode mistakes

Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.

  1. 01

    TypeAndQuantityNode without amountOfThisGood

    Wrong
    typeOfGood present, amountOfThisGood omitted
    Right
    amountOfThisGood is the whole point: how many of typeOfGood are in the bundle/order

    Without a quantity the node is just a product reference with extra wrapping. Always populate amountOfThisGood.

  2. 02

    Using TypeAndQuantityNode when a QuantitativeValue would do

    Wrong
    TypeAndQuantityNode for 500 g of coffee as a weight
    Right
    QuantitativeValue for pure weights and measures; TypeAndQuantityNode for bundle component counts

    The two types overlap slightly. Use TypeAndQuantityNode when you are pairing a typeOfGood with a count; use QuantitativeValue for standalone measurements.

  3. 03

    businessFunction omitted on bundle components

    Wrong
    TypeAndQuantityNode with no businessFunction
    Right
    Set businessFunction to Sell / LeaseOut / Rent depending on how the component ships

    A single bundle can mix sold items and leased items (e.g. a router + a subscription). Omitting businessFunction collapses the distinction.

Also mentioned in 1 other example

TypeAndQuantityNode also appears in ProductCollection. See the full TypeAndQuantityNode schema page for every reference.

About the example data

Xoo Code's Starter Kit bundle: three XooTee Classics, one XooMug, twelve Xoo stickers, all sold together.

Comments

Loading comments...

Leave a comment