Introduction
Dynamic variables allow you to inject personalized data into your agent’s responses for each specific call. Using the{{variable_name}} syntax, you can create agents that adapt to different contexts while maintaining consistent conversation flows.
Common use cases
- Personalized greetings: “Hello
{{customer_name}}, I’m calling to confirm your interest in the{{form_type}}form” - Contextual responses: “I see you’re calling about order
{{order_number}}” - Time-sensitive information: Reference
{{appointment_date}}or{{deadline}}or{{current_time}}
Where variables work
Dynamic variables can be used in:- Agent prompt: Instructions and agent personality
- Initial greeting: Welcome message to the user
- Conversation nodes: Instructions in a specific node
Add and test variables
Add variables in your prompts
Dynamic variables are placeholders surrounded by double curly braces. For example:When typing in the prompt or greeting editor, typing 
{{ will display a menu with available variables.
Test your variables
Before publishing, you can test your variables using the test panel. The values you enter here will simulate the data you’ll receive in production.

Configure default values (optional)
The values you set in that panel when creating a version will be used as defaults if no other values are passed when making the call.
Important: All values in
dynamic_variables must be strings (text). Numbers, booleans, or other data types are not supported.System variables
Diga automatically provides these system variables - no configuration required:| Variable | Description | Example |
|---|---|---|
{{agent_name}} | Configured agent name | ”Sales Assistant” |
{{user_phone_number}} | User’s phone number | ”+14155551234” |
{{current_time}} | Current time in UTC | ”Friday, January 10, 2025 14:30:00 UTC” |
{{current_time[timezone]}} | Current time in specific timezone | ”Friday, January 10, 2025 09:30:00 EST” |
Timezone examples
To get the time in a specific timezone, use the syntax{{current_time[timezone]}}:
Variable precedence
When the same variable is defined in multiple places, the following priority applies (highest to lowest):- Call variables (highest priority): Specific values for each call
- Agent variables: Default values configured in the agent. These are the variables previously configured in the variables panel.
This means you can set default values at the agent level and override them for specific calls when needed.
Precedence example
Best practices
Define default values
Define default values
Configure default values at the agent level for frequently used variables. This prevents your prompts from showing empty variables.
Test with and without variables
Test with and without variables
Always test your agent both with defined variables and without them to ensure it handles both cases correctly.
Don't store sensitive data
Don't store sensitive data
Avoid storing sensitive information like passwords, API keys, or financial data in dynamic variables: