...
Name | Type | Description | ||||
---|---|---|---|---|---|---|
id |
| message unique identifier | ||||
messageType |
| Type of the message. Can assume one of the following values: “TEXT” “IMAGE” “DOCUMENT” “LINK” “AUDIO” “VIDEO” “MENU” “MENU_RESPONSE” “QUICK_REPLY” “QUICK_REPLY_RESPONSE” “FORM” “FORM_RESPONSE” “REACTION” “CONTACTS” “LOCATION” “videoRequestedByAgent” “videoRequestedByCustomer” “videoAccepted” “videoRejected” “videoStarted” “videoEnded” “screenSharingStarted” “screenSharingEnded” “endChat” “leave” | ||||
ts |
| Timestamp of when message was sent | ||||
deliverySuccess |
| Indicates if the message has been succesfully delivered | ||||
deliveryErrorReason |
| In case of delivery failed, describes the error occurred | ||||
replyTo |
| Message ID you are replying to | ||||
content |
| Message content. See message content object for more details. |
...
Text message
Name | Type | Description | ||||
---|---|---|---|---|---|---|
text |
| Only in “TEXT” message, contains the message sent | ||||
user |
| Semplified user object containing only user id and isAgent properties of the user who sent the message. |
...
Name | Type | Description | ||||
---|---|---|---|---|---|---|
text |
| Menu title | ||||
options |
| Array of objects for the various possibilities of choice. See the next section for more details. | ||||
user |
| Semplified user object containing only user id and isAgent properties of the user who sent the message. |
option object:
Name | Type | Description | ||||
---|---|---|---|---|---|---|
id |
| Unique option id | ||||
command |
| Menu action. Can assume one of the following values:
| ||||
text |
| label shown in the option | ||||
targetUrl |
| text to send as a next query to the bot | ||||
params |
| array of two objects that specify how to open the external url. The first object has two properties:
The second object has two properties:
|
...
Name | Type | Description | ||||
---|---|---|---|---|---|---|
menuId |
| Id of the “MENU” message which was replied to | ||||
option |
| Response that was chosen by the user. See the next section for more details | ||||
user |
| Semplified user object containing only user id and isAgent properties of the user who sent the message. |
option object:
Name | Type | Description | ||||
---|---|---|---|---|---|---|
id |
| Id of the response chosen | ||||
targetUrl |
| query sent to the bot |
...
Code Block | ||
---|---|---|
| ||
{
"data" : {
"replyTo" : "",
"id" : "fdaa821a-4355-4f3a-9507-1184c3285701",
"messageType" : "MENU_RESPONSE",
"content" : {
"menuId" : "d77210fa-4aa2-4876-8fcc-8eaf43122987",
"option" : {
"id" : 0,
"targetUrl" : "vorrei prenotare un volo"
},
"user" : {
"id" : "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef",
"isAgent" : false
}
},
"ts" : 1655210175559.0,
"deliverySuccess" : true,
"deliveryErrorReason" : ""
},
"_id" : ObjectId("62a880c20ece623848eb290b"),
"room" : "CHAT_DEFAULT_84afbdd3-a4be-4057-ae49-32edc6802658"
} |
Quick reply message (bot):
Name | Type | Description | ||||
---|---|---|---|---|---|---|
text |
| Title of the quick reply | ||||
header |
| header of the quick reply | ||||
footer |
| footer of the quick reply | ||||
quickReplies |
| array of strings containing the options (max 3 allowed) | ||||
user |
| Semplified user object containing only user id and isAgent properties of the user who sent the message. |
Example
Code Block | ||
---|---|---|
| ||
{
"data" : {
"replyTo" : "",
"id" : "5bd5fcd0-ee5e-48c9-b825-c3e42b85cc45",
"messageType" : "QUICK_REPLY",
"content" : {
"text" : "Do you want to continue?",
"quickReplies" : [
"No",
"Yes",
"Help"
],
"header" : "Cool Title!",
"footer" : "Cool Footer!",
"user" : {
"id" : "BOT_BOT1",
"isAgent" : true
}
},
"ts" : 1679325011759.0,
"deliverySuccess" : true,
"deliveryErrorReason" : ""
},
"room" : "CHAT_DEFAULT_e7473a4a-88c7-415d-957b-01aac31673c0"
} |
Quick reply response message (bot):
Name | Type | Description | ||||
---|---|---|---|---|---|---|
quickReplyId |
| id of the quick reply message whose response is referring to | ||||
reply |
| quick reply chosen | ||||
user |
| Semplified user object containing only user id and isAgent properties of the user who sent the message. |
Example
Code Block | ||
---|---|---|
| ||
{
"data" : {
"replyTo" : "",
"id" : "wamid.HBgMMzkzNDAzNjA5MTY5FQIAEhggMUM2MjFFNDYxMjIwRTYyQkNGRUVEMEVGMDE5RUVEQTcA",
"messageType" : "QUICK_REPLY_RESPONSE",
"content" : {
"quickReplyId" : "5bd5fcd0-ee5e-48c9-b825-c3e42b85cc45",
"reply" : "Yes",
"user" : {
"id" : "393403602702",
"isAgent" : false
}
},
"ts" : 1679325017885.0,
"deliverySuccess" : true,
"deliveryErrorReason" : ""
},
"room" : "CHAT_DEFAULT_e7473a4a-88c7-415d-957b-01aac31673c0"
} |
Video chat events messages:
...
Name | Type | Description | ||||
---|---|---|---|---|---|---|
user |
| Semplified user object containing only user id and isAgent properties of the user who sent the message. |
Example
Code Block | ||
---|---|---|
| ||
{ "data" : { "id" : "b88d3de0-23b8-41d1-95c3-1209dd4c8cff", "messageType" : "endChat", "ts" : 1617786896642.0, "deliverySuccess" : true, "deliveryErrorReason" : "", "content" : { "user" : { "isAgent" : false, "id" : "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef" } } }, "_id" : ObjectId("606d7810d6e88353f8873297"), "room" : "CHAT_DEFAULT_d06723cf-518e-4767-99b6-6d21d5998081" } |