This event occurs when an inbound message is received on a chat that is currently assigned to a Virtual Agent. This event also supports any inbound messages appended via REST APIs using the POST /chats/:chatid/messages endpoint
{
"event_type": "message.received",
"channel": "LiveChat",
"chat_id": "CSRCJ17FWP50IOZ9",
"asset": "im15102452",
"destination_id": "d3a7c304-da43-4ab2-bf7c-0ea4733ab16c",
"thread_id": "ece941a6-3103-4232-947b-d3b5b31fe866",
"browserfingerprint": "d3a7c304-da43-4ab2-bf7c-0ea4733ab16c",
"subject": "",
"posted_on": "2020-07-06T07:11:45.2743797Z",
"payload": {
"messages": [
{
"transid": "8d125f60-38c4-45ba-823b-cf4c7f86cbf8|503bdb15-9696-11ea-8d4c-005056ad794f",
"type": "interactive",
"text": "",
"attachments": [],
"timestamp": "2020-07-02T05:16:33.093Z",
"interactive_response": {
"title": "Option 1",
"postback": "option-1"
},
"wab_interactive_response": {
"identifier": "<uuid>",
"title": "Button 1"
}
}
]
},
"transaction_id": "eb42d2ecda2e42068a21419e2260494e"
}
Payload Description
Name | Type | Description |
---|---|---|
event_type | string | Contains a pre-fixed name of the event |
channel | enum | Channel on which chat has been created: - sms - facebook - twitter - livechat - email - abc - whatsapp - api |
chat_id | string | Unique identifier of a chat |
destination_id | string | The destination ID of the end customer being addressed based on the channel - SMS - Mobile No - Facebook - PS ID - Twitter - Twitter ID - Email - Email ID - API - User ID - Livechat - Livechat ID - Apple Business Chat - ABC Opaque User ID - WhatsApp Business - WhatsApp Mobile Number |
thread_id | string | Unique identifier of a chat on the Livechat widget Applicable to Livechat channel alone |
browserfingerprint | string | Unique identifier of a customer's device on the Livechat widget. Stored in a cookie within the customer's browser (to fetch previous chat history if at all widget chat history is enabled by the Client Admin) Applicable to Livechat channel alone |
subject | string | Subject of the Email chat Applicable to Email channel alone |
posted_on | datetime | Timestamp of when the event request was initiated from Webex Engage |
payload | object | Contains an JSON object specific to the event_type |
message.received - Payload OBJECT
Name | Type | Description |
---|---|---|
messages | array | Contains the last message (OBJECT) received/sent from/to the customer on the chat. This block is channel specific. Kindly refer to the message OBJECT definition in /chats/:chat_id section for further details |
transid | string | Unique trace of the request streamed onto the BOT's webhook |
Note
Replies to WhatsApp's interactive templates are received under the object
wab_interactive_response
Best Practice
We recommend BOT developers to store the chat ID and transid received as part of any events received. These details will help our support teams debug better should any issues arise as part of the integration