Skip to main content
Variables enable you to personalize agent prompts and messages with dynamic data. RevRing provides system variables automatically and supports custom variables that you can set through the API or webhooks.

Variable Types

RevRing supports three types of variables:
  • System Variables: Automatically provided for every call with contextual information
  • Default Variables: Static variables you configure on the agent that apply to all calls
  • Dynamic Variables: Call-specific variables set per outbound call or via pre-call webhook for inbound calls
Variables merge with the following priority: system variables are set first, then default variables are applied, and finally dynamic variables can override both system and default variables.

System Variables

System variables are automatically available in every call and provide contextual information about the call itself. System variables are always available for you to use in your agent’s prompt and first message.

Example Usage

Default Variables

Default variables are static values you configure on your agent that apply to every call. These are useful for consistent information like business name, hours, or policies.

Setting Default Variables

Configure default variables via the Update Agent API:
These variables will be available in your prompt as {{business_name}}, {{business_hours}}, and {{support_email}}.

Example Prompt with Default Variables

Dynamic Variables

Dynamic variables are set on a per-call basis and override default variables. The method for setting them differs between outbound and inbound calls.

For Outbound Calls

Set dynamic variables when sending an outbound call via the Send Call API:

For Inbound Calls

Set dynamic variables by returning them from your pre-call webhook. See the Webhooks guide for implementation details. Your webhook receives caller information and returns variables:

Complete Example

Here’s a comprehensive example showing all variable types in action:

Agent Configuration

Default Variables (via API):
Prompt:
First Message:

Setting Dynamic Variables

For outbound calls:
For inbound calls (pre-call webhook response):

Where Variables Are Substituted

{{variable}} placeholders are replaced in all of the following fields:
  • Agent prompt
  • First message
  • Voicemail message
  • Warm transfer fields: hold message, summary instructions (the briefing spoken to the person you transfer to), and intro message
Substitution uses the variables available on that specific call: system variables, the agent’s default variables, and the per-call variables you send. A placeholder whose variable is not set on the call is left exactly as typed (for example {{external_id}} stays visible), so missing data is easy to spot rather than silently disappearing. Make sure every variable referenced in these fields is supplied on each call.

First Message

The first message is the line your agent speaks when the call connects. It has two modes, controlled by the firstMessageMode field on the agent.

Static (default)

The agent speaks the firstMessage text exactly as written. It supports {{variables}}, just like the prompt:
Leave firstMessage empty to have the agent wait for the caller to speak first.

Dynamic

Set firstMessageMode to dynamic and the agent generates its opening line from the prompt instead of speaking a fixed string. This is useful when a single agent handles both inbound and outbound calls and needs a different greeting for each, since the {{direction}} system variable is available in the prompt:
Enable it via the API:
In dynamic mode the firstMessage text is ignored. To return to a fixed greeting, set firstMessageMode back to static (or null).

Working with Timezones

RevRing automatically handles timezone conversion for you. The {{current_time}} system variable is formatted in your agent’s configured timezone, and the {{timezone}} variable contains the IANA timezone identifier.

Setting Agent Timezone

Configure your agent’s timezone via the API when creating or updating an agent:
Or set it through the RevRing dashboard in your agent’s configuration.

Using Timezone in Prompts

Both {{current_time}} and {{timezone}} are automatically available as system variables:

Timezone Format

Use IANA timezone identifiers (e.g., America/New_York, Europe/London, Asia/Tokyo) as they handle daylight saving time automatically. Common timezone identifiers:
  • US Eastern: America/New_York
  • US Central: America/Chicago
  • US Mountain: America/Denver
  • US Pacific: America/Los_Angeles
  • UK: Europe/London
  • Central Europe: Europe/Paris
  • India: Asia/Kolkata
  • Australia (Sydney): Australia/Sydney

Complete Example

Set your agent’s timezone to match your business location or primary customer base. For businesses serving multiple timezones, you can create separate agents for different regions, or override the system variables on a per-call basis when sending or receiving a call.
The {{current_time}} variable is formatted in a human-readable format like “Wednesday, November 26, 2025 at 8:30:00 PM EST” to make it easy for the AI to understand and communicate naturally.

Best Practices

Use descriptive variable names like customer_name instead of name to avoid confusion when debugging transcripts.
System variables like {{direction}} and {{current_time}} are particularly useful for context-aware prompts that behave differently for inbound vs outbound calls.
Dynamic variables override default variables. If you set a default variable and also pass it dynamically, the dynamic value will be used for that call.