Overview
When creating custom metrics, you can use variables from call data using the{{variable_name}}
syntax. These variables come from different sources depending on the context.
Variable Sources
1. Call Information
System-provided call data:{{transcript}}
- Full transcript{{call_end_reason}}
- Call Ended Reason
Transcript Example
Transcript Example
2. Metadata
Available in both Run (simulations) and CallLog (observability).3. Dynamic Variables
Only available when calls created via API withdynamic_variables
.
Using Variables in Metrics
When creating metrics, you can reference these variables directly in your metric configuration. Here’s how it looks in the interface:
Key Points
- Variables are case-sensitive:
{{user_name}}
≠{{User_Name}}
- Not all variables exist in every call - handle missing values
- You can directly use the key from
dynamic_variables
ormetadata
in metric (e.g.,{{user_name}}
,{{ringing_duration}}
)