Newer Version Available
lightning__conversationEnded
Messaging event triggered when an active
chat ends or an agent leaves a chat conference. 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. |
LWC Sample Code
To listen to the lightning__conversationEnded event, import the Lightning Message Service features from lightning/messageService and pass the event to the subscribe() method.
Aura Components Sample Code
Component code:
Controller code: