Name | Type | Description | ||||
---|---|---|---|---|---|---|
_id |
| Internal object identifier | ||||
room |
| Chat unique identifier | ||||
ctlive_type |
| Chat type according to the initiator. Can be one of the following values: “chat” “cbn” “cbl” “cbfs” “call” | ||||
messages |
| Array containing chat messages. See Message Object for more details. |
...
Name
...
Type
...
Description
...
room
...
Status | ||
---|---|---|
|
...
Chat unique identifier
...
data
...
Status | ||
---|---|---|
|
...
Object containing message info. See message data object for more details.
Message Data Object
Name
Type
Description
id
Status | ||
---|---|---|
|
message unique identifier
messageType
Type of the message. Can assume one of the following values:
“TEXT”
“IMAGE”
“DOCUMENT”
“LINK”
ts
Status | ||
---|---|---|
|
Timestamp of when message was sent
deliverySuccess
Status | ||
---|---|---|
|
Indicates whether the message was sent successfully
deliveryErrorReason
Status | ||
---|---|---|
|
Error occurred if the message was not sent correctly
replyTo
Status | ||
---|---|---|
|
Message ID you are replying to
content
Status | ||
---|---|---|
|
Message content. See message content object for more details.
Message Content Object
...
Name
...
Type
...
Description
...
text
...
Status | ||
---|---|---|
|
...
Only in “TEXT” message, contains the message sent
...
user
...
Status | ||
---|---|---|
|
...
Semplified user object containing only user id and isAgent properties of the user who sent the message.
...
url
...
Status | ||
---|---|---|
|
...
Contains the url of the link message
Example
Code Block | ||
---|---|---|
| ||
{ "_id" : "CHAT_DEFAULT_8857106a-55b8-4c47-a5af-a3aae7530e5a", "room" : "CHAT_DEFAULT_8857106a-55b8-4c47-a5af-a3aae7530e5a", "ctlive_type" : "chat", "messages" : [ { "data" : { "replyTo" : "", "id" : "aWdfZAG1faXRlbToxOklHTWVzc2FnZAUlEOjE3ODQxNDUwODQxMzk0OTA4OjM0MDI4MjM2Njg0MTcxMDMwMDk0OTEyODE2NzQwNTg4MTcxMjQ0NzozMDMwMDcwMTg3NTA5MTIwMjkwMzUzNDkzMzgzMjEwNTk4NAZDZD", "messageType" : "TEXT", "content" : { "text" : "prova1", "user" : { "id" : "4747235938674011", "isAgent" : false } }, "ts" : 1642604343631.0, "deliverySuccess" : true, "deliveryErrorReason" : "", "messageSeen" : null }, "_id" : ObjectId("61e8277aef3d6b076066d287"), "room" : "CHAT_DEFAULT_8857106a-55b8-4c47-a5af-a3aae7530e5a" }, { "data" : { "replyTo" : "", "id" : "fb32e661-136d-4867-a1f8-a31eca5b673a", "messageType" : "TEXT", "content" : { "text" : "Buongiorno, sono l'operatore Gabriele Verde, come posso esserle utile?", "user" : { "id" : "USER_gverde1@acd.enghouse.com", "isAgent" : true } }, "ts" : 1642604351616.0, "deliverySuccess" : true, "deliveryErrorReason" : "", "messageSeen" : null }, "_id" : ObjectId("61e8277aef3d6b076066d288"), "room" : "CHAT_DEFAULT_8857106a-55b8-4c47-a5af-a3aae7530e5a" }, { "data" : { "replyTo" : "", "id" : "ba35d81d-d56e-49b4-ae17-020b9e477281", "messageType" : "endChat", "ts" : 1642604409492.0, "deliverySuccess" : true, "deliveryErrorReason" : "", "messageSeen" : null "content" : { "user" : { "isAgent" : true, "id" : "USER_gverde1@acd.enghouse.com" } } }, "_id" : ObjectId("61e8277aef3d6b076066d289"), "room" : "CHAT_DEFAULT_8857106a-55b8-4c47-a5af-a3aae7530e5a" } ], "__v" : 0 } |