closeAgentWork for Lightning Experience

Changes the status of a work item to Closed and removes it from the list of work items in the Omni-Channel utility.

NameTypeDescription
workIdstringThe ID of the work item that’s closed.

Component code:

Controller code:

This method returns a promise that, upon success, resolves to true and is rejected on error.