Variable sources

Variables can come from:
SourceNamespaceExample
Campaign CSV / dialout APIcall.*{{call.CUSTOMERNAME}}
CRM pre-fetchcrm.*{{crm.due_amount}}
System-generated valuessystem.*{{system.current_date}}
Post-call result fieldsresult.*{{result.recording_url}}
LLM post-call analysisanalysis.*{{analysis.DISPOSITION}}
QC outputqc.*{{qc.empathy_score}}
The template engine also supports flat variables for common prompt authoring:
{{CUSTOMERNAME}}
{{due_amount}}
{{current_date}}
Flat lookup is a suffix fallback handled by the API service’s template renderer. It first tries an exact key match, then strips any namespace prefix and searches a fixed, limited set of namespaces in this order:
system.  →  crm.  →  call.
Flat fallback does not reach result.*, analysis.*, or qc.*. So {{DISPOSITION}} will not resolve to analysis.DISPOSITION — it returns empty (or the literal token, depending on context). Always use the explicit namespace for post-call values: {{analysis.DISPOSITION}}, {{result.recording_url}}, {{qc.empathy_score}}.
Namespaced variables always work and are safer when two sources contain the same field. Use flat variables in bot prompts when ops owns the mapping:
Hello {{CUSTOMERNAME}}, your pending amount is {{due_amount}}.
Use namespaced variables in technical mappings or when there is ambiguity:
{{crm.CUSTOMERNAME}}
{{call.phone_number}}
{{system.current_datetime}}

Campaign CSV variables

Campaign CSV must contain:
phone_number
Every other non-empty column becomes a variable for that call. Example:
phone_number,CUSTOMERNAME,due_amount,loan_bucket
+919999999999,Rajesh,50000,NPA-30
The bot can use:
{{CUSTOMERNAME}}
{{due_amount}}
{{loan_bucket}}

Unknown variables

Unknown tokens remain visible. This is intentional:
Hello {{unknown_field}}
If the bot speaks the curly braces, the field is missing or misspelled. Fix the CSV, CRM mapping, or prompt.

Post-call push mapping

For CRM push, map the CRM’s expected output keys to CX Bridge variables. Common values:
UseVariable
Recording URL{{result.recording_url}}
Call duration{{result.call_duration_seconds}}
Raw disconnect reason{{result.disconnected_by}}
Business disposition{{analysis.DISPOSITION}} or auto-disposition fields
QC remarks{{qc.remarks}}

Transfer-state variables

When the bot called the transfer tool, the result namespace carries native transfer state. These are always present (empty when no transfer happened), so they are safe to map unconditionally.
UseVariable
Whether transfer committed{{result.was_transferred}} (yes / no)
Destination value{{result.transfer_destination}}
Target label/id{{result.transfer_target}}
Reason given by bot{{result.transfer_reason}}
Method used{{result.transfer_method}}
Seconds into call when transferred{{result.transfer_at}}
Failure reason (if not committed){{result.transfer_failed_reason}}
For the full catalog of every namespace and field, see Post-call variables. Do not send raw S3 signed URLs directly to CRMs unless the deployment explicitly requires it. CXB API should expose stable recording access URLs.