Condition Node Webhook Request Body
This endpoint must be implemented on YOUR server (for example: https://tudominio.com/webhooks/on-condition). Treble will call this webhook when a conditional node is evaluated in the conversation. You must configure the URL of this webhook in the Treble admin panel.
You can also configure the response webhook for each path coming out of a condition node.
If you do this, the HTTP request body sent to the endpoint configured in Treble will add the following field in the request body:
The condition is an object with an operator
property to show which action was used in the condition and a value
for the condition action to be evaluated:
- Equal: EQ
- Different: DIFF
- Greater than: GT
- Less than: LT
- Greater than or equal to: GTEQ
- Less than or equal to: LTEQ
- Contains: CONT
- Does not contain: NCONT
- Default path: DEFAULT
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
Information about the condition evaluation event
Evento que se dispara cuando se evalúa un nodo condicional en la conversación
Response
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.