POST
/
webhooks
/
on-timeout
curl --request POST \
  --url https://tudominio.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 a node in case of timeout, also known as alternate flow.

If you do this, the HTTP request body sent to the endpoint configured in Treble will add the following field in 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

Información del evento de timeout

Evento que se dispara cuando ocurre un timeout en la conversación (el usuario no responde dentro del tiempo establecido)

Response

200 - application/json

Respuesta para actualizar o agregar información a la sesión

Objeto JSON con la nueva información que será reemplazada o agregada a la sesión para uso futuro. El servicio debe responder en menos de 10 segundos.