getAgentWorks
Returns a list of work items that are currently assigned to an agent and open in the agent’s workspace. Available in API versions 32.0 and later.
| Name | Type | Description |
|---|---|---|
callback | function | JavaScript method to call when the list of an agent’s work items is retrieved. |
This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties:
| Name | Type | Description |
|---|---|---|
success | Boolean | true if retrieving the agent’s work items was successful; false if retrieving the agent’s work items wasn’t successful. |
works | JSON string of work objects | A JSON string of work objects that represents the work items assigned to the agent that are open in the agent’s workspace. |
The work object contains the following properties:
| 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). |