Use the /v1/messages endpoint to send templates messages to your customers. What's different about sending template messages is the body content of the message specified with the template parameter. The template parameter contains a namespace and a name pair that identifies the template and the values that apply to variables in that template.
API token & Name spacePlease refer to this page to fine the API Token and the name space: https://developer.cequens.com/reference/whatsapp-business-ver2
Overview
What's different about sending a messages with product or product list is the body content of the message specified with the interactive parameter.
The interactive object generally contains 4 main components: header, body, footer, and action. Additionally, some of those components can contain one or more different objects:
- Inside header, you can nest media objects.
- Inside action, you can nest section and button objects.
Objects Definition
Interactive Object
Name | Description |
|---|---|
type | The type of interactive message you want to send. Supported values:
|
header |
Header content displayed on top of a message. See header object for more information. You cannot set a header if your interactive object is of product type. |
body |
The body of the message. Emojis and markdown are supported. Maximum length: 1024 characters. |
footer |
The footer of the message. Emojis and markdown are supported. Maximum length: 60 characters. |
action | Action you want the user to perform after reading the message. |
Action Object for Single Product
Used for Single Product Messages. This object contains the item mentioned in the message.
| Name | Description |
|---|---|
| catalog_id | ID for the catalog the item belongs to. |
| product_retailer_id | Unique identifier (in the catalog) of the product. |
Action Object for Multi-Product
Used for Multi-Product Messages. This object contains the item mentioned in the message.
Name | Description |
|---|---|
sections | Required for Multi-Product Messages. Array of section objects. There is a minimum of 1 and maximum of 10. See section object. |
catalog_id | Required for Single Product Messages and Multi-Product Messages. Unique identifier of the Facebook catalog linked to your WhatsApp Business Account. This ID can be retrieved via Commerce Manager. |
product_retailer_id | Required for Single Product Messages and Multi-Product Messages. Unique identifier of the product in a catalog. To get this ID , go to Commerce Manager ,select your Facebook Business account, and you will see a list of shops connected to your account. |
Section Object
Name | Description |
|---|---|
title |
Title of the section. Maximum length: 24 characters. |
product_items |
Array of product objects. There is a minimum of 1product per section. There is a maximum of 30 products across all sections. |
Product Object
Name | Description |
|---|---|
product_retailer_id | Required for Multi-Product Messages. Unique identifier of the product in a catalog. To get this ID , go to Commerce Manager , select your Facebook Business account, and you will see a list of shops connected to your account. |