Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Name

Type

Description

_id

Status
titleSTRING

Internal object identifier

room

Status
titleSTRING

Chat unique identifier

ctlive_type

Status
titleSTRING

Chat type according to the initiator. Can be one of the following values:

“chat”

“cbn”

“cbl”

“cbfs”

“call”

messages

Status
titlearray

Array containing chat messagesid [message object]. See Message Object for more details.

Message Object

Name

Type

Description

room

Status
titleSTRING

Chat unique identifier

data

Status
titleobject

Object containing message info. See message data object for more details.

Message Object

Name

Type

Description

id

Status
titlestring

message unique identifier

messageType

Status
titleSTRING

Type of the message. Can assume one of the following values:

“TEXT”

“IMAGE”

“DOCUMENT”

“LINK”

ts

Status
titleNUMBER

Timestamp of when message was sent

Message Content Object

Name

Type

Description

text

Status
titleSTRING

Only in “TEXT” message, contains the message sent

user

Status
titleobject

Semplified user object containing only user id and isAgent properties of the user who sent the message.

ts

Status
titleNUMBER

Timestamp of when message was sent

url

Status
titleSTRING

Contains the url of the link message

id [content object]

Status
titlestring

Contains the id of the multimedia message sent.

Example

Code Block
languagejson
{ 
   "_id":"5d8dbcdaf6a71d3120275017",
   "room":"CHAT_1c5e4ed8-b675-46f9-866e-b4fc1d893a72",
   "messages":[ 
      { 
         "data":{ 
            "id":"eee89a4f-8000-4589-a5ab-c52d3b520785",
            "messageType":"TEXT",
            "content":{ 
               "text":"hello",
               "user":{ 
                  "id":"USER_gverde1@acd.enghouse.com",
                  "isAgent":true
               }
            },
            "ts":1569569940285.0
         },
         "_id":"5d8dbcdaf6a71d312027501b",
         "room":"CHAT_1c5e4ed8-b675-46f9-866e-b4fc1d893a72"
      },
      { 
         "data":{ 
            "id":"df7da65a-099b-40b4-a076-ff486b245afd",
            "messageType":"LINK",
            "content":{ 
               "url":"https://www.google.com/",
               "user":{ 
                  "id":"USER_c8e1eb84-60d3-4d69-b10b-96364845023e",
                  "isAgent":false
               }
            },
            "ts":1569569956940.0
         },
         "_id":"5d8dbcdaf6a71d312027501a",
         "room":"CHAT_1c5e4ed8-b675-46f9-866e-b4fc1d893a72"
      },
      {
        "data": {
            "id": "a94118a5-9536-4c8c-a3db-18d6a66673b2",
            "messageType": "IMAGE",
            "content": {
                "caption": "AA",
                "documentType": "png",
                "user": {
                    "id": "USER_gverde1@acd.enghouse.com",
                    "isAgent": true
                }
            },
            "ts": 1580293820154
        },
        "_id": "5e315ece8a595c36a05b8de9",
        "room": "CHAT_DEFAULT_990d3e8b-7b1d-402b-974b-69d57ba9eaae"
    },
      {
        "data": {
            "id": "615424ff-994e-4403-88a7-6113b9e56795",
            "messageType": "DOCUMENT",
            "content": {
                "caption": "BB",
                "documentType": "pdf",
                "user": {
                    "id": "USER__eada93a1-5b87-41dd-aa81-e8f7b64d33da",
                    "isAgent": false
                }
            },
            "ts": 1580293833802
        },
        "_id": "5e315ece8a595c36a05b8de8",
        "room": "CHAT_DEFAULT_990d3e8b-7b1d-402b-974b-69d57ba9eaae"
    }
   ],
   "__v":0
}