XooCode(){

TradeAction

TradeAction is an Action subtype for commerce verbs: buying, selling, ordering, paying, donating, renting, tipping. Direct subtypes are BuyAction, SellAction, OrderAction, PayAction, DonateAction, RentAction, TipAction, PreOrderAction, and QuoteAction. It adds three properties: price, priceCurrency, and priceSpecification.

TradeAction subtypes are almost always more useful than bare TradeAction. BuyAction appears on Products to express a purchase path. OrderAction appears in Gmail order confirmations. DonateAction appears on non-profit pages. The choice communicates intent to consumers.

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

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

Highlight legend:Required by GoogleRecommendedOptional
schema.org/TradeAction
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BuyAction",
  "name": "Bought XooTee Classic from Xoo Code Shop Dunmore",
  "agent": { "@type": "Person", "name": "Dana Crook" },
  "object": { "@type": "Product", "name": "XooTee Classic", "url": "https://xoocode.com/shop/xootee-classic" },
  "price": "39.95",
  "priceCurrency": "CAD",
  "startTime": "2024-10-29T13:22:00-06:00",
  "actionStatus": "https://schema.org/CompletedActionStatus",
  "result": { "@type": "Order", "orderNumber": "XT-2024-1042" }
}
</script>

Minimal valid version

The smallest markup that still produces a valid TradeAction 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/TradeAction (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BuyAction",
  "agent": { "@type": "Person", "name": "Dana Crook" },
  "object": { "@type": "Product", "name": "XooTee Classic" },
  "price": "39.95",
  "priceCurrency": "CAD"
}
</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 (Offer drives Product pricing)
    Google docs

Common TradeAction 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

    TradeAction duplicating Offer pricing

    Wrong
    BuyAction on every Product page with the same price as the Offer
    Right
    Use Offer for on-page commerce markup; reserve TradeAction subtypes for activity streams and email confirmations

    Google's Product rich result reads Offer.price and Offer.priceCurrency. A parallel BuyAction on the same page adds noise without changing what Google renders.

About the example data

A customer purchasing XooTee Classic from the Xoo Code Shop Dunmore, the scenario behind the full Offer example.

Comments

Loading comments...

Leave a comment