Create a Subscription via POST /subscriptions with a destination (e.g., AWS SQS or Google Cloud Pub/Sub) specifying credentials and queue URL/topic ARN
Set the messages array to include the resourceTypeId (e.g., order) and specific types like OrderStateChanged, OrderLineItemAdded to filter noise
Validate the subscription is active by reading it back — commercetools will send a test message to the queue on creation; confirm it arrives to verify connectivity
In your consumer, parse the message envelope: check type to distinguish ResourceCreated, ResourceUpdated, and specific message payloads; use the sequenceNumber to detect out-of-order delivery
Handle at-least-once delivery: use the id field of each message as an idempotency key and store processed IDs to skip duplicates
Known gotchas
Subscriptions to SQS require the queue policy to allow the commercetools AWS account principal to send messages; missing this IAM policy causes silent subscription test message failures without a clear error from the API
Not all resource change types emit rich Change Messages with before/after state — some emit only ResourceUpdated with a minimal payload; check the commercetools change message reference for which types carry full diff data
Subscription delivery can be delayed under high platform load; design consumers to tolerate latency and never assume a message arrives within a fixed SLA for time-sensitive workflows
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp