Newer Version Available
lightning:conversationAgentSend
Event triggered when an agent sends a chat
message through the Salesforce console. This method intercepts the message before it’s
sent to the chat visitor.
Response
| Name | Type | Description |
|---|---|---|
| recordId | String | The ID of the work record that’s associated with the current chat. |
| content | String | The text of the message in the chat log. |
| name | String | The name of the agent who is attempting to send the message. This name matches the agent name displayed in the chat log. |
| type | String | The type of message that was received—for example, agent. |
| timestamp | Date/Time | The date and time that the agent attempted to send the chat message. |
Example
Component code:
Controller code: