HTTP actions for AI Journeys

The HTTP action feature is a powerful tool that allows developers to integrate external services and APIs into their workflows. By leveraging HTTP requests, you can send data to and receive responses from third-party services, enhancing the capabilities of your AI Journey.

Creating a new HTTP action

To create an HTTP Action you will need to enter the following fields:

Method:
Choose the appropriate HTTP method (e.g., GET, POST, PUT, DELETE) depending on the action of your endpoint.

Endpoint:
Specify the URL of the external service or API you want to interact with.

Headers:
Add custom headers to your request, such as authentication tokens or content type specifications.

Parameters:
Include query parameters or request body data as needed for your specific API call.

Variables:
Utilize dynamic variables in your requests, such as Contact ID, Ticket ID, or custom profile fields, to personalize each API call.

Response behavior

Configure how your AI Journey handles the API response. Note that for every step, a status code in the 200 range is required, or else the AI Journey will fail.

There are currently three options:

Continue the workflow without using the response
The AI Journey will continue and will ignore the response.

Set custom ticket fields based on the response
Use the JSON response to set custom field values. The ID of the custom field can be found in the URL section, when managing custom fields in the admin.

[
  {
    "id": "custom_field_id",
    "value": "custom_field_value"
  },
  {
    "id": "another_custom_field_id",
    "value": "another_custom_field_value"
  }
]

Use the response to send an AI Message
Use the JSON response to send an AI message to the user.

{
  "ai_message": "Inform the user that their order is on its way."
}

Request logs

It is currently not possible to view a log of requests that were executed by the HTTP action, but this is planned for the future. We recommend utilizing your own incoming request logs, which should help with debugging issues.

Error handling and retries

When the endpoint responds with a status code that is not in the 200 range, we will automatically retry the request. Currently, we do this only 3 times with an incremental delay of up to 3 seconds. Afterward, the AI Journey will be marked as failed.

IP allowlisting and authentication

Because of the nature of our infrastructure, we are not able to provide a list of IP addresses used to make the HTTP requests. It is therefore not possible to allow incoming requests based on one of our IP addresses. For authentication, we advise sending authorization headers.