[Webinar] Build, Automate & Level-up with Zoho Cliq Developer Platform - Register now

Skip to main content

Message Details Object

The Message Details object in Cliq is used to extend the functionality of a bot. It enables the bot to process the users' replies in a much more meaningful context. The message_details object is passed as an attribute to the Bot Mention Handler and Bot Message Handler.

Properties of the message_details object :

AttributeDescription
timeThe message sent time.
messageA JSON Object with details about the message.

The structure of the message JSON object differs depending on whether it is a Text, Link or Attachment.  

Properties of the message object type : text

AttributeDescription
replied_messageDetails of the message to which the current message is added as a reply.
typeThe type of message. For text messages, the type is 'text'.
textThe message content.
mentionsJSON Array of objects with details about the users or bots mentioned in the message.

Properties of replied_message object :

AttributeDescription
senderDetails of the sender
timeThe message sent time.
mentionsJSON Array of objects with details about the users or bots mentioned in the message.
{
    "time":1606715627231,
    "message":    
 	{ 
               "replied_message": 
   	              {
                             "sender":  
 			         {
                                       "name":"WorkDriveBot",
                                       "id":"b-1735998001178543591"
                                 },
                              "mentions":[],
                              "time":1606715211110,
                              "text":"hi",
                              "id":"1606715211110_614577765734",
                              "type":"text"
                        },
                "mentions":   
                    [
                        {
                           "last_name":"fisher",
                           "dname":"@scottfisher",
                           "id":"664347134",
                           "type":"user",
                           "first_name":"scott",
                           "email":"scott.fisher@zylker.com"
                         }
                    ],
                "text":"{@}",
                "type":"text"
          }
}

Properties of the message object type : attachment

AttributeDescription
fileJSON object containing details of the file shared
commentComment added to the attachment.
typeThe type of message. For attachments , the type is 'attachment'.

File object properties

AttributeDescription
nameName of the file
idUnique identifier for the file
typeMedia type of the file
urlDownload url of the file
{
    "is_read": true,
    "sender": {
        "zoho_user_id": "7876541",
        "name": "Ryan",
        "last_name": "West",
        "id": "7876541",
        "first_name": "Ryan West",
        "email": "ryan.west@zylker.com"
    },
    "ack_key": "1746526116027",
    "time": "1746526121149",
    "id": "1746529821149_3284638409123",
    "type": "file",
    "content": {
        "thumbnail": {
            "width": "3012",
            "blur_data": "/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAFA3PEY8MlBGQUZaVVBfeMiCeG5uePWvuZHI////////2wBDAVVaWnhpeOuCguv///////////////////////////wAARCAAdADIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl+yR/7X51Nzn2oJOeP5UARfZIsfxfnSfY4/VvzqbJ9f8Ax00ooAg+xx+rfnR9kj9W/Oo/tb+qfkaQ3j/7B/A0AS/ZI/Vvz/8ArUVD9sk9F/I/40UwsXM+9LimB8tjHf1qSkAlLRRQBn/aZezfoKPtM3979BUajOaCMYoAk+0zf3/0FFRUUwP/2Q==",
            "height": "1798"
        },
        "file": {
            "name": "Campaign_logo.png",
            "id": "a_01007515918617465261211230_1_64396901",
            "type": "image/png",
            "dimensions": {
                "size": 500385,
                "width": 3012,
                "height": 1798
            }
        },
        "comment": "Hello Design Team, Could you review this logo?"
    },
    "file": "Campaign_logo.png"
}