Variables

Variables let your bot remember what the customer said and reuse it: "Thanks {name}, your order {order_id} ships tomorrow." Each customer's variables live in their own session.

Using a variable

Write {variable_name} inside any block's text — messages, questions, prompts, links, even HTTP request URLs and bodies. The engine replaces it with the customer's value at send time. If a variable was never set, the placeholder stays visible as {variable_name} so you notice it in testing instead of silently sending an empty gap.

Setting variables

Collection blocks save the customer's answer automatically:

BlockVariable
Collect Info / Collect Number / Set Variable / Save Notethe field name you choose
Collect Email / Phone / Address{email} / {phone} / {address}
Order Status / Tracking Link / Appointment / Feedback{orderId} / {trackingId} / {appointmentTime} / {feedback}
Any menu (Menu, Quick Replies, Language, Lead Qualification){choice} — plus {menu_choice}-style per type, and {language} for the Language Router
CSAT Rating{rating} (1–5)
Tag Customerappends to {tags} (comma-separated)
Human Handoff{handoff} = "true"
HTTP Request / API stepthe field you choose (default {apiResult}); on failure {apiResult_error}

Auto-collect: missing variables ask for themselves

If a block is about to show a {var} nobody collected yet, the bot pauses and asks for it first — "Before we continue — please share your delivery address:" — saves the answer under that name, then runs the block as intended. This means you can reference {name} in a Booking Confirm without wiring a Collect block first; the engine fills the gap. The same applies to a Condition block on an unset variable: it asks instead of silently branching false.

Custom blocks get the same treatment: a {var} used in a Block Lab step is auto-collected up front unless another step in that same block provides it (an ask or set step, or an API step's saved result). So a "say" step reading "Hey {name}!" asks for the name before greeting, while a variable the block asks for later is left for that step to collect.

Branching on variables

The Condition block compares a variable to a value with equals or contains (both case-insensitive) and branches: port 0 when true, port 1 when false. Combine with menu choices — e.g. after a menu, {choice} contains "veg" → route to the vegetarian menu.

Session lifetime

A customer's position and variables persist across messages (and across server restarts) for 12 hours of inactivity. A Goodbye block clears everything immediately; the customer's next message starts a fresh conversation at Welcome.