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.

NameTypeDescription
recordIdStringThe ID of the work record that’s associated with the current chat.

To listen to the lightning__conversationEnded event, import the Lightning Message Service features from lightning/messageService and pass the event to the subscribe() method.

Component code:

Controller code: