Template Language Routing
Template Language Routing enables multilingual tenants to send a single WhatsApp template in different languages per recipient — automatically. You define a simple “country code → template language code” map, then select the Auto option in the template picker (for campaigns and inbox). At the time of sending, DEP reads the international prefix of the recipient’s phone number (for example, +62 → Indonesia), matches it against your map, and sends the template variant in that language.
This feature is intended for tenants serving recipients in more than one country — for example, an Indonesian and Singaporean customer base — without having to create separate campaigns per language.
This configuration per-tenant, not global: each account has its own routing map and default language, and the changes you save only apply to your tenant’s sending.
You access this feature from Settings > Template Language Routing (/settings/template-language-routing).
:::note[Screenshot] SCREENSHOT (need an actual capture from demo.mahadata.io): the Settings → Template Language Routing page with several country→language mapping rows filled in (e.g. ID → id, US → en) and the Default Language card. :::
Prerequisites
Section titled “Prerequisites”Routing is only useful if your templates actually have more than one APPROVED language variant with the same name in the same WABA. On Meta, a template named order_update can have variants id, en, and zh — each approved separately. The Auto option in the template picker only appears for template names that have more than one language variant.
Country → Language Mapping
Section titled “Country → Language Mapping”Card Country → Language Mapping contains a list of mapping rows. Each row has two columns:
| Field | Required | Default | Description |
|---|---|---|---|
| Country code | Yes | — | ISO 3166 alpha-2 country code, exactly 2 letters (e.g. ID, SG, US). Input is automatically converted to uppercase |
| Language code | Yes | — | Meta template language code sent to recipients from that country (e.g. id, en, en_US), maximum 16 characters |
Click Add row to add a row, or the trash icon to delete it. If there are no mappings yet, the card displays the message “No mappings yet. Add a row to route a country to a template language.”
Validation on save:
- The country code must be exactly 2 letters — otherwise, the message “Country code must be 2 letters (ISO 3166 alpha-2)” appears, followed by the problematic value.
- Language code cannot be empty for a row that contains a country code.
- Completely empty rows are ignored (they do not block saving).
:::tip[Language coverage warning] This page knows which languages actually have APPROVED templates in your tenant. If you map a country to a language that does not have a single approved template, that row displays a yellow warning: sending to that country will fall back to another language (fallback) until you create and approve a variant in that language. :::
Default Language
Section titled “Default Language”Card Default Language card determines the language used when the recipient’s country does not match any mapping — including when the phone number cannot be parsed into a valid country.
| Field | Required | Default | Description |
|---|---|---|---|
| Default language code | Yes | en | Fallback template language code (e.g. en), maximum 16 characters |
If you have never saved a configuration, the system uses en as the global default.
Saving the Configuration
Section titled “Saving the Configuration”- Open Settings > Template Language Routing.
- Add a mapping row for each country you want to route — for example
ID→idandMY→en. - Make sure Default language code is filled in (e.g.
en). - Click Save. The “Template language routing saved” toast confirms the configuration is saved; normalized values (country codes capitalized, whitespace tidied) are immediately reflected back into the form.
- Use Reset to discard unsaved changes and reload the configuration from the server.
Changes take effect on the next send — no deployment or restart needed.
”Auto” Option in the Template Picker
Section titled “”Auto” Option in the Template Picker”Once the map is configured (or even without a map — see the fallback order below), operators can select automatic mode directly from the template picker:
- Campaign — in the campaign template picker (both when creating and editing a campaign), every template name that has more than one language variant displays one extra entry badged Auto at the top of its variant list, with the description “Auto — match recipient. Picks the best of N languages per recipient.” Selecting it marks the campaign as
auto_language, so that every recipient in the audience has their language resolved one by one at send time — the same single campaign can send theidto phone number+62and variantento phone number+1. - Inbox — in the dialog Select a Message Template dialog (when starting a new conversation or replying outside the 24-hour window), multilingual template groups display an Auto card similarly, with the description “Auto (match recipient) — sends the best of N languages for each recipient.” The language is resolved for that conversation’s contact at send time.
If the operator picks a specific language variant (not Auto), that language is sent as-is — the routing map is not used at all.
:::note[Screenshot] SCREENSHOT (need an actual capture from demo.mahadata.io): the campaign template picker with an “Auto — match recipient” entry badged Auto above the language variants of a multilingual template. :::
Fallback Order
Section titled “Fallback Order”When mode Auto is active, DEP determines the language for a single recipient in the following order. This resolution never fails the send — there is always a concrete language selected:
- The recipient’s country is determined from the international prefix of the phone number (e.g.
+6281...→ID,+1415...→US). - Language candidates are ordered as follows: country mapping (if any) → tenant default language →
en(last global fallback). - First candidate that has an APPROVED, active variant of that template in the relevant WABA — that is the one sent. Candidates without an approved variant are skipped.
- If none of the candidates has an approved variant, the system uses any approved variant of that template (preferring
enwhen available). - The absolute last fallback is
en.
Failure to load the configuration (for example, the map has never been saved) does not raise an error — the system behaves as if the map is empty and immediately uses the default language.
Voice Call Permission Template
Section titled “Voice Call Permission Template”The same routing is also applied automatically to the call permission template (call permission) sent from the call button in the inbox or Dialer when the 24-hour service window has closed. You still configure one base permission template per phone number; at send time, the platform tries the language variant matching the recipient’s country — and only switches if the same-named variant in the resolved language is actually APPROVED. Otherwise, the configured base template is sent.