Resources Insight
WhatsApp template variables: personalised messages that pass review and don't feel creepy
A template is fixed text that Meta approves once, with gaps you fill for each person when you send. Those gaps are where personalisation lives, and where most rejections and most embarrassing sends come from. Here is what Meta's pages allow, and how to use it without making customers wonder what else you know.
The short version
- Meta supports two formats: positional variables such as {{1}} and named ones such as {{first_name}}. If you don't choose, the template is positional. Every variable needs a sample value when you submit.
- A text header takes one variable, the body takes several, a URL button takes one at the end of the link, and the footer and quick-reply labels are fixed text.
- A send must carry a value for every variable or it fails, so plan a fallback for missing data before the campaign, not after.
- Personalise with what the customer knowingly gave you, such as their name, order and city. Leave out anything they'd be surprised you know.
- Personalisation doesn't change the price: a marketing template costs ₹0.8631 and a utility one ₹0.115 per delivered message in India, before GST.
Swati Deshmukh sells Ayurvedic hair oils and face packs from Pune, with a team of nine and about 14,000 contacts imported from her store and two exhibitions. Her first personalised WhatsApp campaign opened with “Hi {{1}},” filled from the first-name column. About one contact in five had no first name in the file. Those customers got “Hi ,” and a handful replied asking whether the message was a scam. (Swati, her brand and her numbers are invented for this example.)
WhatsApp template variables are the placeholders in an approved template that you fill for each person at send time. Used well, they make a broadcast read like a note from the shop. This article covers named and positional parameters, which parts of a template can carry variables, the sample values Meta needs, fallbacks for missing data, variables in URL buttons for tracking, and the mistakes that get templates rejected. Terms like template and category are in our glossary.
Named or positional parameters?
Meta supports both. Positional variables are numbers in double braces, {{1}}, {{2}}, in order from 1. Named variables are lowercase words with underscores, such as {{first_name}}. Meta’s template page says: “If you do not specify a format, the template uses positional format by default.”
| Positional | Named | |
|---|---|---|
| Looks like | {{1}}, {{2}}, {{3}} | {{first_name}}, {{order_number}} |
| Rules on Meta’s page | ”Ordered array index numbers, starting from 1" | "Unique, single strings, composed of lowercase characters and underscores” |
| Sample and send values | Must follow the order the placeholders appear in | ”Can appear in any order” |
| Where it goes wrong | A gap or jump in the numbers | A capital letter, space or repeated name |
We’d use named parameters for anything with more than two variables. A template reading “Hi {{first_name}}, your order {{order_number}} ships on {{ship_date}}” can be checked by anyone on the team, and the person wiring up the send can’t swap the date and the order number by accident. Positional is fine for a one-variable greeting. WhatsApp Manager calls both “variables”; the API calls them parameters.
Swati’s shipping update, written with named parameters:
Hi {{first_name}}, your order {{order_number}} has shipped and should reach {{city}} by {{delivery_date}}. Reply here if anything looks wrong.
[Track order]
A utility template, ₹0.115 per delivered message to an Indian number, before GST, on Meta’s rate card effective 1 October 2026.
Where can variables go in a template?
In the header, the body and a URL button. Not in the footer or in quick-reply labels. Meta’s components page sets these limits:
| Part | Variables | Limit |
|---|---|---|
| Text header | One | 60 characters |
| Body | Several | 1,024 characters |
| Footer | None; fixed text | 60 characters |
| URL button | One, “appended to the end of the URL string” | URL up to 2,000 characters; label 25 |
| Copy code button | The code is supplied when you send | 20 characters |
| Quick reply button | None; fixed label | 25 characters |
| Location header | Latitude, longitude, name and address supplied when you send | Marketing and utility templates only |
Two consequences for personalisation. The footer can’t say “Sent to {{1}}”, so put anything personal in the body. And because button labels are fixed, “Reorder your hair oil” can’t change to “Reorder your face pack” per person. Write the label generically (“Reorder”) and let the body name the product.
Media headers work differently: you upload a sample image or PDF with the template so the reviewer can see it, and the media itself is supplied at send time. Our marketing template formats guide covers headers, carousels and coupon buttons in detail.
Sample values: what the reviewer actually reads
Every variable needs a sample when you submit. Meta’s review page says samples make it “easier for reviewers to visualize how your template will appear to customers”, and in WhatsApp Manager you add them with the Add Sample button after writing the template.
The reviewer reads your template with the samples filled in. A sample of “abc” or “test” turns a sensible message into nonsense; a sample that doesn’t fit the sentence makes the template look broken. Use values in your real format: an order number shaped like yours, a plausible date, a real product name. Never paste a real customer’s details. Our rejection guide has more on samples and appeals.
Personalisation that helps, and personalisation that feels creepy
Use what the customer knowingly gave you or would expect you to have. Their name, the order they placed, the product they bought, the date they booked, the city they deliver to. A message that uses these reads as service.
Leave out what they’d be surprised you know. Our test for Swati’s team: if the customer read the message aloud to a friend, would either of them ask “how do they know that?” Examples that fail it:
- What they browsed but didn’t buy, named outright (“you looked at the onion hair oil three times”)
- A birthday they never told you, taken from a form field they don’t remember
- Anything inferred about health, money or family: hair fall, pregnancy, a wedding in the house
- Their exact locality or society name in a marketing message
Meta’s rules don’t draw this line for you. Its category guide lists a birthday greeting with the customer’s name as a marketing template, which tells you the price, not whether to send it. The line is yours to draw, and it decides block rates more than any wording trick. A message that feels like surveillance gets blocked, and blocks lower template quality.
There’s an Indian data-quality version of creepy too: names in capitals from an old billing system (“Hi SAMEER KHANNA”), a husband’s name on the wife’s number, the first name being the shop’s own label (“Hi Ex-Pune-Stall”). Clean the field before you use it. First name only, sentence case, and blank anything that isn’t a name.
Fallbacks for missing data
Decide what each variable says when the data is missing, before you send. Meta’s error codes leave no room for gaps: a send whose values don’t match the template’s variables fails with error 132000 (“The number of variable parameter values included in the request did not match”), and values in the wrong format fail with 132012. Meta’s pages don’t say what an empty value does, so don’t rely on one.
Three ways to handle it, in the order we’d try them:
- Write the template so a neutral fallback reads naturally. “Hi
{{1}},” works with “there”. “Dear{{1}}ji” doesn’t. - Keep a second approved template without the variable, and send it to the contacts missing that field.
- Leave those contacts out of this campaign and fix the data first.
Swati’s welcome message, built for option 1:
Hi {{1}}, thanks for joining the Swati Naturals list. You'll hear from us about twice a month: new batches, oil-making workshops and the odd offer.
[Show this month's oils] [Stop offers]
With a name: “Hi Lavanya, thanks for joining”. Without: “Hi there, thanks for joining”. It’s a marketing template, ₹0.8631 per delivered message before GST. If one contact in five has no first name, she now knows before the send, and the fallback fills the gap.
Variables in URL buttons for tracking
A URL button can carry one variable, at the end of the link. That’s the one place a template lets you give each person a different link.
Meta’s own template analytics count URL-button clicks per template per day, as a total and as unique clicks, for marketing and utility templates. They don’t tell you which customer tapped. A variable in the link does: put an order number, a campaign code or an opaque contact reference in it, and your website or shop analytics can read it.
Hi {{1}}, it's about {{2}} weeks since your {{3}} arrived. Most people need a refill around now. Shall we send the same again?
[Reorder] -> https://example.com/r/{{1}}
The button variable is separate from the body’s {{1}}, and the link is a placeholder; use your own domain. Fill the button variable with a short code such as “OCT-RE-4821”, not the customer’s phone number or name, because URLs end up in browser history, shared screenshots and analytics logs. Meta’s components page also says values with special characters must be percent-encoded (a space becomes %20), or the send fails validation.
That reorder reminder is a marketing template at ₹0.8631, even though the customer bought from you before. Meta’s category guide treats offers to people who “engaged with you” as retargeting, which is marketing “even if requested by users”.
How variable mistakes cause rejections
Most template rejections are variable problems. Meta’s review page lists the parameter mistakes it rejects:
- Missing or mismatched curly braces; “The correct format is
{{1}}for positional parameters” - Special characters such as #, $ or % inside a variable
- Variables that aren’t sequential, such as 1, 2, 5, 4
- “Too many variable parameters relative to the message length”
- A template that starts or ends with a variable; Meta calls these “dangling parameters”
Two category traps sit on top. A template whose content is only “{{1}}” counts as marketing because its contents are “unclear”. And approval isn’t the end: Meta says it can change a template’s category after approval “because the messages the template sends do not meet” the guidelines, even if the category was confirmed on review. A utility shipping template whose {{4}} is later filled with “10% off your next order” is exactly that case.
Language matters too. Meta’s page says “Template strings and variables are not translated by Meta”. A Marathi template needs Marathi samples, and the values you send are shown exactly as you send them.
For worked examples, our 30 template examples show variables in marketing, utility and authentication templates with the category of each.
A check before your next personalised send
Pull 20 contacts at random from the segment and fill the template by hand for each. Look for blank names, capitals, a wrong city, a product name too long for the sentence. If two of the 20 read badly, about one in ten of the real send will too. Fix the data or the fallback first; the template can wait a day.
Common questions
What are named parameters in a WhatsApp template?
Named parameters are variables written as lowercase words with underscores inside double braces, such as {{first_name}} or {{order_number}}. Each name must be unique in the template. Their sample values and send values can be given in any order, unlike positional variables such as {{1}}, which must follow the order they appear in the text.
How many variables can a WhatsApp template have?
A text header supports one variable and a URL button one, added at the end of the link. The body accepts several within its 1,024 characters, but Meta rejects templates with too many variables for the message length and publishes no ratio. Keep enough fixed text that the message makes sense on its own.
What happens if a WhatsApp template variable is empty?
Meta rejects a send whose number of values doesn't match the template's variables, with error 132000, and values in the wrong format with error 132012. Its pages don't describe what a blank value does, so give every variable a real value: a fallback such as 'there' for a missing first name, or a separate template without that variable.
Can I track clicks with a variable in a WhatsApp URL button?
Yes. A URL button can carry one variable at the end of the link, so each person's button can include a campaign or order code your website reads. Meta's template analytics count URL-button clicks per template per day, as totals and unique clicks, not per person, so the variable is how you see who tapped.
Sources
- Template fundamentals (Meta for Developers) · Updated 21 May 2026; read live 18 Oct 2026
- Template components (Meta for Developers) · Updated 24 Jun 2026; read live 18 Oct 2026
- Template review (Meta for Developers) · Updated 17 Jun 2026; read live 18 Oct 2026
- Template categorization (Meta for Developers) · Updated 15 Sep 2026; read live 18 Oct 2026
- Error codes (Meta for Developers) · Updated 18 Jun 2026; read live 18 Oct 2026
- Analytics: template analytics (Meta for Developers) · Updated 14 Sep 2026; read live 18 Oct 2026
- Pricing on the WhatsApp Business Platform (Meta for Developers) · Updated 30 Sep 2026; India rates on the card effective 1 Oct 2026, unchanged from 1 Jul 2026
Run this on your own number
Create an account, connect your WhatsApp number, and invite your team.