Post-Call Webhook
Post-Call Webhook
Add a webhook URL to the request in order to receive information after the call.
Setting up a Webhook
- Specify the Webhook URL: In your API request body, include the
external_webhook_urlkey with the URL of your webhook receiver. - Test with the webhook: For development and testing purposes, you can use webhook.site to simulate receiving webhook data.
API Request Example
Include the following key-value pair in your API request body:
Webhook Response Example
Upon completion of the call, the webhook URL will receive a response like the following. In this case, the agent has three information extractor actions to get information after the call is completed.
Call Status options
The call object in the webhook response contains a status field which can have various values, each indicating a different state of the phone call. Below is a table explaining these statuses:
End Call Reason options
This end_call_reason parameter provides insight into the reason why a call ended:
When a call ends due to a custom end-call reason, the response also includes a custom_end_call_reason field with the specific condition that triggered the termination (e.g., "Customer is being abusive").
Post-Call Analytics
The analysis object contains automated quality assessments generated after every call. Each field evaluates a specific aspect of the conversation and returns one of the following values:
true— the criterion was metfalse— the criterion was not metpartial— the criterion was partially met (only for fields that support it)not_applicableornull— the criterion does not apply to this call
Every field also has a corresponding _feedback field (e.g. persona_feedback) that provides a short explanation when the result is not true. Feedback is empty when the criterion is fully met or not applicable.
Aggregate Fields
Collected Variables
The collected_variables field contains the collected variables (slots) from your conversation flow. This allows you to access user-provided information programmatically.
The object contains the variable names as keys, with each variable having:
Example:
Only variables with collected: true are included in the response. System variables and variables with collected: false are filtered out.