Newer Version Available
endChat() for Lightning Experience
Ends a chat in which an agent is currently engaged. This method works only in
Lightning console apps.
Arguments
| Name | Type | Description |
|---|---|---|
| argumentObj | Object | An object containing all the arguments to be passed into this method. |
argumentObj
| Name | Type | Description |
|---|---|---|
| recordId | String | The ID of the chat that you want to end. |
Sample Code
This example ends the chat and logs the result.
Component
Code:
Controller
Code:
Response
Returns a Promise. Success resolves to true. The Promise is rejected if there's an error.