Skip to main content

Order communication with actions

In the context of orders, an action is a message you send to Engage to tell it to do something based on the data in an individual order you've already saved in the system. In practice, it allows you to be sure that an order is ready and in the state you want before you tell Engage to use the data in it, for example to trigger an automation to send an email.

The endpoint used is:

POST /api/v3/orders/{orderId}/action

You'll use the orderId of the order in question. The payload you'll send looks like this:

{
  "action": "ConfirmOrder",
  "versionTag": "IXUA3ril8XnZJKUMSfP7dg==",
  "language": "en-US",
  "data": {
    "custom": "data",
    "list": [
      "data1",
      "data2"
    ]
  }
}

action: You determine what is in this string.

versionTag: Sent back when Engage has successfully processed the latest update to your order.

data: Whatever you need the automation trigger to have access to.

Here you can see the data flow for orders and order communication:

orders-communication-pattern.svg

Response codes

If the action has been accepted, you'll get a HTTP 202 Request has been accepted response. Otherwise, one of these:

  • 400: Bad request

  • 404: Order not found or VersionTag did not match the order

  • 422: Order has no contact