...
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. |
...
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. |
...
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" } |
Form message (bot):
Name | Type | Description | ||||
---|---|---|---|---|---|---|
title |
| title fo the form | ||||
response_to_bot |
| query sent back to the bot after the form is submitted | ||||
formData |
| array of objects that defines the form fields. The object has the same properties of the data collection object Data Collection Object | ||||
user |
| Semplified user object containing only user id and isAgent properties of the user who sent the message. |
Example
Code Block | ||
---|---|---|
| ||
{
"data" : {
"replyTo" : "",
"id" : "f3f3352c-7f50-43c6-9dd8-7db3fa44ce8c",
"messageType" : "FORM",
"content" : {
"title" : "Titolo Form",
"response_to_bot" : "ciao",
"formData" : [
{
"value" : "",
"label" : "Società",
"customMandatoryErrorMessage" : "Campo obbligatorio",
"isMandatory" : true,
"custom_regexp" : "",
"customValidationErrorMessage" : "",
"mode" : "manual",
"isEditable" : true,
"isVisibleCustomer" : true,
"isVisibleAgent" : true,
"name" : "company",
"dc_type" : "text"
},
{
"label" : "Indirizzo",
"custom_regexp" : "",
"name" : "address",
"isEditable" : true,
"customMandatoryErrorMessage" : "Indirizzo obbligatorio",
"isVisibleCustomer" : true,
"isVisibleAgent" : true,
"mode" : "manual",
"value" : "",
"dc_type" : "text",
"isMandatory" : true,
"customValidationErrorMessage" : ""
},
{
"value" : "",
"dc_type" : "email",
"isVisibleCustomer" : true,
"mode" : "manual",
"isMandatory" : true,
"isVisibleAgent" : true,
"customMandatoryErrorMessage" : "Email obbligatoria",
"custom_regexp" : ".*@.*",
"customValidationErrorMessage" : "Email non valida",
"label" : "Email",
"name" : "email2",
"isEditable" : true
},
{
"options" : {
"mattina" : "Mattina",
"pomeriggio" : "Pomeriggio"
},
"name" : "fascia",
"isMandatory" : true,
"dc_type" : "select",
"value" : "",
"isVisibleCustomer" : true,
"customValidationErrorMessage" : "",
"isEditable" : true,
"mode" : "manual",
"customMandatoryErrorMessage" : "Fascia richiamo obbligatoria",
"isVisibleAgent" : true,
"custom_regexp" : "",
"label" : "Quando vuoi essere richiamato?"
}
],
"user" : {
"id" : "BOT_BOT1",
"isAgent" : true
}
},
"ts" : 1679325464928.0,
"deliverySuccess" : true,
"deliveryErrorReason" : ""
},
"room" : "CHAT_DEFAULT_df3b98ab-4a53-4d1f-8138-c3b45a58c9a0"
} |
Form response message (bot):
The form response message has the same structure of the form message, with the addition that the field “value” is filled with the customer response.
Example
Code Block | ||
---|---|---|
| ||
{
"data" : {
"replyTo" : "",
"id" : "1601da67-ccf3-495e-b86b-3c51bae8789d",
"messageType" : "FORM_RESPONSE",
"content" : {
"title" : "Titolo Form",
"response_to_bot" : "ciao",
"formData" : [
{
"value" : "Enghouse",
"label" : "Società",
"customMandatoryErrorMessage" : "Campo obbligatorio",
"isMandatory" : true,
"custom_regexp" : "",
"customValidationErrorMessage" : "",
"mode" : "manual",
"isEditable" : true,
"isVisibleCustomer" : true,
"isVisibleAgent" : true,
"name" : "company",
"dc_type" : "text"
},
{
"label" : "Indirizzo",
"custom_regexp" : "",
"name" : "address",
"isEditable" : true,
"customMandatoryErrorMessage" : "Indirizzo obbligatorio",
"isVisibleCustomer" : true,
"isVisibleAgent" : true,
"mode" : "manual",
"value" : "Viale Sarca 336, edificio 12",
"dc_type" : "text",
"isMandatory" : true,
"customValidationErrorMessage" : ""
},
{
"value" : "legal.operations@enghouse.com",
"dc_type" : "email",
"isVisibleCustomer" : true,
"mode" : "manual",
"isMandatory" : true,
"isVisibleAgent" : true,
"customMandatoryErrorMessage" : "Email obbligatoria",
"custom_regexp" : ".*@.*",
"customValidationErrorMessage" : "Email non valida",
"label" : "Email",
"name" : "email2",
"isEditable" : true
},
{
"options" : {
"mattina" : "Mattina",
"pomeriggio" : "Pomeriggio"
},
"name" : "fascia",
"isMandatory" : true,
"dc_type" : "select",
"value" : "mattina",
"isVisibleCustomer" : true,
"customValidationErrorMessage" : "",
"isEditable" : true,
"mode" : "manual",
"customMandatoryErrorMessage" : "Fascia richiamo obbligatoria",
"isVisibleAgent" : true,
"custom_regexp" : "",
"label" : "Quando vuoi essere richiamato?"
}
],
"user" : {
"id" : "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef",
"isAgent" : false
}
},
"ts" : 1679325479470.0,
"deliverySuccess" : true,
"deliveryErrorReason" : ""
},
"_id" : ObjectId("64187943bb85a6727df80efc"),
"room" : "CHAT_DEFAULT_df3b98ab-4a53-4d1f-8138-c3b45a58c9a0"
} |
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" } |