---
schema_version: "1"
id: 698e1628005883ed998538315cbf30d5666a1e2a1b8539a87f40bfec703926cb
title: PendingServiceRouting
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_pendingservicerouting.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_pendingservicerouting.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 056bb1920fb7aa50bae99d9aff1bb484a0f11c9e5bafa9546dceecb255dfa68a
description: Represents the routing details of a work item that’s waiting to be routed or assigned. This object is available in API version 40.0 and later.
---
# PendingServiceRouting

Represents the routing details of a work item that’s waiting to be routed or assigned. This object is available in API version 40.0 and later.

## Supported Calls

create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update(), upsert()

## Special Access Rules

To access this object, [Omni-Channel](https://help.salesforce.com/articleView?id=omnichannel_intro.htm&type=5&language=en_US) must be enabled.

## Fields

| Field | Details |
| --- | --- |
| BotId | 
Type

reference

Properties

Create, Filter, Group, Nillable, Sort

Description

The ID of the Enhanced Einstein Bot or AI agent that performed the work. This is a relationship field. This field is available in API version 52.0 and later.

This field is a relationship field.

Relationship Name

Bot

Relationship Type

Lookup

Refers To

BotDefinition



 |
| BotType | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

Description

Indicates the type of bot. Valid values are:

- Bot. Refers to an Einstein bot.
- ExternalCopilot. Refers to an AI agent with whom your customers can interact.

The default value is Bot. This field is available in API version 63.0 and later.



 |
| CapacityPercentage | 

Type

percent

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the amount of work that this work item represents as a percentage. Valid values are from 0 to 100.

Voice calls must have a capacity percentage of 100. If an agent receives a voice call, the agent won’t receive new work items until the call ends, because at that point the agent’s capacity will have reached 100%.





 |
| CapacityWeight | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the amount of work that this work item represents as a whole number. Voice calls must use the entire capacity weight.





 |
| CustomRequestedDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Retains the datetime of this work item’s initial request, so work items are rerouted using the datetime of the initial work request. When left blank, work items are rerouted using the datetime when they’re rerouted.



 |
| DropAdditionalSkillsTimeout | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Time to wait before a skill marked as additional is dropped from Omni-Channel routing. The case is then routed to the best-matched agent even if they don’t have all the skills.

If CustomRequestedDateTime is set in the [PendingServiceRouting object](https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/sforce_api_objects_pendingservicerouting.htm), DropAdditionalSkillsTimeout uses CustomRequestedDateTime as the start time. If CustomRequestedDateTime + DropAdditionalSkillsTimeout has already passed, Omni-Channel immediately drops the additional skills after the pending service request is created.





 |
| ExternalBotId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort

Description

The ID of the third-party bot that handles the work item. This is a relationship field. This field is available in API version 64.0 and later.

Relationship Name

ExternalBot

Relationship Type

Lookup

Refers To

ExternalConversationBotDef



 |
| GroupId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

ID of the Omni-Channel queue.



 |
| IsInterruptible | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

Indicates whether a work item consumes interruptible or primary capacity. The default value is false. Available in version 57.0 and later when the Interruptible Capacity feature is enabled.



 |
| IsOwnerChangeInitiated | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

Indicates whether a work item owner change triggered the direct assignment of this work item to the agent. The default value is false.



 |
| IsPreferredUserRequired | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort

Description

Indicates whether this work item stays with the preferred user even when the user isn’t available. The default value is false. This field is available in API version 50.0 and later.

When a specific agent is required, don’t set PushTimeout. These options aren’t supported in this case.



 |
| IsPushAttempted | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

Indicates whether a push has been attempted. true if this work item was pushed to an agent at least one time and false otherwise.



 |
| IsPushed | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

Indicates whether this work item is pushed to an agent.



 |
| IsReadyForRouting | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Indicates whether this work item is ready to be routed to an agent. If true, you can’t edit this PendingServiceRouting record.





 |
| IsStatusChangeInitiated | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

Indicates whether a work item status change triggered the direct assignment of this work item to the agent. The default value is false. This field is available in API version 50.0 and later.



 |
| IsTransfer | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

Indicates whether this work item routing is a transfer request.



 |
| LastDeclinedAgentSession | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

Chat session ID of the agent who last declined this work item.



 |
| Name | 

Type

string

Properties

Autonumber, Defaulted on create, Filter, idLookup, Sort

Description

Name of the PendingServiceRouting record.



 |
| OwnerId | 

Type

reference

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

ID of the owner of this PendingServiceRouting record.



 |
| PausedCapacityPercentage | 

Type

percent

Properties

Create, Filter, Nillable, Sort, Update

Description

The percentage of capacity that’s consumed when this work item is paused. The paused capacity feature is available with status-based capacity and Enhanced Omni-Channel only. This field is available in API version 62.0 and later.



 |
| PausedCapacityWeight | 

Type

double

Properties

Create, Defaulted on create, Filter, Nillable, Sort, Update

Description

The amount of capacity that’s consumed when this work item is paused. The paused capacity feature is available with status-based capacity and Enhanced Omni-Channel only. This field is available in API version 62.0 and later.



 |
| PreferredUserId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

ID of the preferred user to handle the work item.



 |
| PushTimeout | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The time limit set for an agent to respond to an item before it’s rerouted and the agent’s status is changed accordingly. The time limit is measured in seconds. This field is available in API version 36.0 and later.

Effective API version 57.0, for inbound Voice calls, this field represents the time limit set for an agent to respond to a call before it’s declined. The value must be from 0 through 20. The value is capped at 20, so any number greater than that is treated as 20 seconds. Latency on the part of the telephony provider can result in agents having less than 20 seconds to answer a call before it’s rerouted. When an agent attempts to answer a call within 20 seconds and finds that the call was rerouted, the agent’s status remains unchanged. This scenario applies to these telephony models.

- Salesforce Voice with Amazon Connect
- Salesforce Voice with Partner Telephony from Amazon Connect

When IsPreferredUserRequired is set to true, don’t set this option. When a specific agent is required, this option isn’t supported.



 |
| QueueId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

ID of the Omni-Channel queue. Due to API changes, QueueId is no longer recommended. Use GroupId instead.



 |
| RoutingModel | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

Type of routing model.

Possible values are:

- ExternalRouting
- LeastActive
- MostAvailable





 |
| RoutingPriority | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Order in which work items are routed to agents. This field is considered with skills-based routing only. Queue-based routing sets a work item's priority from the routing configuration.





 |
| RoutingType | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

Description

Indicates whether the work item is routed by queue or by skills-based routing.

Possible values are:

- QueueBased
- SkillsBased





 |
| SecondaryRoutingPriority | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Indicates the secondary routing priority.



 |
| Serial | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

Serial number of the PendingServiceRouting record. The serial number is automatically incremented each time the PendingServiceRouting record is modified.



 |
| ServiceChannelId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

ID of the service channel.



 |
| TargetAcceptDateTime | 

Type

dateTime

Properties

Filter, Nillable, Sort, Update

Description

The date and time by when a rep must accept a work item. Influences backlog ordering by prioritizing work items with earlier target acceptance deadlines. The field can be dynamically set using Flow for each work item during the routing process. This allows for flexible prioritization based on case urgency, customer tier, or other business rules. Available in API version 65.0 and later.



 |
| TransferRequesterId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The user ID of the rep who reassigned the work using the Reassign action. This field is populated in reassigned AgentWork records only, not the original AgentWork record. This is a relationship field. This field is available in API version 63.0 and later.

Relationship Name

TransferRequester

Relationship Type

Lookup

Refers To

User



 |
| WorkItemId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

ID of the work item.

Refers To

Custom objects and these standard objects: Account, Activity, Case, Claim, ClaimCoverage, ClaimRecovery, Contact, ContactRequest, CustomEntityData, Incident, Lead, LiveChatTranscript, MessagingSession, Opportunity, Orchestration Work Items, Order, Order, PaymentRequest, PersonTraining, Referral, SocialPost, SwarmMember, and VoiceCall. WorkOrder is available in version 58.0 and later.



 |

## Usage

When you use the PendingServiceRouting object for queue-based routing, the object doesn’t invoke triggers before or after insert, or any action (trigger, workflow rule, validation) that could interfere with the creation of the record.

## Associated Objects

This object has these associated objects. Unless noted, they’re available in the same API version as this object.

[PendingServiceRoutingChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm "A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.") (API version 62.0)

Change events are available for the object.

[PendingServiceRoutingOwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_ownersharingrule.htm "StandardObjectNameOwnerSharingRule is the model for all owner sharing rule objects associated with standard objects. These objects represent a rule for sharing a standard object with users other than the owner.")

Sharing rules are available for the object.

[PendingServiceRoutingShare](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_share.htm "StandardObjectNameShare is the model for all share objects associated with standard objects. These objects represent a sharing entry on the standard object.")

Sharing is available for the object.

## Limits

You can view the number of Pending Service Routing records that are currently in use in your org, as well as the current hourly use rate. From Setup, enter Omni-Channel in the Quick Find box and select **Limits**. The Limits page also displays the current Pending Service Routing record usage percentage and the Pending Service Routing record limits for your org.