Variables
Store values such as a customer's email or an order status in variables, and use them in AI agents, workflows, canned responses and macros.
Variables hold values during a conversation, for example a customer’s email. AI agents, workflows, canned responses and macros can all read them.
Open them from Settings → Data & Developer → Variables.
What a variable is
A variable is a named value that agents, workflows and tools can read and change during a conversation. Each variable has a display name, for example “Order ID”, and a system name in curly braces, for example {order_id}.
Variables come from several places:
| Source | Examples |
|---|---|
| Built in | {chat_history}, {last_user_message}, {user_email}, {user_phone_number}, {chat_id}, {user_language}, and ticket fields for each helpdesk |
| Created by you | Global variables you add on the Variables page |
| Entities | Each entity creates a variable that holds the extracted value |
| Credentials | Each credential creates a variable that inserts the secret |
| Properties | Ticket and conversation properties |
A variable’s value lasts for one workflow run or conversation. To keep details about a customer between conversations, use user attributes.
Use a variable
Type { in any field that accepts variables, for example an API URL, and pick the variable from the list. When the step runs, Robylon replaces it with the current value.
To use one field from an API response, save it to its own variable with Capture Response on the API or tool: enter a Path, for example response.orders[0].status, and pick the variable under Save to Variable. Paths use Jinja syntax and can also read status_code.
Create a global variable
Open Variables
Go to Settings → Data & Developer → Variables and click Add Variable.
Name and describe it
Enter a Display Name and a Description. Robylon creates the system name from the display name, in lower case with underscores, so “Order ID” becomes {order_id}. Names must be unique.
Choose the input type
Under Agent Input Type, choose Free Text or Choice (dropdown). An agent is prompted to enter this value when it uses the variable, and with a dropdown it picks from your options.
Set a default value
Under Set to, choose Value for a fixed default or Expression for a calculated one. For a JSON object, start and end the value with curly braces. For a list of strings, put each string in double quotes.
Save
Click Save. The variable is now available in all workflows and automations.
Agent Input Type decides how a teammate fills in the variable. When a teammate uses a canned response or macro that contains it, they are asked for the value before sending: Free Text lets them type any value, and Choice shows a dropdown of the options you set.