XooCode(){

UpdateAction

UpdateAction is an Action subtype for modifying a collection or entity: adding, deleting, replacing, appending, inserting, liking, disliking. Direct subtypes are AddAction (with AppendAction, InsertAction, LikeAction, DislikeAction, PrependAction), DeleteAction, and ReplaceAction. It adds two properties: collection (the collection being updated) and targetCollection (an alternative wire name).

UpdateAction subtypes are most useful in activity streams and cart APIs. Shop integrations often express cart add/remove as AddAction/DeleteAction with the cart as targetCollection and the line item as object.

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

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

Highlight legend:Required by GoogleRecommendedOptional
schema.org/UpdateAction
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "AddAction",
  "name": "Added XooTee Classic to cart",
  "agent": { "@type": "Person", "name": "Shopper" },
  "object": { "@type": "Product", "name": "XooTee Classic" },
  "targetCollection": { "@type": "ItemList", "name": "Shopping cart", "url": "https://xoocode.com/shop/cart" },
  "startTime": "2026-04-14T10:24:00-06:00",
  "actionStatus": "https://schema.org/CompletedActionStatus"
}
</script>

Minimal valid version

The smallest markup that still produces a valid UpdateAction 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/UpdateAction (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "AddAction",
  "agent": { "@type": "Person", "name": "Shopper" },
  "object": { "@type": "Product", "name": "XooTee Classic" },
  "targetCollection": { "@type": "ItemList", "name": "Shopping cart" }
}
</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.

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

    UpdateAction without a collection or targetCollection

    Wrong
    AddAction with only agent and object
    Right
    Declare the collection being updated via targetCollection (or collection)

    The whole point of UpdateAction is that something is being added to or removed from a collection. Consumers that read AddAction without a collection can't tell what collection was updated.

About the example data

Adding XooTee Classic to a shopping cart on the Xoo Code Shop Dunmore checkout flow.

Comments

Loading comments...

Leave a comment