Newer Version Available

This content describes an older version of this product. View Latest

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.

Response

Name Type Description
recordId String The ID of the work record that’s associated with the current chat.

Example

Component code:

1<lightning:messageChannel type="lightning__conversationEnded" scope="APPLICATION" 
2                          onMessage="{!c.onConversationEndedEvent}" />

Controller code:

1({
2    onConversationEndedEvent: function(cmp, evt, helper) {
3        var conversation = cmp.find("conversationKit");
4        var recordId = evt.getParam("recordId");
5
6        console.log("recordId:" + recordId);
7    }
8})