Data Changed Event
Data changed events are triggered when any modifying operation is carried out on an entity. This is the most common event an integration to the THG Connect platform will be required to handle, this will allow workflows to be triggered on entities being created, updated or deleted.
Example
{ "id": "AQEBXbrH27EN4oVoO3UqfE7AHNRTO3/GSlZ9yMk1JrW1T3boAOc6Mh91IxJ5LzKhEAsJ5BvnyYPnaz7nh8kyVJXJWiLHv4sbWnSmmtEe8xYKmpePc+zAhdvA8HdAd+aX0IA0FCjyXo3sZf/YXyyAXK6LfiKfU5y/oT4W8sZDOiXlRufuIdzcDCpxF2kH5Ge9c4z08WMXgYsXxvQP9fJHDLmPNXXe67zyBfLeo0SMvShQQ96qz8XO2OSjHJ4xtE5PVmR9eCMIolH1JVDi2OGPY/ugxuD9my9T+BYKJIBJnrLfgRGldtS30gpog5BSZPCyMXCIGqRMTlQdDcosxbiqSybculhCHZ5qLbKlXDBX+egc1turNAtpTesWMOECZfT8XjDshEu5KJp3jU2ToWWyVfp2K+dIdNTNYt46nHxMdNvZhcWiC/IvaBJZVSnfjwQRFeII", "type": "DataChangedEvent", "attributes": { "id": "d91063ad-8164-419b-8fe5-4368f4416f34", "type": "thg-commerce:site", "version": "1", "attributes": { "siteName": "will test site 5", "domainName": "https://will-site.test" }, "links": null, "meta": { "product": "thg-commerce", "reference": "thg:thg-commerce:site:thgcommerce@d91063ad-8164-419b-8fe5-4368f4416f34", "createdAt": "2025-04-23T09:22:11.530782", "updatedAt": "2025-04-23T09:28:23.013937", "status": { "site-status": { "value": "APPROVED" } }, "owner": "thgcommerce", "creator": "thgaltitude" } }, "meta": { "receiptHandle": "AQEBXbrH27EN4oVoO3UqfE7AHNRTO3/GSlZ9yMk1JrW1T3boAOc6Mh91IxJ5LzKhEAsJ5BvnyYPnaz7nh8kyVJXJWiLHv4sbWnSmmtEe8xYKmpePc+zAhdvA8HdAd+aX0IA0FCjyXo3sZf/YXyyAXK6LfiKfU5y/oT4W8sZDOiXlRufuIdzcDCpxF2kH5Ge9c4z08WMXgYsXxvQP9fJHDLmPNXXe67zyBfLeo0SMvShQQ96qz8XO2OSjHJ4xtE5PVmR9eCMIolH1JVDi2OGPY/ugxuD9my9T+BYKJIBJnrLfgRGldtS30gpog5BSZPCyMXCIGqRMTlQdDcosxbiqSybculhCHZ5qLbKlXDBX+egc1turNAtpTesWMOECZfT8XjDshEu5KJp3jU2ToWWyVfp2K+dIdNTNYt46nHxMdNvZhcWiC/IvaBJZVSnfjwQRFeII", "subscriptionId": "WillSiteSubscription", "method": "update" }}
Breakdown
Metadata
KEY | DESCRIPTION |
---|---|
method | This is the operation carried out on the entity to trigger the data changed event, e.g. create, update, delete |
receiptHandle | This is the unique id of th event, and is the ID used to confirm an event, removing it from the queue |
subscriptionId | Unique ID of the subscription the event is from |
Data
This is the payload of the entity after the operation was carried out. The payload will conform to the entity type and version defined in the metadata.