Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
lightning:conversationNewMessage
Event triggered when the customer sends a
new message. This event is also triggered when using Enhanced Messaging channels. To
work with Enhanced Messaging channels, the session must be active and the Enhanced
Conversation Component must be visible on the page.
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 customer. |
| 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: