Documentation
Automation

Builder Variables

Store runtime data and reusable configuration for automation funnels.

Builder variables let blocks read customer context, reuse configuration, and store values during a funnel run.

Variable Types

TypePrefixBehavior
Systemsys.Provided automatically from the current client, chat, operator, and message. Read-only.
Funnelfunnel.Runtime data that blocks can read and update during the current funnel run.
Environmentenv.Reusable configuration for the funnel. Read-only in expressions.

Funnel Variables

Create a funnel variable when the workflow needs to remember a decision, score, identifier, list, or intermediate response.

Examples:

funnel.lead_score
funnel.payment_status
funnel.api_response
funnel.answers

Funnel variables support these value types:

  • string for text;
  • number for numeric values;
  • boolean for true or false;
  • array for a JSON array.

A default value is optional. Use the Set variable block to update a funnel variable. Arrays can be read and processed with expression functions such as join, count, first, and contains.

Funnel variable keys must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. A key can be up to 64 characters long. For example, funnel.retry_count is valid.

Environment Variables

Environment variables are useful for values reused by several blocks, such as a region code, API URL, or campaign identifier.

env.REGION_CODE
env.API_URL

Treat environment variables as configuration rather than runtime state. They cannot be changed by builder blocks.

Environment variables support string, number, and JSON array values. Boolean values are not supported. Names must start with an uppercase letter and contain only uppercase letters, numbers, and underscores; names can be up to 64 characters long. For example, env.API_URL is valid.

System Variables

System values are available without creating a variable. Common examples include:

sys.client.name
sys.client.customfield.language
sys.chat.id
sys.chat.channel
sys.message.text
sys.operator.id
sys.message.has_media
sys.execution.trigger
sys.date

Builder expressions also provide the current UTC time as sys.time and sys.datetime, and the current run details as sys.execution.id and sys.execution.trigger. See Expression Language for the full system variable list.

Set Variable Sources

The Set variable block can use:

  • a manual value;
  • a system variable;
  • another funnel variable;
  • an expression.

Example expression:

sys.client.name ~ " - " ~ env.REGION_CODE

For complete syntax, functions, conditions, and naming rules, see Expression Language.

On this page