Post-call variables
Complete catalog of template variables available for prompts, CRM pre-fetch params, and post-call push mapping.
This is the full catalog of namespaces and fields the template engine resolves. Use it when building post-call push key_mapper templates, opening messages, prompts, and CRM pre-fetch params.
The variable set is assembled by the API service (one path for post-call results, another for live prompts).
Resolution rules
- Explicit namespace (
{{result.recording_url}}) always resolves directly. - Flat fallback (
{{CUSTOMERNAME}}) tries an exact match, then strips any prefix and searches a fixed, limited order:system.→crm.→call.. It does not reachresult.*,analysis.*, orqc.*. Always namespace those explicitly. drop_unresolveddiffers by context:- In prompts/opening messages, an unresolved
{{...}}is left as a literal so mistakes are visible. - In the post-call push, templates render with
drop_unresolved=true: unresolved tokens become empty strings (""), not literals. A typo silently sends blank.
- In prompts/opening messages, an unresolved
call.* — call / connected-event variables
Every field from the stored connected event (campaign CSV columns, dialout variables, internal _campaign_* fields), plus captured SIP headers.
| Variable | Meaning |
|---|---|
call.<any_field> | Any column/variable supplied via CSV or the dialout API (e.g. call.CUSTOMERNAME, call.due_amount). |
call.sip_header_<name> | An individual filtered SIP X-header captured at call setup (subject to the bot's sip_header_config). |
call.sip_headers_json | All captured SIP headers as a single JSON object string, for CRM echo-back. |
crm.* — CRM pre-fetch variables
Fields returned by the bot's CRM pre-fetch call, flattened into the crm. namespace.
| Variable | Meaning |
|---|---|
crm.<field> | Any field from the CRM pre-fetch response (e.g. crm.due_amount). |
system.* — system-generated values
Current date/time in the bot's timezone.
| Variable | Example |
|---|---|
system.current_date | 05 June 2026 |
system.current_time | 03:45 PM IST |
system.current_datetime | 05 June 2026, 03:45 PM IST |
system.timezone | Asia/Kolkata |
result.* — system call outcome
Always present after the call completes.
| Variable | Meaning |
|---|---|
result.call_id | The call's session id. |
result.recording_url | Stable public recording URL (per-call access token, not a raw signed URL). |
result.call_duration_seconds | Rounded call duration. |
result.disconnected_by | Raw disconnect reason (bot, customer, voicemail, RNR, timeout, error, etc.). |
result.disposition | Coarse mapped status (Connected / Failed / Unknown). |
result.call_start_time | Formatted start time (bot timezone). |
result.call_end_time | Formatted end time (bot timezone). |
result.call_answer_time | Formatted answer time (same as start on transports that do not report answer separately). |
result.transcript | Formatted transcript as a JSON array (sender, message, timestamp). |
Transfer-state fields
Populated whenever the bot called the transfer tool; empty otherwise.
| Variable | Meaning |
|---|---|
result.was_transferred | yes only if the transfer actually committed (no later failure); else no. |
result.transfer_destination | Destination value the call was transferred to. |
result.transfer_target | Target label/id selected. |
result.transfer_reason | Reason the bot gave for transferring. |
result.transfer_method | websocket_reverse_transfer or livekit_sip_refer. |
result.transfer_at | Seconds into the call when the transfer occurred. |
result.transfer_failed_reason | Failure reason when a transfer was attempted but did not commit. |
analysis.* — LLM post-call analysis
All keys are always present (default empty string) so a mapped template never sends a literal token. Some keys are domain-specific (collections / insurance).
| Variable | Meaning |
|---|---|
analysis.DISPOSITION | Business disposition. |
analysis.SUB_DISPOSITION | Sub-disposition. |
analysis.PAID_AMOUNT | Amount paid/committed (collections). |
analysis.FOLLOUP_PTP_DATE | Promise-to-pay date (key name spelled FOLLOUP_PTP_DATE in code). |
analysis.ptp_time | Promise-to-pay time. |
analysis.callback_date | Callback date extracted from the conversation. |
analysis.callback_time | Callback time extracted from the conversation. |
analysis.rpc_verified | Whether the right party was contacted/verified. |
analysis.voicemail_flow_detected | Whether a voicemail flow was detected. |
analysis.language | Detected/used language. |
analysis.dispute_reason | Dispute reason, if any. |
analysis.CALLING_REMARKS | Free-text calling remarks. |
analysis.call_summary | Short summary of the call. |
FOLLOUP_PTP_DATE is spelled exactly that way (with the typo) in code — map it verbatim.
When callback detection is active, the analysis also carries the callback keys described in Callbacks: callback_requested, callback_preferred_time_text, callback_reason, callback_confidence.
qc.* — QC analysis
All keys default to empty string.
| Variable | Meaning |
|---|---|
qc.empathy_score | Empathy score. |
qc.compliance_score | Compliance score. |
qc.overall_score | Overall QC score. |
qc.remarks | QC remarks. |
Mapping checklist
- Use explicit namespaces for
result.*,analysis.*,qc.*— flat fallback will not reach them. - Map
FOLLOUP_PTP_DATEexactly (the misspelling is intentional in code). - Remember post-call push drops unresolved tokens to
""— verify the actual payload after a test call. - Send
{{result.recording_url}}(stable token URL), never a raw signed S3 URL.