1.0.0
Create and manage WhatsApp template message content and renditions in Marketing Cloud Next. Template messages use approved WhatsApp Business Account templates and support personalized parameters.
This table lists the WhatsApp template message-related use cases that the API supports.
| Supported Use Case | HTTP Verb | URI |
|---|---|---|
| Create WhatsApp template message content | POST | /services/data/{apiVersion}/connect/cms/contents/whatsappTemplate |
| Get WhatsApp template message content | GET | /services/data/{apiVersion}/connect/cms/contents/{contentId} |
| Create a WhatsApp template message rendition | POST | /services/data/{apiVersion}/connect/cms/renditions/whatsappTemplate |
| Update a WhatsApp template message content variant | PUT | /services/data/{apiVersion}/connect/cms/contents/variants/{variantId} |
| Delete a WhatsApp template message content variant | DELETE | /services/data/{apiVersion}/connect/cms/contents/variants/{variantId} |
WhatsApp template messages use pre-approved templates from your WhatsApp Business Account (WABA). Each template content item references a specific WABA template and defines customizable parameters for the header and body sections.
Template messages are made up of these components:
whatsappTemplate—The message definition, which contains a reference to the template in your WhatsApp Business Account.whatsappMessage—The rendition, which contains the metadata and content of the message.
WhatsApp Template Content Structure
The template content type uses a block-based architecture with nested sub-blocks for header and body parameters:
{
"sfdc_cms:title": "WhatsApp Template Message",
"wabaId": "123456789",
"wabaLang": "en",
"wabaTemplateId": "987654321",
"contentBlock": {
"type": "block",
"definition": "sfdc_cms/whatsappTemplateMessage",
"attributes": {
"header": { ... },
"body": { ... }
}
},
"sfdc_cms:template": {
"definition": "@meta/123456789/en/987654321"
}
}
Content Block Architecture
The contentBlock property contains the WhatsApp template message structure:
- header—
sfdc_cms/waTemplateHeaderTextblock with text parameters - body—
sfdc_cms/waTemplateBodyTextblock with text parameters
Each parameter uses the sfdc_cms/waTemplateTextParameter block definition.
Content Properties
| Property | Type | Required | Description |
|---|---|---|---|
sfdc_cms:title |
text | Yes | The name of the content item. |
wabaId |
text | Yes | Your WhatsApp Business Account ID. |
wabaLang |
text | Yes | The language code of the template, such as en. |
wabaTemplateId |
text | Yes | The template ID from your WhatsApp Business Account. |
contentBlock |
block | Yes | A content block that defines the content message. |
description |
multiline text | No | A description of the message template. |
wabaManageTemplateTextLink |
text | No | A link to manage templates in your WhatsApp Business Account. |
wabaCountryCurrency |
text | No | A currency code for payment templates. |
whatsappCarouselCards |
block | No | A configuration object for a carousel card. |
sfdc_cms:template |
template | No | A reference to a template definition. |
Data Providers
WhatsApp templates support these data providers for personalization:
sfdc_cms__linkDataProvider—Link datasfdc_cms__unifiedIndividualDataProvider—Unified Individual profile datasfdc_cms__eventListDataProvider—Event list datasfdc_cms__organizationDataProvider—Organization datasfdc_cms__apexClassListDataProvider—Apex class list datasfdc_cms__activationListDataProvider—Activation list datasfdc_cms__couponListDataProvider—Coupon list data
Handlebars Expression Support
WhatsApp template parameter text fields support Handlebars scripting.
Salesforce Marketing Cloud
Let us know so we can improve!