Versions Compared

Key

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

...

Code Block
languagejson
{
    "data" : {
        "replyTo" : "",
        "id" : "16daf4d4-a77f-406f-ab75-0475f510bc95",
        "messageType" : "DOCUMENT",
        "content" : {
            "caption" : "",
            "fileName" : "WHATSAPP-TEMPLATE-AD-v09.xlsx",
            "documentType" : "xlsx",
            "user" : {
                "id" : "USER_gverde1@acd.enghouse.com",
                "isAgent" : true
            }
        },
        "ts" : 1643191652417.0,
        "deliverySuccess" : true,
        "deliveryErrorReason" : ""
    },
    "_id" : ObjectId("61f11d7cd42454470cb22da6"),
    "room" : "CHAT_DEFAULT_a098a0bc-b34c-452c-829c-1b03aa7a67ee"
}

Video message:

Name

Type

Description

caption

Status
titleSTRING

Message caption

fileName

Status
titlestring

Contains name of the document/image message

documentType

Status
titlestring

Document format

user

Status
titleobject

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

Example

Code Block
languagejson
{
    "data" : {
        "replyTo" : "",
        "id" : "m_dXya7ckVUHyYxQHcQrrdgT2MVSImQFjQ7aCDxA_Mxf7AeR9GMI0vDs2dy2PKgTjE24tQrJImLWYnR5hgtpt7Uw",
        "messageType" : "VIDEO",
        "content" : {
            "caption" : "",
            "fileName" : "video.mp4",
            "documentType" : "mp4",
            "user" : {
                "id" : "4149729381806003",
                "isAgent" : false
            }
        },
        "ts" : 1643207226322.0,
        "deliverySuccess" : true,
        "deliveryErrorReason" : ""
    },
    "_id" : ObjectId("61f15a4c932c660c83d5e229"),
    "room" : "CHAT_DEFAULT_06b6ace1-a923-4657-876b-c6432729610d"
}

Audio message:

caption

Status
titleSTRING

Message caption

fileName

Status
titlestring

Contains name of the document/image message

documentType

Status
titlestring

Document format

user

Status
titleobject

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

Example

Code Block
languagejson
{
    "data" : {
        "replyTo" : "",
        "id" : "m_JLR7O2EHIE6d3fiskFBiqz2MVSImQFjQ7aCDxA_Mxf6hm6TYUaJKXiEqfYgCX8WKxriZux06OzPB8XLZa8yNKA",
        "messageType" : "AUDIO",
        "content" : {
            "caption" : "",
            "fileName" : "audioclip-1643206881000-5760.mp4",
            "documentType" : "mp4",
            "user" : {
                "id" : "4149729381806003",
                "isAgent" : false
            }
        },
        "ts" : 1643206886118.0,
        "deliverySuccess" : true,
        "deliveryErrorReason" : ""
    },
    "_id" : ObjectId("61f158ee932c660c83d5e1fa"),
    "room" : "CHAT_DEFAULT_24ec70f1-b92d-44c4-94ad-49bcd15986ea"
}

Link message:

Name

Type

Description

url

Status
titlestring

Contains the url of the link message

user

Status
titleobject

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

Example

Code Block
languagejson
{
    "data" : {
        "replyTo" : "",
        "id" : "17909c52-1f26-402c-90cb-3106ba80bb3b",
        "messageType" : "LINK",
        "content" : {
            "url" : "https://www.google.it",
            "user" : {
                "id" : "USER_gverde1@acd.enghouse.com",
                "isAgent" : true
            }
        },
        "ts" : 1643191666618.0,
        "deliverySuccess" : true,
        "deliveryErrorReason" : ""
    },
    "_id" : ObjectId("61f11d7cd42454470cb22da7"),
    "room" : "CHAT_DEFAULT_a098a0bc-b34c-452c-829c-1b03aa7a67ee"
}

Video

...

events messages:

All video messages have the audio and video boolean properties to indicate the channel used.

...

Name

Type

Description

user

Status
titleobject

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

Example

Code Block
languagejson
{
    "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"
}