Skip to content

Connect

Variables

Personalize messages with data from webhooks, API calls, earlier answers and AI agents.

Syntax at a glance#

WriteInsertsWhere it comes from
{{#path.to.field}}A field from incoming data, at any depthCatch Hook data, HTTP GET responses
{{#items[0].sku}}One item of a listSame, with the index in brackets
#keyA top-level field (shorthand)Same
{{@step_name}}The customer's answer to a stepEarlier Chat Builder steps
#cphone, #channel, #nowSystem valuesOfficely
{{AgentName.field}}A schema field from an AI stepAI Flows

In the editor, type # or @ in a message to pick a variable from a list.

Data from Catch Hook and HTTP#

Suppose your system sends this data with a Catch Hook request:

data
{
  "order": {
    "id": "3234379",
    "items": [{ "sku": "TSHIRT-M", "qty": 2 }]
  },
  "customer": { "name": "Noa" },
  "coupon": "SPRING10"
}

Use dots for nested fields and brackets for list items:

Message
Hi {{#customer.name}}! Order {{#order.id}} has shipped.
First item: {{#order.items[0].sku}} x {{#order.items[0].qty}}
Your next-order code: #coupon

The customer receives: Hi Noa! Order 3234379 has shipped. First item: TSHIRT-M x 2. Your next-order code: SPRING10.

An HTTP GET step works the same way: the fields of its response (or of its data field, if it has one) become variables for the rest of the conversation.

System variables#

VariableValue
#cphoneThe customer's phone number
#channelThe channel the conversation is on: meta (official API), green (QR), web (website widget) or tapi (legacy connection)
#nowThe current date and time, as dd/mm/yyyy hh:mm

Answers from earlier steps#

Every step that waits for a reply stores the answer under the step's name. Insert it with {{@step_name}} (or the shorthand @step_name):

Message
Thanks {{@full_name}}! We'll email {{@email}} within one business day.

Answers are also sent to your systems by HTTP steps, so you can save a lead to your CRM at the end of a flow.

AI flow variables#

Inside an AI flow, steps reference each other by name in double braces:

WriteInserts
{{AgentName}}The full output of a step
{{AgentName.field}}One field of a step that answers with a schema
{{Knowledge.context}}The passages a Knowledge step found
{{question}}The customer's latest message
{{chat_history}}The conversation so far
Prompt of an Answer step
Use only this context to answer:
{{Knowledge.context}}

The customer asked: {{question}}
Detected intent: {{Classify.intent}}

Type @ in a prompt to pick from the available fields. If a referenced variable doesn't exist when the step runs, the step stops with a Missing placeholders error, so check names after renaming a step.