Post-Call Workflows
Post-call workflows (Dashboard → Workflows → Post Call) run your own API calls after every call ends — update a CRM, send a WhatsApp message, alert a channel. Each workflow gets the same payload as an outbound webhook (call.completed or call.failed), so you can:
- put any payload field into an API action's URL, headers, or body with a
{{variable}}, and - run the workflow only for some calls with Run only when… conditions.
Both use the same names: a condition field is the variable without the braces.
| In an action | In a condition | |
|---|---|---|
| Payload field | {{data.status}} | data.status is failed |
| Nested field | {{data.call_analytics.sentiment}} | data.call_analytics.sentiment is positive |
| Your field | {{lead_source}} | lead_source is Website |
| Call variable | {{call_status}} | call_status is no_answer |
You don't need a webhook endpoint for this. The full list of fields, their types, and when they're empty is in the outbound webhooks Payload Schema. This page explains how to use them.
How Variables Work
Write {{ + the field's path + }}. The path is the field's position in the payload, the same as in the webhook Complete Example:
| In the payload | Variable | Example value (completed call) | Example value (failed call) |
|---|---|---|---|
event_type | {{event_type}} | call.completed | call.failed |
data.status | {{data.status}} | completed | failed |
data.call_id | {{data.call_id}} | d926a4b2-… | ea55890f-… |
data.call_direction | {{data.call_direction}} | inbound | outbound |
data.call_from / data.call_to | {{data.call_from}} / {{data.call_to}} | +919800000001 / (empty) | +918000000002 / +919800000001 |
data.call_duration_seconds | {{data.call_duration_seconds}} | 10 | (empty) |
data.agent_name | {{data.agent_name}} | Neha | Neha |
data.contact_name / data.contact_email | {{data.contact_name}} / {{data.contact_email}} | Jordan / jordan@example.com | Jordan / jordan@example.com |
data.call_analytics.summary | {{data.call_analytics.summary}} | The agent called about… | (empty) |
data.call_analytics.sentiment | {{data.call_analytics.sentiment}} | neutral | (empty) |
data.call_analytics.disposition | {{data.call_analytics.disposition}} | conversation_complete | (empty) |
data.extracted_details.<key> | see Your own fields | ||
data.custom_data.<key> | see Your own fields | ||
data.call_recording | {{data.call_recording}} | recording link | (empty) |
| (the whole payload) | {{payload}} | the full JSON | the full JSON |
- The
data.prefix is optional.{{call_analytics.summary}}and{{data.call_analytics.summary}}are the same. - Empty values. A field that is
nullon this call (e.g.call_analytics.summaryon a failed call) becomes an empty string, and so does a variable or path that doesn't exist at all — the same as in the agent prompt. A flat variable (such as{{user_name}}or one of your own fields) with a default value on the agent's Variables tab uses that default instead;{{data.*}}paths are never defaulted. If a value is unexpectedly blank in what your API received, check the spelling. - Objects become JSON.
{{data.call_analytics}}inserts the whole object, e.g.{"summary":"…","sentiment":"neutral",…}. {{payload}}as the entire request body forwards exactly what a webhook would receive.
In the workflow editor, the button next to each field lists every variable, grouped like the payload.
Example — post a short summary to your CRM:
{
"phone": "{{user_number}}",
"outcome": "{{data.status}}",
"disposition": "{{data.call_analytics.disposition}}",
"notes": "{{data.call_analytics.summary}}"
}
Your Own Fields
Two kinds of fields have keys that you decide, so the docs can't list them.
Your fields (custom_data) | extracted_details | |
|---|---|---|
| What it holds | Data you attached to the call before it was placed | Facts the agent picked up during the conversation |
| Where the keys come from | The additional_info object when creating a call via the API or an inbound webhook, the extra columns of a campaign CSV, or the mapped columns of a Google Sheets trigger | What the agent extracted from the call — keys can differ from call to call |
| Variable | {{<field name>}} — e.g. {{lead_source}} | {{data.extracted_details.<key>}} |
| On failed calls | Still present — the values you sent in | null — every variable under it is empty |
Your fields: {{field_name}}
Every field you send with the call is a variable on its own, exactly like in the agent prompt. The name is the field's key lowercased, with spaces turned into _:
| You sent | Variable |
|---|---|
"crm_lead_id": "LEAD-2291" | {{crm_lead_id}} |
CSV column Recruiter Name | {{recruiter_name}} |
CSV column Client name | {{client_name}} |
The name you type inside {{ }} is normalized the same way, so {{Recruiter Name}} works too.
- Duplicates: if two fields end up with the same name (e.g. CSV columns
Planandplan), the first one is used and the others are ignored. - Same name as a call variable: a field with the same name as one of the call variables — say an
additional_infokeyuser_nameor a CSV columnCall Status— replaces the computed value. A blank field never does, andcall_idis always the call's own ID. - Original keys: the payload's
data.custom_datakeeps your keys exactly as sent, so{{data.custom_data.Recruiter Name}}also works (case-sensitive, by path).
Example — pass your own IDs in additional_info when you create the call:
{
"agent_id": "agent_123",
"user_number": "+919800000001",
"additional_info": {
"CRM Lead ID": "LEAD-2291",
"campaign": "Diwali Offer"
}
}
Then write the result back to the right CRM record:
PUT https://crm.example.com/leads/{{crm_lead_id}}
{
"last_call_outcome": "{{data.status}}",
"last_call_summary": "{{data.call_analytics.summary}}",
"campaign": "{{campaign}}"
}
extracted_details: {{data.extracted_details.<key>}}
Say your lead-qualification agent extracts a budget, a timeline, and whether the lead is interested. A completed call's payload contains:
"extracted_details": {
"budget": "45000",
"timeline": "next month",
"interested": "yes"
}
Use the keys in an API action body:
{
"lead_budget": "{{data.extracted_details.budget}}",
"timeline": "{{data.extracted_details.timeline}}",
"interested": "{{data.extracted_details.interested}}"
}
Extracted keys are only reachable through the data.extracted_details. path — never as a bare {{budget}} — so an AI-chosen key can never clash with one of your fields. A call where the customer never mentioned a timeline has no timeline key, and {{data.extracted_details.timeline}} is empty. If the action should only run when the key is there, add a condition: data.extracted_details.timeline has a value.
Finding your keys
- Your fields — the keys you send: your
additional_infokeys, your campaign CSV's column headers, or your trigger's mapped columns. In the campaign editor, hover a column header to see its variable name. extracted_details— open a completed call in the Dashboard and look at its extracted details, or, if you have an outbound webhook, any delivery in Dashboard → Webhooks → Deliveries shows the full payload.
A key that contains a . can't be referenced by path, because . separates the levels. Use {{payload}} or the whole object ({{data.extracted_details}}) instead.
Call Variables
These short names are filled in on every post-call run. They're the same names the agent prompt and during-call workflows use:
| Variable | Meaning |
|---|---|
{{user_number}} | The contact's number whatever the direction — call_from on inbound calls, call_to on outbound. Prefer this over call_from / call_to. |
{{user_phone_country_code}} / {{user_phone_without_country_code}} | The contact's number split into +91 and 9800000001, for APIs that want them separately. {{user_phone_with_country_code}} is the same as {{user_number}}. |
{{user_name}} / {{user_email}} | data.contact_name / data.contact_email |
{{agent_name}} / {{agent_number}} | data.agent_name / the agent's own number on this call |
{{call_status}} | The raw call outcome — completed, failed, busy, no_answer, … (not in the payload; see Conditions). |
{{call_outcome}} | data.status (completed or failed) |
{{call_summary}} | data.call_analytics.summary |
{{call_duration}} | data.call_duration_seconds (0 instead of empty on failed calls) |
{{call_id}} | data.call_id |
{{recording_url}} | Link to the call in the Dashboard (requires login) |
A variable name is looked up in this order: the call variables above, then your fields, then a payload path. Use the data. form to be explicit about a payload field.
Conditions
By default a post-call workflow runs after every call. Add conditions under Run only when… to run it only for matching calls.
A condition field is written exactly like a variable, without the {{ }}, and it gets the same value that variable would. Anything you can use in an action — a payload field, one of your fields, or a call variable — works in a condition:
| Variable | Condition field |
|---|---|
{{data.status}} | data.status |
{{data.call_analytics.disposition}} | data.call_analytics.disposition |
{{data.extracted_details.interested}} | data.extracted_details.interested |
{{client_name}} | client_name |
{{call_status}} | call_status |
As with variables, the data. prefix is optional — status and data.status are the same condition.
data.status or call_status?
| Field | Values | Use it when |
|---|---|---|
data.status | completed or failed | You want "did the call connect?" — failed covers no answer, busy, and errors. Use this in most cases. |
call_status | completed, answered, failed, busy, no_answer | You need one specific outcome. A no-answer call has call_status = no_answer, not failed. |
Common conditions:
| Condition | Use case |
|---|---|
data.status is failed | Every call that didn't connect — send to a retry list or alert channel. |
call_status is one of busy, no_answer | Only unanswered / busy calls, e.g. send a "sorry we missed you" SMS. |
data.call_analytics.disposition is appointment_booked | Push booked appointments to your CRM. |
data.call_duration_seconds > 30 | Skip very short or dropped calls. |
data.extracted_details.interested is yes | Follow up only with interested leads. |
client_name is Mphasis | Different handling per client or campaign. |
Text comparisons are case-insensitive, and numbers stored as text (e.g. "45") compare as numbers. Combine several conditions with all (AND) or any (OR).
call_recording and call_transcript are signed links valid for 5 minutes from when the workflow runs — a system that stores the link will end up with a dead one. Enable Public Call Share for stable links, or use {{data.call_details_url}} (available when Public Call Share is on).