> For the complete documentation index, see [llms.txt](https://docs.quickreply.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quickreply.ai/product-modules/templates/whatsapp-templates/how-tos/create-templates/map-variables-in-template.md).

# Map Variables in Template

When creating WhatsApp templates for business messaging, one of the most critical steps is mapping variables accurately. Variables (often referred to as placeholders like `{{1}}`, `{{2}}`, etc.) allow you to personalize messages dynamically—such as adding customer names, order IDs, or delivery dates. Proper variable mapping ensures that the right data is inserted into each placeholder when the template is sent, leading to a contextual, personalized experience for the end-user. This process is essential for compliance with WhatsApp’s policies, improving engagement, and maintaining message clarity. In this guide, we’ll explore how variable mapping works, best practices, and common pitfalls to avoid.

## Mapping Variables

{% stepper %}
{% step %}

#### Select template

Go to journeys or broadcasts and select a template which has variables. For this example, we are using Abandoned cart template.

<figure><img src="https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2Fgit-blob-0552aaa145e19b776a7d49862aec0fa4d4d223ec%2Fimage%20(82).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Add Variables

#### 1. Click on "+ Dynamic Variable"

<figure><img src="https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2Fgit-blob-d2d264c7cf93166072d69ccf805665aea4b473f1%2Fimage%20(83).png?alt=media" alt=""><figcaption></figcaption></figure>

#### 2. Select Source of the Dynamic value and Field Name

<figure><img src="https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2Fgit-blob-248f2857d0a171d7bff6020bbc161de9879dc9f9%2Fimage%20(84).png?alt=media" alt=""><figcaption></figcaption></figure>

#### 3. Add Fallback (optional)

* Define fallback values for variables to avoid broken or awkward messages.
* Click on add fallback
*

```
<figure><img src="../../../../.gitbook/assets/image (85).png" alt=""><figcaption></figcaption></figure>
```

{% endstep %}

{% step %}

#### Save and continue

{% endstep %}
{% endstepper %}
