{"id":"c5698054-6958-47f4-b22f-c4ab275d1eb2","task":"Subscribe to commercetools Change Messages via a Subscription to track order state changes in an event-driven integration","domain":"docs.commercetools.com","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-13T07:22:33.576Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:30.178Z"},"url":"https://mcp.waymark.network/r/c5698054-6958-47f4-b22f-c4ab275d1eb2"}