Dynamic variables and sample values in templates

Personalize your WhatsApp templates with {{1}}, {{2}} variables and provide the sample values Meta requires to approve them.

Jun 25, 2026

Dynamic variables let you reuse a single approved WhatsApp template while changing just a few details (a customer name, an order number, a date…). Instead of building one template per contact, you write placeholders like {{1}} or {{2}} and fill them in at send time.

How variables work

A variable is a number wrapped in double braces: {{1}}, {{2}}, {{3}}… They are numbered sequentially starting at 1. You can place them in:

  • The message body (up to 10 variables).
  • A text header (1 variable).
  • The URL of a link button.

Example body:

Hi {{1}}, your order {{2}} is on its way and will arrive on {{3}}.

Requirements

  • A connected WhatsApp channel.
  • Template management permission (a role with templates.manage).
  • Meta requires a sample value for every variable before it approves the template.

Steps to create a template with variables

  1. Go to Channels, open your WhatsApp channel and enter Templates.
  2. Click New template.
  3. Give it a name in snake_case (lowercase letters, numbers and underscores, starting with a letter), pick the category (marketing, utility or authentication) and the language.
  4. Write the body and insert variables {{1}}, {{2}}… wherever you want dynamic data.
  5. As each {{N}} is detected, a sample value field appears. Enter a realistic value (for {{1}}, for example: "Mary"). These are the values Meta sees during review and the ones the live preview displays.
  6. Check the preview, add a header, footer and buttons if needed, and click Submit to Meta.

Filling variables when sending

When replying in the Inbox, open the templates picker, choose the template and you'll see one field per variable. Enter the real value for that contact and send.

Via API, use the template send endpoint with indexed values:

POST /api/v1/conversations/{conversation}/templates/send
{
  "template_id": 123,
  "body_params": { "1": "Mary", "2": "#A-5567", "3": "Friday 27th" }
}

The body_params keys are the variable number (1, 2, 3…). For buttons with a dynamic URL, use button_params.

Verification

  • In the preview, variables are replaced by your sample values: no {{N}} should remain visible.
  • After submitting, the template stays in pending status until Meta approves it.

If it doesn't work

  • Meta rejects the template for missing examples: make sure you filled a sample value for every {{N}}.
  • Gaps in numbering: variables must be consecutive ({{1}}, {{2}}…). Don't jump from {{1}} to {{3}}.
  • Body over the limit: the body allows up to 1024 characters after substitution.
  • You can't edit it: an already approved template can't be changed; create a new version instead.

Tips

  • Keep a mental mapping (1 = name, 2 = order) and use the same order across all your templates to avoid mistakes.
  • Don't place two variables back to back with no text between them ({{1}} {{2}}): Meta often rejects that.

Related articles

Was this helpful?

Related articles

Message us on WhatsApp