| description | WhatsApp Business API Integration for Rocket.Chat |
|---|
The WhatsApp app allows you to send template messages to a target user.
In order to send a template message, you have two options:
- REST API Documentation for this endpoint can be found here
-
You can send the template message in a more user-friendly way using the GUI form.
-
To trigger the GUI, open a WhatsApp contact room and run the following command
/whatsapp send-template -
This will open up a modal, where you can select
-
The
Templateyou wish to send, -
The
Languageyou wish to send the template in, -
And also substitute
parameterswithin the message, if present.Note, If parameters (i.e eg ) are present withing the template message, please make sure that you substitute all of them before sending the message. Failure to do so will result in an error.
-
A video demonstration of the above feature is available here:
To receive real-time status updates for outbound messages, you can choose to set a Message Status Endpoint URL. The app will send a request to this URL each time your message status changes to one of the following: queued, failed, sent, delivered, read, or if some error occurs.
You can set the Message Status Endpoint URL in the Apps Settings.
Following is the payload format you will receive on the endpoint
| Field Name | Type | Description |
|---|---|---|
| msId | String or undefined | Message Id. |
| message | String | Text message |
| mobileNo | String | Phone number of WhatsApp user to which you had sent the message |
| connectedWhatsAppNo | String | Your connected WhatsApp Number from which you had sent the message to user |
| MessageStatus | String | Status of message - sent, delivered, read, failed, deleted |
| ErrorDetails | Optional |
Errors from template messages will be shown here |
| type | String | Template-Message or Regular-Message |
| timestamp | String | Timestamp of request |
