Description
This event is generated when a user presses a button.
Event for chat tab button
{ "name": "client.pressButton", "userId": "u:cfc76545-3400-4864-892a-513a9f4ae409", "button": "chatTabButton", "userName": "Alyssa P. Hacker", "chat": "u:1e6429de-16b7-48b3-acc0-c2d7ec5ad195", "chatName": "Ben Bitdiddle" }
Event Attributes
Attribute Name | Attribute Type | Attribute Description |
---|---|---|
userId | String | User identifier |
button | String | The button that was pressed. This should have any one of the following values:
|
userName | String | Name of the user |
chat | String | Id of the user or group whose chat tab is open |
chatName | String | Name of the user or group whose chat tab is open |
| String | uid of the message in which the attachment button was pressed. Available only for an attachment button. |
attachmentId | String | id of the attachment, if provided. Available only for an attachment button. |
buttonId | String | Button identifier. Only sent for an attachment buttons, use it to distinguish one attachment button from another. |
Response
Your app can respond with a text
value – this should be a short (upto 100 chars) string that is displayed to the user who pressed the button.
{ "text": "<toaster message>" }