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