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.

NameTypeDescription
callbackfunctionJavaScript 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:

NameTypeDescription
successBooleantrue if retrieving the agent’s work items was successful; false if retrieving the agent’s work items wasn’t successful.
worksJSON string of work objectsA 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:

NameTypeDescription
workItemIdStringThe 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.
workIdStringThe ID of a work assignment that’s routed to an agent.
isEngagedBooleanIndicates whether an agent is working on a work item that’s been assigned to them (true) or not (false).