İçeriğe geç

Flow variables

Managing shared values used in flows from one place.

Variables are the values your flows read and write: the name a customer gives, the product they pick, an order number from an app, or a store address that stays the same in every flow. You put a variable into messages and step fields through its placeholder, and when the flow runs the value replaces the placeholder. You manage variables in one place on Bot flows › Variables.

Variable types

TypeWhat it’s for
Flow onlyWhat it’s forUsed only in the chosen flow; each chat carries its own value. For answers the customer gives in this flow.
Per contactWhat it’s forUsed in every flow; the value is stored per contact. For remembering in one flow what you learned in another.
ConstantWhat it’s forThe same value in every flow, such as the store address or support hours.
On contact cardWhat it’s forWorks like per contact, and the value also shows on the contact card.
SecretWhat it’s forStored encrypted and never shown again; only resolved in the Send HTTP request step. For API keys and passwords.
SystemWhat it’s forFilled during the chat and can’t be edited. For example {{var_system.user_input}} is the customer’s last message, {{var_system.user_name}} their name, {{var_system.channel}} the channel and {{var_system.date}} today’s date.
TestWhat it’s forThe output of steps you tested in the editor; you don’t create these yourself.

Add a variable

  1. On Variables, select Add variable.
  2. Choose the Type.
  3. Enter a Name (for example “Order number”). The short name and placeholder are made from it and can’t be changed later.
  4. For Flow only, pick the flow in Flow.
  5. Choose the Data type (Text, Number or JSON) and, if you like, a Default value. It’s used until the flow sets a value. For Secret, you get a Secret value field instead.
  6. Select Save variable.

You can also create a variable from inside the editor: in a step’s Save result field (Save the reply in question steps), select New variable, type its name and select Create. A variable created this way belongs to that flow only.

Use a variable

  • The placeholder is made of the variable’s type and short name: a flow-only variable named “Order number” becomes {{var_local.order-number}}. The variable’s page shows the exact form in the Placeholder box.
  • In message and step fields, the Insert variable button lists variables by type and adds the placeholder of the one you pick.
  • Question steps write the customer’s answer, and other steps write their result (such as a ChatGPT reply or a row found in a sheet), to the variable you choose.
  • In Condition and Router steps, you compare a variable with a value to branch the flow.

The variable’s page

Click a variable in the list to open its page:

  • Placeholder: what you write in messages.
  • Default value: change it and select Save value. A number variable needs a number, and a JSON variable needs valid JSON.
  • Secret value: the stored value isn’t shown; enter a new one and select Replace secret value.
  • Flows using it: flows that use the variable in their draft or live version.
  • Delete variable: deletes the variable and the values stored on contacts. This can’t be undone.

Common questions

Frequently asked

A variable that’s used in a flow can’t be deleted. Remove it from the flows under Flows using it, then delete it.
You can’t. For security, the value is never shown after it’s saved. Enter a new value and select Replace secret value.
It’s a flow-only variable, so it only shows in its own flow. To carry a value between flows, use a Per contact or On contact card variable. If one flow calls another with Run flow and return, you can also pass values through the step’s mapping fields.

Didn’t find what you need?

Write to us; we’ll look into it and update these guides if needed.

Send an email