WhatsApp only lets a business start a conversation (or message someone outside the 24-hour customer-service window) using a pre-approved template. Freehand text and media are allowed only inside an open 24-hour window that the customer's last message started. So for proactive outreach — reminders, notifications, one-time codes — you send a template.
Templates are created and approved on Meta's side, then referenced by name from 3B.
Templates are authored in the WhatsApp Manager under your Meta Business account, not in Salesforce.
{{1}}, {{2}}, … (positional) or
named {{first_name}} placeholders.Meta's own guides: Create message templates · Template categories and guidelines
You don't have to hand-type template names. The Get WhatsApp Templates action (and the component's template picker) fetch the approved templates for a configuration live from Meta, so admins pick from a list.
Template Names output to a dynamic choice on a screen. Only approved
templates are returned.Use the Send WhatsApp Template action (Flow/Apex) or the component's picker.
| Input | Notes |
|---|---|
| Template Name | The approved name (required). |
| Language Code | e.g. en_US. Defaults to en_US — must match the template's language. |
| Body Parameters | Ordered values that fill {{1}}, {{2}}, … — same count and order as the template's variables. |
| Body Parameter Names | Only for named-variable templates ({{first_name}}). Supply the names (first_name, braces optional) in the same order/size as Body Parameters; leave blank for positional templates. |
| Button URL Parameter | The dynamic suffix for a URL button, if the template defines one. |
| Contact / To Phone / Configuration | As with any send — Contact supplies the phone, or override it; Configuration picks the sending number. |
{{1}}): pass Body Parameters only, in order.{{first_name}}): pass Body Parameters and Body Parameter
Names, aligned one-to-one.WhatsAppSendTemplate.Request r = new WhatsAppSendTemplate.Request();
r.contactId = someContactId;
r.templateName = 'appointment_reminder';
r.languageCode = 'en_US';
r.bodyParameters = new List<String>{ 'Maria', 'Tuesday 10:00' }; // fills {{1}}, {{2}}
// r.buttonUrlParameter = 'appt/12345'; // if the template has a dynamic URL button
WhatsAppSendTemplate.send(new List<WhatsAppSendTemplate.Request>{ r });
Error_Message__c).Status = Failed and the Meta error on
the message record, and logged to Log_Entry__c.