Home/Help Center/Variables and fallbacks

Broadcasts

Map Template Variables and Fallback Values

Map every {{n}} in a template to a contact field, a custom field or static text, with a required fallback so a broadcast can never fail with a Meta parameter-mismatch error.

By Chirag Darji · Updated 27 Aug 2026 · 7 min read

On this page
  1. Before you start
  2. Steps
  3. How does the fallback actually get chosen at send time?
  4. What you will see
  5. What about templates with a header, a coupon code, or a location pin?
  6. Settings and options
  7. Troubleshooting
  8. Related reading
WhatsApp broadcast campaign report in VGraple CRM with delivered, read and replied stats per contact

Every {{n}} variable in an approved template must be mapped to something before a broadcast can send: a contact field, a custom field, static text, or a tracked link, each with a mandatory fallback so a missing value never breaks the send. This article explains how the mapping works, what each variable source does, and why a fallback is required even for values you expect to always be present.

Variables and fallbacks: first 5 of 6 steps

  1. 1Pick a template on the Message step
  2. 2Choose a source for each variable
  3. 3Enter a fallback for every non-static source
  4. 4Fill in static text where the value
  5. 5Check the live preview
The steps on this page, in order.

Before you start

  • You need an approved template with at least one {{n}} variable. See template builder components if you have not built one yet.
  • If you plan to personalize with a custom field (loyalty tier, membership number, a booking date), that field needs to exist under Contacts first.
  • Understand which contacts actually have the field populated. A variable mapped to email personalizes nothing useful if half your contacts have no email on file, though the fallback still keeps the send working.

Steps

  1. Pick a template on the Message step. Once you select an approved template that has variables, a Personalization panel appears listing every {{n}} the template needs, split into header, body and button rows where applicable.

New broadcast composer in VGraple CRM: audience selection with segment, tag and CSV options and a live recipient count

  1. Choose a source for each variable. For every row, pick one of: Contact name, Contact phone, Contact email, Custom field (then pick which one), Static text (then type the exact value), or Tracked link (only available once you have set a "Track clicks to" URL). A body variable, a header text variable and a button link variable are each mapped independently, even if they logically represent the same idea.

  2. Enter a fallback for every non-static source. Each row that is not static text requires a fallback value: what sends if that specific contact's field is empty. This is mandatory, the composer will not let you continue without it, because a missing value in even one recipient's field must never produce a message with the wrong number of parameters.

  3. Fill in static text where the value is the same for everyone. A coupon code, a campaign name, or any detail that does not vary by recipient goes here as literal text rather than being mapped to a contact field with an identical fallback for every row.

  4. Check the live preview. As you complete the mapping, the composer's preview panel renders the message with real values, so you can see exactly what a contact with a populated field looks like, and, on the Review & Send step, exactly what a contact relying on the fallback looks like too.

  5. Handle header, media and button fields separately. A media header (image, video or document) is set once for the whole campaign in its own field above the personalization rows, not per recipient. A URL button whose link contains a variable gets its own "Button link" row in the personalization panel.

How does the fallback actually get chosen at send time?

Each recipient's value is resolved individually at the moment their message is built, not when you set up the campaign. For a contact-field or custom-field variable, the resolver checks the contact's actual value first; if that value is missing or blank after trimming whitespace, it uses your fallback instead. For a static-text variable, every recipient simply gets the text you typed. This resolution happens per recipient inside the send loop, so two contacts with the same template can receive genuinely different personalized text in the same campaign, one from their real name, another from the fallback, without either one failing.

This also protects templates with other component types. A document header attachment uses the template's own name (for example "Monthly Report") rather than the uploaded file's raw filename, so a recipient does not see an attachment literally called "header.pdf." A template with a limited-time offer badge gets its countdown calculated fresh for each send, starting from the moment the message actually reaches Meta rather than from a fixed campaign-wide clock, so a recipient who receives the message an hour into a long send still sees the full offer window from their own perspective.

Example

A real-estate agency sends a new-listing alert mapping {{1}} to the contact's name and {{2}} to a custom field, "preferred locality." Eighty percent of contacts have a locality on file and see it by name; the remaining twenty percent, where the field was never filled in, see the fallback text "your preferred area" instead, and the send completes successfully for all of them.

What you will see

The Personalization panel lists one row per variable with a dropdown for the source and, for most sources, a text field for the fallback. A variable with no source chosen, or a non-static source with an empty fallback, blocks the Continue button and the final Send. The preview on the Message step and the Review & Send step both render against real contact data, so you see the actual rendered message, not a placeholder like "{{1}}."

What about templates with a header, a coupon code, or a location pin?

Not every template component is a per-recipient variable. A media header (image, video or document) and a "copy offer code" button carry one value for the whole campaign, set once in their own field on the Message step above the Personalization panel, since one campaign is one creative sent to everyone, the same logic a normal marketing email or SMS blast already follows. A location header works the same way: one pin, with a name and address, for the entire send, because a template offering "our clinic's location" only makes sense as a single fixed place, not something that varies by recipient the way a name or a balance does.

This distinction keeps the Personalization panel focused on what genuinely needs to vary by contact and keeps campaign-wide details, a coupon code, a banner image, a shop's address, in one obvious place instead of forcing you to map the same static value to every recipient as if it were personal data.

Settings and options

Variable sourceWhat it sendsFallback required
Contact nameThe contact's stored nameYes
Contact phoneThe contact's stored phone numberYes
Contact emailThe contact's stored email addressYes
Custom fieldThe value of a chosen custom field on that contactYes
Static textThe exact text you type, identical for every recipientNo (the text itself is required)
Tracked linkA per-recipient signed link to the "Track clicks to" URLNot applicable

Troubleshooting

SymptomLikely causeFix
"Variable {{n}} is not mapped" error on ContinueA variable in the template body has no row filled inScroll to the Personalization panel and fill in every listed variable
"A fallback value is required" errorA non-static variable's fallback field is emptyEnter a fallback; it only needs to make sense in the rare case the mapped field is empty
Everyone receives the same value for a variable that should be personalizedThe variable is mapped to Static text instead of a contact or custom fieldChange the source to the correct contact or custom field
Message preview shows the fallback for most recipientsThe mapped contact or custom field is empty for most of the audienceCheck whether that field is actually populated on your contacts; consider a different field or importing the data first
Tracked link option is missing from the source dropdownNo URL has been entered in "Track clicks to" yetEnter a URL there first; the Tracked link source appears once it exists

Once variables are mapped correctly, check the exact cost and send a test message before launching, in cost estimate and test send, or go back to building the audience if you have not finished that step.

Frequently asked questions

Why does every variable need a fallback value?
Because a contact's mapped field can be empty (no email on file, a custom field never filled in), and Meta rejects a template send whose parameter count does not match the approved template with error 132000. Requiring a fallback for every non-static variable makes that error structurally impossible from a broadcast.
What is the difference between mapping a variable to "static text" and to a contact field?
Static text sends the exact same value to every recipient, useful for a coupon code or a campaign-wide detail. A contact field (name, phone, email or a custom field) personalizes the message per recipient, falling back to your fallback value only when that specific contact's field is empty.
Can I map a variable in the header or a button, not just the body?
Yes, for templates that have header text variables or a URL button with a variable in the link. Those rows appear automatically in the Personalization section when the selected template needs them, labeled "Header {{n}}" or "Button link."
What is a "tracked link" variable?
It resolves to a per-recipient signed link that redirects to the URL you set under "Track clicks to," so a click can be attributed to exactly one recipient of this campaign. It only appears as an option once you have entered a tracked-link URL.
My template has a header image. Do I map that as a variable?
No. Media headers (image, video, document) use a separate field above the variable list, a single public link for the whole campaign, since one campaign sends one creative to everyone, not a different image per recipient.
What happens if I leave a variable unmapped?
The composer will not let you continue to the next step and, if bypassed, the send is refused with a validation error naming exactly which {{n}} is missing, rather than sending a broken message to some recipients.

Run your WhatsApp on VGraple CRM

Free forever plan, official Meta WhatsApp Business API, set up in 15 minutes. No card needed.