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

# Template Variables & Parameters

> How WhatsApp template variables ({{1}}, {{2}}, etc.) work and how parameters in the API call fill them in with real values. Use when a customer asks how to personalize a template with a customer name, order number, or other dynamic value, what {{1}} means inside a template, or how to send different values to different customers using the same template.

When you create a WhatsApp template, you can include numbered placeholders like `{{1}}`,
`{{2}}`, `{{3}}` in the body (and sometimes the header). These are **variables**. When you send
the template via the API, you supply **parameters** — the real values that replace each
variable — in the `components` array. The same template can be sent to thousands of customers
with different values.

## Variables vs parameters

**Variables** are defined at template creation time:

```
Hello {{1}}, your order {{2}} has been confirmed.
```

`{{1}}` will be replaced with the customer's name, `{{2}}` with the order number. The numbers
must start at `{{1}}` and go up sequentially.

**Parameters** are the actual values you send when calling the API:

```json theme={null}
{
  "type": "body",
  "parameters": [
    { "type": "text", "text": "Rahul" },
    { "type": "text", "text": "0101" }
  ]
}
```

The first parameter fills `{{1}}` (→ "Rahul"), the second fills `{{2}}` (→ "0101"). The order
in the array matches the variable number.

## Sending to multiple customers

The template stays the same. Only the parameter values change:

| Customer   | `{{1}}` | `{{2}}` |
| ---------- | ------- | ------- |
| Customer 1 | Rahul   | 0101    |
| Customer 2 | Priya   | 0201    |
| Customer 3 | Vikram  | 0301    |

Each API call uses the same template name but different `parameters`.

## Frequently asked

<AccordionGroup>
  <Accordion title="What is {{1}} in a WhatsApp template?">
    It's a variable placeholder. When you send the template via the API, you provide a
    `parameters` array in the `body` component; the first entry replaces `{{1}}`, the second
    replaces `{{2}}`, and so on.
  </Accordion>

  <Accordion title="How do I send the same template to different customers with different names?">
    Use `{{1}}` in the template body for the name. When calling the API for each customer, pass
    that customer's name as the first item in the body `parameters` array.
  </Accordion>

  <Accordion title="What is the difference between a variable and a parameter?">
    A **variable** (`{{1}}`, `{{2}}`) is the placeholder defined inside the template text. A
    **parameter** is the real value you send at the time of the API call to fill in that
    placeholder.
  </Accordion>

  <Accordion title="Do my variables need to be numbered from 1?">
    Yes. Variables must start at `{{1}}` and increment sequentially — `{{1}}`, `{{2}}`, `{{3}}`.
    You cannot skip numbers (e.g., going straight from `{{1}}` to `{{3}}` will cause the template
    to be rejected).
  </Accordion>
</AccordionGroup>

## Gotchas & common mistakes

<Warning>
  * **Skipping numbers** — `{{1}}`, `{{3}}` without `{{2}}` is invalid. Meta rejects templates
    with non-sequential variable numbers.
  * **Wrong order in parameters array** — the first parameter always fills `{{1}}`, second fills
    `{{2}}`. Wrong order = wrong values for customers.
  * **Parameters vs variables** — you cannot change the template text at send time. Variables are
    fixed when the template is approved; parameters only supply values. See
    [Template structure & sending](/meta-api/templates/template-structure-and-sending).
</Warning>
