Skip to content
Docs

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

ActionSettingWhat it holds
Ask surveyChat variable nameThe person’s answer
Set variableVariable nameAny value you work out
Send APIResulting variableThe response from your system
LLM ProcessingResulting variableThe text the model writes
SQL QueryResulting variableThe rows the query returns
Auto fill fieldVariable nameThe custom fields it changed
Auto team matchSave output into variableThe team it matched
Collect feedbackSet chat variable, Create variableThe 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, True and None.

Use a variable

There are two kinds of field, and they use variables differently:

FieldHow you write a variableSee
Text, such as a messageIn single curly brackets: {order_number}Variables in text
Expression, such as a Branch conditionOn its own: order_numberVariables in expressions

Stuck? Ask Advisor in the Proto dashboard, or contact us.

© Proto