About This Event

The on_call_end webhook is triggered at the conclusion of a call in the Altur platform. This webhook provides detailed information about the call, the assistant involved, and the end user. Use this webhook to keep your backend or CRM updated with the latest call data.

Event Details

  • Trigger: Automatically triggered at the end of a call.
  • Purpose: To update your backend or CRM with call status, transcript, recording URL, and user information.

Request Details

  • HTTP Method: POST
  • Content Type: application/json
  • Endpoint: The URL you configure in your webhook integration settings.
  • Authentication: Includes the X-Altur-Signature header for HMAC verification.

Payload Example

Here’s an example of the payload sent with the on_call_end event:

{
  "type": "on_call_end",
  "id": "cll_gBoLtd02pUI50QwXkFjB",
  "status": "ended",
  "answered_by": "human",
  "transcript": [
    {
      "sent_by": "assistant",
      "sent_at": "2024-12-19T15:00:00Z",
      "content": "Hello am I speaking with Sofía?"
    },
    {
      "sent_by": "user",
      "sent_at": "2024-12-19T15:00:10Z",
      "content": "Yes, who is this?"
    }
  ],
  "recording_url": "https://api.altur.io/api/v1.0/call/cll_gBoLtd02pUI50QwXkFjB/recording",
  "assistant": {
    "id": "6cy951e6-9877-4d7c-88d7-56b4948d3cce",
    "nickname": "DebtCollectorBot",
    "name": "Diana Arroyo"
  },
  "end_user": {
    "id": "2be951e6-7798-47cd-878d-49b2918a3bba",
    "status": "converted",
    "display_name": "John Doe",
    "phone_number": "+521234567890",
    "context": "Customer data...",
    "extracted_data": {
      "Payment Amount": "1200",
      "Payment Date": "2024-12-26"
      "Payment Medium": "app"
    }
  }
}

Root Fields

FieldTypeDescription
typestringEvent type (on_call_end).
idstringUnique identifier for the call.
statusstringStatus of the call enum value (e.g., ended).
answered_bystringIndicates who answered the call (human, machine or unknown).
transcriptarrayCall transcript object.
recording_urlstringURL to download the call recording.

Assistant Object

FieldTypeDescription
iduuidUnique identifier for the assistant.
nicknamestringAssistant’s nickname.
namestringAssistant’s name.

End User Object

FieldTypeDescription
iduuidUnique identifier for the end user.
statusstringCurrent status of the user enum value (e.g., converted).
display_namestringDisplay name of the user.
phone_numberstringUser’s phone number (E.164 format).
contextstringAdditional user-specific information.
extracted_dataobjectKey-value pairs of extracted data.

Response Expectations

Your endpoint should return a 200 OK status code to confirm receipt of the webhook. For information on retry behavior in case of failures, see the Retry Policy section in the Webhook Overview.

Security

Each request includes an HMAC signature in the X-Altur-Signature header. Refer to the Securing Your Webhooks section for instructions on validating webhook requests.

Example Use Cases

  1. CRM Integration

    Use the on_call_end webhook to update call logs and user interaction data in your CRM system.

  2. Analytics

    Process transcripts and user status to generate insights or trigger follow-up actions.

  3. Data Enrichment

    Automatically store extracted data, like account numbers or due dates, in your system for further use.