WhatsApp API Platform
Chatbot

Triggers & Variables

Configure what starts your chatbot, manage variables for data capture, and branch the flow with conditions.

Triggers determine when your chatbot activates. Variables store data during a conversation. Conditions control which path the flow follows. Together they make a chatbot responsive.


Triggers

A trigger defines what starts a chatbot. You choose the Trigger Type when you create the chatbot; for keyword-based types you also add keywords (type a word and press Enter to add it).

Create New Chatbot dialog with the Trigger Type dropdown and a keywords field

Trigger types

Trigger typeStarts when…Best for
Message ContainsThe message contains any of your keywords (case-insensitive)General welcome bots, broad topic matching
Exact MatchThe message exactly equals one of your keywordsButton replies, confirmations
Starts WithThe message begins with one of your keywordsCommand-style or prefixed inputs
RegexThe message matches a regular-expression patternOrder numbers, codes, structured input
First MessageA contact messages you for the very first timeOnboarding new contacts
Any MessageAny incoming message from the contactCatch-all assistants and fallbacks
WebhookAn external webhook call starts the flowTriggering from another system
ManualAn agent or automation starts it explicitlyInternally launched flows

Partial vs exact

"Contains" matches the keyword anywhere in the message, so order also matches "reorder". Use Exact Match or Starts With when you need precision.

Keep triggers specific

If two chatbots could match the same message, narrow them so they don't overlap — tighten keywords, prefer Exact Match or Starts With over Contains, and reserve First Message for onboarding. The chatbot's trigger type and keywords are shown on its card and in the Filters sidebar on the Chatbots page.


Variables

Variables store data during a conversation. Use them to capture customer input, pass data between nodes, and personalize messages.

Creating a variable

Any field that saves a value (an Ask Question answer, a form response, an HTTP response, a ticket number) lets you pick an existing variable or create one with the + button. Give it a name and a type.

Create New Variable dialog with a name field and a type selector

TypeStoresExample
StringText"John Doe"
NumberNumeric value5
BooleanTrue / falsetrue
ObjectStructured dataA form or HTTP response

How variables get set

SourceHow
Ask QuestionThe reply is saved to the chosen variable
Ask Buttons / Ask ListThe selection is saved to the chosen variable
Set VariableYou assign a value directly
HTTP RequestThe response is saved to a variable
Send FormThe submission is saved as an object variable
Create TicketThe new ticket number is saved to a variable

Inserting values into fields

Wherever a field shows the </> icon, open the picker to insert a value. It has three tabs.

User Info — built-in fields like Customer Name and Customer Phone.

Variable picker open on the User Info tab listing Customer Name and Customer Phone

Attributes — the contact attributes on the customer's profile.

Variable picker open on the Attributes tab listing contact attributes like Birthdate and Display Name

Variables — the flow variables you've created (empty until you add one).

Variable picker open on the Variables tab

Inserted values render in double curly braces, for example:

Hello {{customer.name}}, your birthday is {{customer.attributes.Birthdate}}.

Conditions & branching

The Condition node routes the flow by comparing a variable against a value. Add one or more conditions; each has a variable, an operator, and a value.

Operators: Equal to, Not equal, Greater than, Less than, Greater than or equal, Less than or equal.

The value field accepts static text or another variable (via the </> picker), so you can compare two variables directly.

Input validation

Ask Question can validate the reply before accepting it. If validation fails, the customer sees the node's Invalid message and retries; the flow doesn't advance until the input is valid.

ValidationChecks
NoneAccept any reply
EmailA valid email address
PhoneA valid phone number
NumberNumeric input only
RegexA custom pattern you supply

Best practices

How is this guide?

On this page