Newer Version Available

This content describes an older version of this product. View Latest

AgentWork

Represents a work assignment that’s been routed to an agent. This object is available in API version 32.0 and later.

Supported Calls

create(), delete(), query(), getDeleted(), getUpdated(), retrieve(), undelete()

Fields

Field Details
AcceptDatetime
Type
dateTime
Properties
Filter, Nillable, Sort
Description
Indicates when the work item was accepted.
AgentCapacityWhenDeclined
Type
double
Properties
Filter, Nillable, Sort
Description
The agent’s capacity when declining work, either explicitly or through push timeout.
AssignedDateTime
Type
dateTime
Properties
Filter, Nillable, Sort
Description
Indicates when the work item was assigned to an agent,
CancelDateTime
Type
dateTime
Properties
Filter, Nillable, Sort
Description
Indicates when the work item was canceled.
CapacityPercentage
Type
percent
Properties
Filter, Nillable, Sort
Description
The percentage of an agent’s capacity for work items that’s consumed by a specific type of work item from this service channel.

When combined work items reach 100% for an agent, the agent won’t receive new work items until there is enough open capacity for more work. For example, if you give phone calls a capacity percentage of 100. an agent on a call doesn’t receive new work items until the call ends.

CapacityWeight
Type
double
Properties
Filter, Nillable, Sort
Description
The amount of an agent’s capacity for work items that’s consumed by a work item from this service channel.

For example, if cases are assigned a capacity weight of 2, an agent with a capacity of 6 can accept up to 3 cases before the agent is at capacity and can’t receive new work items.

CloseDateTime
Type
dateTime
Properties
Filter, Nillable, Sort
Description
Indicates when the work item was closed.
CreatedById
Type
reference
Properties
Defaulted on create, Filter, Group, Sort
Description
The ID of the user who created the work item.
CreatedDate
Type
dateTime
Properties
Defaulted on createFilter, Sort
Description
Indicates when the work item was created.
DeclineDatetime
Type
dateTime
Properties
Filter, Nillable, Sort
Description
Indicates when the work item was declined by an agent.
Id
Type
ID
Properties
Defaulted on create, Filter, Group, idLookup, Sort
Description
The ID of the AgentWork object.
IsDeleted
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the work item was deleted.
LastModifiedById
Type
reference
Properties
Defaulted on create, Filter, Group, Sort
Description
The ID of the user who last modified the work item.
LastModifiedDate
Type
dateTime
Properties
Defaulted on create, Filter, Sort
Description
Indicates when the work item was most recently modified.
Name
Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
An automatically generated ID number that identifies the record.
OriginalQueueId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
The ID of the queue that the work assignment was originally routed to.
PushTimeout
Type
int
Properties
Filter, Group, Nillable, Sort
Description
The number of seconds set for push timeout. 0 is returned when push timeout isn’t enabled. Available in API version 36.0 and later.
PushTimeoutDateTime
Type
dateTime
Properties
Filter, Nillable, Sort
Description
Indicates when the push timeout event occurred. Available in API version 36.0 and later.
RequestDateTime
Type
dateTime
Properties
Filter, Nillable, Sort
Description
Indicates when the work was requested.
ServiceChannelId
Type
reference
Properties
Create, Filter, Group, Sort
Description
The ID of the service channel that’s associated with the work assignment.
SpeedToAnswer
Type
int
Properties
Filter, Group, Nillable, Sort
Description
The amount of time between when the work was requested and when an agent accepted it.
Status
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The working status of the work item. Valid values are:
  • Assigned
  • Unavailable
  • Declined
  • Opened
  • Closed
SystemModStamp
Type
dateTime
Properties
Defaulted on create, Filter, Sort
Description
Indicates when the work was modified, either directly or by changes to another object. For example, if you create a Case and it’s automatically assigned to a user, the OwnerId field on the AgentWork object changes.
UserId
Type
reference
Properties
Create, Filter, Group, Sort
Description
The ID of the user that the work item was assigned to.
WorkItemId
Type
reference
Properties
Create, Filter, Group, Sort
Description
The ID of the object that’s routed to the agent through Omni-Channel.

Usage

AgentWork records can only be deleted if they have the status Closed, Declined, or Unavailable. They can’t be deleted if their status is Assigned or Opened because they’re active in Omni-Channel.

AgentWork records have the status Assigned when they’re created. Once created, the record is automatically pushed to the assigned agent.

While the metadata for AgentWork indicates support for upsert() and update(), these calls aren’t used with AgentWork because none of its fields can be updated.