Variables make templates personal. Instead of a fixed message that reads identically for every recipient, variables allow a single approved template to address each customer by name, reference their order, or include their specific product — all within a Meta-approved structure. Localization ensures the same variable-driven personalization is available across every language your customers speak.Documentation Index
Fetch the complete documentation index at: https://docs.digifist.com/llms.txt
Use this file to discover all available pages before exploring further.
What this covers
- Variable placeholder syntax and how placeholders are defined
- The
template_variables_mappingstructure - Available data sources for variable values
- Example values and why they are required
- Localization — one template per language
- Managing multiple language versions
Variable placeholder syntax
Variables in WhatsApp templates use positional syntax:{{1}}, {{2}}, {{3}}, and so on. Each number refers to the position of the variable in the template — {{1}} is the first variable, {{2}} is the second, regardless of where in the body text they appear.
Rules for placeholders:
- Positions must be sequential starting from
{{1}}— skipping a number (e.g., using{{1}}and{{3}}without{{2}}) causes submission to fail - Variables can appear in the body text and in the text header — not in the footer, and not as the entire content of a button label
- A URL button supports one variable in the URL path:
https://yourstore.com/checkout/{{1}} - There is no enforced maximum number of variables, but templates with many variables become harder to maintain and map correctly
Variable mapping
When a template is selected for use in a campaign or automation, each placeholder must be mapped to a data source. Galantis stores this mapping astemplate_variables_mapping:
Available variable data sources
- Customer Fields
- Order Fields
- Store & Static
| Field | Description |
|---|---|
customer.first_name | Customer’s first name from Shopify |
customer.last_name | Customer’s last name from Shopify |
customer.email | Customer’s email address |
customer.phone | Customer’s phone number |
customer.first_name is the most used variable across all template types. Opening with the customer’s name meaningfully improves engagement compared to a generic greeting — and costs nothing beyond the variable slot.Avoid mapping
customer.email or customer.phone to visible body text variables. Reflecting a customer’s own contact details back to them in a promotional message is unexpected and can feel surveillance-like. These fields are available for edge-case technical use, not general personalization.Example values — why they are required
Meta requires that every variable placeholder in a submitted template include an example value — a concrete sample of what that variable will contain at send time. Example values are reviewed by Meta as part of the approval process to confirm that the variable content is appropriate for the declared template category. What to provide:{{1}}mapped tocustomer.first_name→ example:Sarah{{2}}mapped toorder.total_price→ example:$89.00{{3}}mapped to a discount code → example:SUMMER20
- Generic placeholders like
[name]or[value]— these do not satisfy the example requirement - Empty strings — a blank example value causes rejection
- Misleading examples that do not represent the actual variable content
Localization
WhatsApp templates are language-specific. Each template is tied to a singlelanguage code — for example, en for English, es for Spanish, pt_BR for Brazilian Portuguese. A template approved for en cannot be sent to a customer whose preferred language is es — a separate template record must exist for each language.
Creating templates per language:
- Build the template content in one language and submit it for approval
- Create a new template with the same name and structure, set the language to the target language, translate the content, and submit that template separately
- Repeat for each additional language
APPROVED status in one language does not transfer to another — each must be reviewed and approved by Meta independently.
Routing customers to language-appropriate templates:
In automations, use a CUSTOMER_COUNTRY or CUSTOMER_LANGUAGE condition node to branch customers to the Action Node configured with the appropriate language template. See Automations — Conditions.
In campaigns, create separate campaigns per language and select the corresponding language’s template and audience segment for each send.
Managing variable mapping across language versions
Variable positions must be consistent across language versions of the same template. If{{1}} maps to customer.first_name in the English version, it must also map to customer.first_name in the Spanish version — not to a different field. Inconsistent variable positions across language versions cause confusion when configuring automation Action Nodes that may serve multiple markets.
Establish variable position conventions before creating your first template and apply them consistently across all language versions.
Best practices
- Use
{{1}}forcustomer.first_nameconsistently across all templates. Making first name the first variable creates a predictable convention that simplifies mapping configuration across many templates. - Keep the variable count low. Each variable is a mapping task at campaign and automation configuration time. Templates with 5+ variables are harder to configure correctly and more likely to produce awkward messages if any mapping is misconfigured.
- Write example values that reflect real data. Use a realistic name, a realistic order value, and a real discount code format. Example values that look nothing like actual customer data can contribute to a misleading category impression during Meta’s review.
- Name language variants consistently. A naming pattern like
welcome_en,welcome_es,welcome_pt_BRmakes it easy to identify and select the correct language version when configuring campaigns and automations. - Audit variable mappings when updating templates. If a template is edited and resubmitted with a different variable structure, review and update all campaign and automation configurations that reference it.
Related guides
- Creating Templates — Where variable placeholders are defined in the template builder
- Campaigns — Personalization — Variable mapping configuration in campaigns
- Automations — Actions — Variable mapping in automation Action Nodes
- Automations — Conditions — CUSTOMER_COUNTRY condition for language-based routing