Skip to main content
A variable is a word in curly brackets that the bot swaps for real information. In a WhatsApp flow, you can use variables about the customer and their message.

Example

You type: Hi {wa_name}!Sam writes to your number. The bot sends: Hi Sam!

How to add a variable

In a block, press the { } Variables button next to a box and pick one from the list. In a WhatsApp flow, the list only shows values that work on WhatsApp: WhatsApp, time, text, maths and logic values. Nothing from Discord shows up, like members, servers, channels or roles.

The customer and their message

{wa_name} is the customer’s WhatsApp profile name.
Some people have no profile name. Add a backup, like {wa_name|there}. See Backup values below.
{wa_from} is the phone number of the person who wrote to you.
Handy for saving who wrote, or sending their number to another app.
{wa_text} is the text of the message the customer sent.
{wa_choice_title} is the title of the button or list choice the customer tapped.
Use it with the trigger When someone taps a button or choice.
There are a few more wa_ values. Open the { } Variables list in the builder to see them all.

Values from other apps

When a flow starts with When a web request arrives, every field the other app sends becomes a variable that starts with hook_. Swap the part after hook_ for the field’s name.
Set Send messages to to {hook_phone}, so the message goes to the right person. See Apps and services.
After a Send to an app block, the other app’s answer is in {app_reply}.

Your own variables

You can make your own variables on the Database page of your number, and use them in flows. The Database page has WhatsApp ideas like customer name, orders, cart and loyalty points. Use Look up a contact to see one customer’s saved values.
The Database page with ideas for variables to make

The Database page has ideas to start from.

See What is a variable? and Make a variable.

Backup values

A backup value is used when a variable is missing or empty. Put a | after the name, then the backup.
  • The backup is used when the variable is missing, does not exist, or comes out blank.
  • A profile name with no letters you can see counts as empty.
  • The builder’s chat preview shows backups too.
  • Secrets never use a backup value.