After sending messages using the Chat App Message Service API, you can use the SMQ consumption mode or HTTP batch push mode to receive message delivery status updates and user replies.
Usage notes
Network issues, such as poor connectivity or response timeouts, can cause duplicate message receipts or prevent their retrieval.
Message receipt modes
You can receive message receipts in two modes: SMQ consumption mode and HTTP batch push mode. Choose the mode that best fits your needs.
Message receipts do not guarantee idempotency. You are responsible for handling potential duplicates to ensure data integrity and consistency. We recommend designing your receipt processing logic to be idempotent.
-
SMQ consumption mode
In SMQ consumption mode, you use an SMQ queue to receive message receipts for a specific region. All business messages support outbound delivery through SMQ. When you enable SMQ and subscribe to a specific message type (MessageType) in the Chat App Message Service console, the system automatically creates a dedicated message queue and generates a queue name (QueueName). You can then use this QueueName and MessageType to call the SDK from your backend and retrieve receipts from the queue.
-
HTTP batch push mode
In HTTP batch push mode, the system sends data to a specified URL using HTTP POST requests. After you configure a callback URL (callback_url) in the Chat App Message Service console, the system automatically pushes message receipts, such as MO messages and status reports, to that URL.
Message receipt types
After you select a receipt mode, you must subscribe to the message types for the events you want to be notified about. The following message types are available.
|
Type |
Description |
SMQ consumption mode |
HTTP batch push mode |
|
ChatAppInbound (MO message) |
Retrieves messages sent by end users to your business number. |
||
|
ChatAppStatus (MT message status report) |
Tracks the delivery status of outbound messages that you send to end users (MT messages). |
||
|
ChatAppAudit (template review status) |
Receives notifications about the review status of templates created by using the CreateChatappTemplate API. |
Configure message receipt modes
Configure status reports and MO messages
To receive message receipts, you must first enable them in the Chat App Message Service console.
-
Log on to the Chat App Message Service console.
-
In the left-side navigation pane, click Channel Management. Find your channel and click Manage in the Actions column.
-
On the channel's Data Panel page, navigate to the webhook settings based on your channel type:
-
For WhatsApp channels, click .
-
For Messenger channels, click .
-
For Instagram channels, click .
-
-
Configure your message subscriptions.
-
After your page, account, or is connected, click Configure Webhook and select the message types you want to subscribe to.
NoteStatus Report Callback URL: Corresponds to ChatAppStatus (MT message status report).
MO Message Callback URL: Corresponds to ChatAppInbound (MO message).
The dialog box also contains the HTTP Protocol and Message Queue Monitoring toggles, and fields for Message Receipt Queue and MO Message Queue. After completing the configuration, click OK.
-
-
Enable HTTP Protocol and enter the callback URLs for status reports and MO messages. Example:
NoteBest practice: Use distinct URL paths on your server (for example,
https://xxxx.com) for each message type to simplify differentiation.
Not recommended: Avoid routing all message types to a single URL and then parsing the request body to identify the type.-
In the Status Report Callback URL field, enter a URL, such as https://xxxx.com/appstatus.
-
In the MO Message Callback URL field, enter a URL, such as https://xxxx.com/inbound.
-
-
Enable Message Queue Monitoring and click OK.
-
Click Configure Webhook again. In the dialog box that appears, copy the names of the Message Receipt Queue and MO Message Queue.
Configure template review status messages
Currently, only WhatsApp channels support this feature.
-
Log on to the Chat App Message Service console.
-
In the left-side navigation pane, click Channel Management. Find your channel and click Manage in the Actions column.
-
On the channel's Data Panel page, in the left-side navigation pane, click .
-
Enable HTTP Protocol and enter the notification callback URL.
-
In the Notification Callback URL field, enter a URL. For example: https://xxxx.com/appaudit
-
Enable Message Queue Monitoring and click OK.
In the Channel Webhook Settings dialog box, enabling Message Queue Monitoring reveals the Notification Queue field, where you can copy the queue name. You can also select an API version as needed.
-
-
Click Channel Webhook Settings again. In the dialog box that appears, copy the Notification Queue name.
SMQ SDK download
You can download the SMQ Java SDK to pull messages from your SMQ queue.
SDK Download: SMQ Java SDK