Newer Version Available
lightning:conversationNewMessage
Event triggered when the customer, agent,
or supervisor sends a new message. This event is also triggered when using Enhanced
Messaging channels.
Response
| Name | Type | Description |
|---|---|---|
| recordId | String | The ID of the work record that’s associated with the current chat. |
| content | String | The text sent by the agent. |
| name | String | The name of the user who sent the message. This name matches the username displayed in the chat log. |
| type | String | The type of message that was received, such as an Agent or Visitor message. |
| timestamp | Date/Time | The date and time the message was received. |
Example
Component code:
Controller code: