Skip to main content
POST
/
webhooks
/
on-timeout
Webhook - When a timeout occurs in the conversation
curl --request POST \
  --url https://yourdomain.com/webhooks/on-timeout \
  --header 'Content-Type: application/json' \
  --data '{
  "country_code": "+57",
  "cellphone": "3161234567",
  "session_id": "abcsderfwer3252432423-1324325235",
  "conversation_id": 1234,
  "question": {
    "type": "open",
    "text": "Hello world"
  },
  "timeout_at": "2021-10-07 08:53:22.572123",
  "user_session_keys": [
    {
      "key": "age",
      "value": "18",
      "type": null
    },
    {
      "key": "user_id",
      "value": "12345",
      "type": null
    }
  ]
}'
{}
You can also configure the response webhook for the path that exits from a node in case of timeout, also known as alternate flow. Configure timeout node webhook If you do this, the HTTP request body that is sent to the endpoint configured in Treble will add the following field to the request body:
{
    "timeout_at": "2021-10-07 08:53:22.572123"
}
The response can also have new variables for the session that can be updated or created for later use in the session. That is, you can add them in the webhook response as part of the user_session_keys.

Body

application/json

Information of the timeout event

Event that is triggered when a timeout occurs in the conversation (the user does not respond within the established time)

country_code
string
required

Country code of the user

cellphone
string
required

User's phone number without the country code

session_id
string
required

ID of the user's session

conversation_id
integer
required

ID of the conversation

question
object
required

Question that did not receive a response in time

timeout_at
string<date-time>
required

Date and time when the timeout occurred

user_session_keys
object[]
required

User session keys collected during the conversation or provided during the deployment

Response

200 - application/json

Response to update or add information to the session

JSON object with the new information that will be replaced or added to the session for future use. The service must respond in less than 10 seconds.

I