> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dogebot.net/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp variables

> Values like the customer's name, number and message, with an example for each.

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: the customer's name**
>
> `{wa_name}` is the customer's WhatsApp **profile name**.
>
> ```text theme={null}
> You type:      Hi {wa_name}, thanks for writing!
> Sam gets:      Hi Sam, thanks for writing!
> ```
>
> > [!TIP]
> >
> > Some people have no profile name. Add a backup, like `{wa_name|there}`. See [Backup values](#backup-values) below.

> **wa\_from: the customer's number**
>
> `{wa_from}` is the phone number of the person who wrote to you.
>
> ```text theme={null}
> You type in Google Sheets Columns:   Number = {wa_from}
> The new row gets:                    the customer's phone number
> ```
>
> Handy for saving who wrote, or sending their number to another app.

> **wa\_text: what they wrote**
>
> `{wa_text}` is the text of the message the customer sent.
>
> ```text theme={null}
> You type:      You said: {wa_text}
> Sam writes:    What time do you open?
> Sam gets:      You said: What time do you open?
> ```

> **wa\_choice\_title: the button or choice they tapped**
>
> `{wa_choice_title}` is the title of the button or list choice the customer tapped.
>
> ```text theme={null}
> Your buttons:  Prices, Opening hours
> Sam taps:      Opening hours
> You type:      You picked {wa_choice_title}.
> Sam gets:      You picked Opening hours.
> ```
>
> Use it with the trigger **When someone taps a button or choice**.

> [!NOTE]
>
> There are a few more `wa_` values. Open the `{ }` **Variables** list in the builder to see them all.

## Values from other apps

> **hook\_: data from a web address**
>
> 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.
>
> ```text theme={null}
> Your shop sends:    phone = +441234567890, order_id = 1042
> You can use:        {hook_phone} and {hook_order_id}
> You type:           Your order {hook_order_id} is on its way!
> The customer gets:  Your order 1042 is on its way!
> ```
>
> Set **Send messages to** to `{hook_phone}`, so the message goes to the right person. See [Apps and services](/whatsapp/apps-and-services).

> **app\_reply: the answer from Send to an app**
>
> After a **Send to an app** block, the other app's answer is in `{app_reply}`.
>
> ```text theme={null}
> Zapier answers:     Ticket 77
> You type:           Thanks! We made {app_reply} for you.
> The customer gets:  Thanks! We made Ticket 77 for you.
> ```

## 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](https://mintcdn.com/doge-bot/0C6-zgXTpDx1QOCe/images/guide/ds-ideas.png?fit=max\&auto=format\&n=0C6-zgXTpDx1QOCe\&q=85\&s=fcf1a40a32721b559641fdeac7e6fae0)

See [What is a variable?](/variables/what-variables-are) and [Make a variable](/variables/make-your-own-variables).

## Backup values

A **backup value** is used when a variable is missing or empty. Put a `|` after the name, then the backup.

```text theme={null}
You type:                          Hi {wa_name|there}!
Sam has a profile name, he gets:   Hi Sam!
Someone with no profile name gets: Hi there!
```

* 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.