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 :
Attribute | Description |
time | The message sent time. |
message | A 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
Attribute | Description |
replied_message | Details of the message to which the current message is added as a reply. |
type | The type of message. For text messages, the type is 'text'. |
text | The message content. |
mentions | JSON Array of objects with details about the users or bots mentioned in the message. |
Properties of replied_message object :
Attribute | Description |
sender | Details of the sender |
time | The message sent time. |
mentions | JSON 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
Attribute | Description |
file | JSON object containing details of the file shared |
comment | Comment added to the attachment. |
type | The type of message. For attachments , the type is 'attachment'. |
File object properties
Attribute | Description |
name | Name of the file |
id | Unique identifier for the file |
type | Media type of the file |
url | Download 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"
}