Learn how to personalize your agent’s responses using dynamic variables
Add dynamic variables in your prompts
Test your dynamic variables
Configure agent-level default dynamic variables
Implement in production
retell_llm_dynamic_variables
field. Note that all values must be strings:
Important: All values in retell_llm_dynamic_variables
must be strings. Numbers, booleans, or other data types are
not supported.
Variable | Description | Example |
---|---|---|
{{current_agent_state}} | Current state name (for multi-state agents) | “greeting” |
{{previous_agent_state}} | Previous state name | ”qualification” |
{{current_time}} | Current time in America/Los_Angeles | ”Thursday, March 28, 2024 at 11:46:04 PM PST” |
{{current_time_[timezone]}} | Current time in specified timezone , for example: {{current_time_Australia/Sydney}} | ”Thursday, March 28, 2024 at 11:46:04 PM AEDT” |
{{current_calendar}} | 14-day calendar in America/Los_Angeles | ”Thursday, March 28, 2024 PST (Today) Friday, March 29, 2024 PST … Wednesday, April 10, 2024 PST” |
{{current_calendar_[timezone]}} | 14-day calendar in specified timezone , for example: {{current_calendar_Australia/Sydney}} | ”Thursday, March 28, 2024 AEDT (Today) Friday, March 29, 2024 AEDT … Wednesday, April 10, 2024 AEDT” |
{{call_type}} | Call type, web_call or phone_call | ”phone_call” |
Variable | Description | Example |
---|---|---|
{{direction}} | Call direction, inbound or outbound | ”inbound” |
{{user_number}} | User’s phone number (from_number for inbound, to_number for outbound) | “+12137771234” |
{{agent_number}} | Agent’s phone number (to_number for inbound, from_number for outbound) | “+12137771235” |
"Hello {{user_name}}, how can I help you today?"
user_name
is not set: "Hello {{user_name}}, how can I help you today?"
{{variable_name}}
) rather than being replaced with an empty string or causing an error.
{{user_name}} contains {{
. This would evaluate to true if it’s not set.{{user_name}} is not set (have curly braces around it)
.