Workflows
Variables
Store what a person tells you, or what an action finds, and use it later in the chat.
A variable holds a value for the rest of the chat – such as the person’s email address from Ask survey, or an order from Send API. Later actions can put it in a message, test it in a Branch or send it to your systems.
Where variables come from
| Action | Setting | What it holds |
|---|---|---|
| Ask survey | Chat variable name | The person’s answer |
| Set variable | Variable name | Any value you work out |
| Send API | Resulting variable | The response from your system |
| LLM Processing | Resulting variable | The text the model writes |
| SQL Query | Resulting variable | The rows the query returns |
| Auto fill field | Variable name | The custom fields it changed |
| Auto team match | Save output into variable | The team it matched |
| Collect feedback | Set chat variable, Create variable | The rating and answers |
Proto also fills in system variables for you, such as the person’s name, and your website can pass in values it already knows.
A variable lasts until the chat ends. It isn’t shared with the person’s other chats – to keep a value, save it in a custom field.
Naming rules
- Use letters, numbers and underscores, and start with a letter, such as
order_number. - Names that start with
_are kept for system variables. - Some words can’t be names, because they mean something in expressions – such as
if,and,or,not,TrueandNone.
Use a variable
There are two kinds of field, and they use variables differently:
| Field | How you write a variable | See |
|---|---|---|
| Text, such as a message | In single curly brackets: {order_number} | Variables in text |
| Expression, such as a Branch condition | On its own: order_number | Variables in expressions |