getAgentWorks for Lightning Experience
Returns a list of work items that are assigned to an agent and open in the agent’s workspace.
Component code:
Controller code:
This method returns a promise that, upon success, resolves to an array of work objects, containing the following fields.
| Name | Type | Description |
|---|---|---|
workItemId | String | The ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a workId when it’s assigned to an agent. |
workId | String | The ID of a work assignment that’s routed to an agent. |
isEngaged | Boolean | Indicates whether an agent is working on a work item that’s been assigned to them (true) or not (false). |