Workflows
System variables
The values Proto fills in for every message – the person, the chat, your AI agent and the channel.
Proto fills these in for every message. Their names start with _, so they never clash with yours.
| Variable | What it holds |
|---|---|
_user_input | The person’s latest message – text, or the file they sent |
_user_input_files | The files in the person’s latest message |
_lang | The chat’s language, such as en |
_customer | The person: name, email, phone_number, location, tags and custom_fields, by field name |
_chat | This chat: id, custom_fields by field name, and who closed it – is_closed_by_chatbot, is_closed_by_agent and is_closed_by_user |
_chatbot | Your AI agent: id and name |
_channel | The channel: id and type |
_extra | Values your website passed in – see Values from your website |
_new_ticket | The ticket from the last Create ticket |
For example: Hi {_customer.name} or _customer.custom_fields.Plan == "Gold".
custom_fields only holds fields that have a value. For a field name with spaces, which needs square brackets, check it’s there first: "Plan type" in _customer.custom_fields and _customer.custom_fields["Plan type"] == "Gold".
Some actions also leave details in a system variable when something goes wrong – such as _json_api_error for Send API. Each action’s page lists them.