Dynamic variables let you personalize assistant messages by embedding placeholders using double curly braces (e.g., {{name}}) in your system prompt or any message.
Setting custom variable values is done via assistantOverrides.variableValues when initiating a call through the API — you cannot set them directly in the dashboard.
{
"assistantId": "your-assistant-id",
"assistantOverrides": {
"variableValues": {
"name": "John"
}
},
"customer": {
"number": "+1xxxxxxxxxx"
},
"phoneNumberId": "your-phone-id"
}
Default (built-in) variables are automatically populated and don't need to be set manually:
| Variable | Description | Example |
|---|
{{now}} | Current date and time (UTC) | Jan 1, 2024 12:00 PM |
{{date}} | Current date (UTC) | Jan 1, 2024 |
{{time}} | Current time (UTC) | 12:00 PM |
{{customer.number}} | The customer's phone number | +1xxxxxxxxxx |
{{phoneNumber.number}} | The Sulus phone number used | +1xxxxxxxxxx |
{{call.id}} | Unique Sulus call ID | 5fe26c8e-... |
{{call.type}} | Type of call | inboundPhoneCall / outboundPhoneCall / webCall |
{{transport.conversationType}} | Channel type | chat / voice |
Advanced date/time formatting is supported via LiquidJS filters:
{{"now" | date: "%A, %B %d, %Y, %I:%M %p", "America/Los_Angeles"}}
→ Monday, January 01, 2024, 03:45 PM
You can also use LiquidJS conditionals to branch prompt behavior based on variables:
{% if transport.conversationType == "chat" -%}
- Use Markdown formatting for lists
{%- elsif transport.conversationType == "voice" -%}
- Never use Markdown format; write everything as if it is being said aloud
{%- endif -%}