---
schema_version: "1"
id: 40cf7b3919d922a2cc4b4b1a3e7df320b7a7db4c7f761b2288ef61ee3e7a39bb
title: ServiceResourceCapacity
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_serviceresourcecapacity.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceresourcecapacity.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 944313fadd5dd86361039b602c4079705441543f4525f164b448ef71555736df
description: Represents the maximum number of scheduled hours or number of service appointments that a capacity-based service resource can complete within a specific time period. This object is available in API version 38.0 and later.
---
# ServiceResourceCapacity

Represents the maximum number of scheduled hours or number of service appointments that a capacity-based service resource can complete within a specific time period. This object is available in API version 38.0 and later.

## Supported Calls

create(), delete(), describeLayout(), getDeleted(), getUpdated(), query(), retrieve(), search(), update(), upsert()

## Special Access Rules

Field Service must be enabled.

## Fields

| Field Name | Details |
| --- | --- |
| CapacityInHours | 
Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

The number of hours that the resource can work per time period. You must fill out this field, the CapacityInWorkItems field, or both.



 |
| CapacityInWorkItems | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The total number of service appointments that the resource can complete per time period. You must fill out this field, the CapacityInHours field, or both.



 |
| CapacityNumber | 

Type

string

Properties

Autonumber, Defaulted on create, Filter, idLookup, Sort

Description

(Read only) An auto-generated number identifying the capacity record.



 |
| EndDate | 

Type

date

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The date the capacity ends; for example, the end date of a contract.



 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp for when the current user last viewed a record related to this record.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.



 |
| ServiceResourceId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

The associated service resource. You can set multiple capacities for a resource as long as their start and end dates do not overlap.



 |
| StartDate | 

Type

date

Properties

Create, Filter, Group, Sort

Description

The date the capacity goes into effect.



 |
| TimePeriod | 

Type

picklist

Properties

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

Description

Days, Hours, or Months. For example, if a resource can work 80 hours per month, the capacity’s Time Period would be Month and Hours per Time Period would be 80.



 |

## Usage

Service resources who are capacity-based can only work a certain number of hours or complete a certain number of service appointments within a specified time period. Contractors tend to be capacity-based. To indicate that a service resource is capacity-based, select **Capacity-Based** on the service resource record, then create a capacity record for the service resource.

You must fill out at least one of these fields: CapacityInWorkItems and CapacityInHours. If you’re using the Field Service managed package and would like to measure capacity both in hours and in number of work items, enter a value for both. The resource is considered to reach their capacity based on whichever term is met first—hours or number of work items.

![Important](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note_important.png)

#### Important

If you aren’t using the Field Service managed package, capacity serves more as a suggestion than a rule. Resources can still be as scheduled beyond their capacity, and you aren’t notified when a resource exceeds their capacity.

## Associated Objects

This object has the following associated objects. Unless noted, they are available in the same API version as this object.

[ServiceResourceCapacityChangeEvent](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 54.0)

Change events are available for the object.

[ServiceResourceCapacityFeed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_feed.htm "StandardObjectNameFeed is the model for all feed objects associated with standard objects. These objects represent the posts and feed-tracked changes of a standard object.")

Feed tracking is available for the object.

[ServiceResourceCapacityHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_history.htm "StandardObjectNameHistory is the model for all history objects associated with standard objects. These objects represent the history of changes to the values in the fields of a standard object.")

History is available for tracked fields of the object.