---
schema_version: "1"
id: e360ff6cb0a2da053567ee418a515813759d42ea4f79d12b62c4602b08d6886f
title: ServiceResource
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_serviceresource.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceresource.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8aa512e907bc50c2825d6d3382d2f2a1503fd894e7496401a8d7d135e21b3e4b
description: Represents a service technician or service crew in Field Service and Salesforce Scheduler, or an agent in Workforce Engagement. This object is available in API version 38.0 and later.
---
# ServiceResource

Represents a service technician or service crew in Field Service and Salesforce Scheduler, or an agent in Workforce Engagement. This object is available in API version 38.0 and later.

## Supported Calls

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

## Special Access Rules

Field Service or Workforce Engagement must be enabled.

## Fields

| Field Name | Details |
| --- | --- |
| Description | 
Type

textarea

Properties

Create, Nillable, Update

Description

The description of the resource.



 |
| IsActive | 

Type

boolean

Properties

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

Description

When selected, this option means that the resource can be assigned to work orders. For service tracking purposes, resources can’t be deleted, so deactivating a resource is the best way to send them into retirement.

Deactivating a user doesn’t deactivate the related service resource. You can’t create a service resource that is linked to an inactive user.





 |
| IsCapacityBased | 

Type

boolean

Properties

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

Description

Capacity-based resources are limited to a certain number of hours or appointments in a specified time period. The Capacities related list shows a resource’s capacity.



 |
| IsOptimizationCapable | 

Type

boolean

Properties

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

Description

This field is reserved for Field Service and the managed package. Create a custom field instead of using this field to include a service resource in optimization.



 |
| LastKnownLatitude | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

The latitude of the last known location.



 |
| LastKnownLongitude | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

The longitude of the last known location.



 |
| LastKnownLocation | 

Type

location

Properties

Nillable

Description

The service resource’s last known location. You can configure this field to display data collected from a custom mobile app. This field isn’t visible in the user interface, but you can expose it on service resource page layouts or set up field tracking to be able to view a resource’s location history.



 |
| LastKnownLocationDate | 

Type

dateTime

Properties

Filter, Nillable, Sort, Update

Description

The date and time of the last known location.



 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date when the service resource was last modified. Its label in the user interface is Last Modified Date.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date when the service resource was last viewed.



 |
| LocationId | 

Type

reference

Properties

Create, Filter, Group, Sort, Nillable, Update

Description

The location associated with the service resource. For example, a service vehicle driven by the service resource.

LocationId is a relationship field.

Relationship Name

Location

Relationship Type

Lookup

Refers To

Location



 |
| Name | 

Type

string

Properties

Create, Filter, Group, idLookup, Sort, Update

Description

The resource’s name, for example the name or title of the associated user or service crew.



 |
| OwnerId | 

Type

reference

Properties

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

Description

The owner of the service resource.

OwnerId is a polymorphic relationship field.

Relationship Name

Owner

Relationship Type

Lookup

Refers To

Group, User



 |
| RelatedRecordId | 

Type

reference

Properties

Create, Filter, Group, Sort, Nillable, Update

Description

The associated user. Its label in the UI is User. If the service resource represents a service crew rather than a user, leave the User field blank and select the related crew in the ServiceCrewId field.

RelatedRecordId is a relationship field.

Relationship Name

RelatedRecord

Relationship Type

Lookup

Refers To

User



 |
| ResourceType | 

Type

picklist

Properties

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

Description

Indicates whether the resource is a Technician (T), Dispatcher (D), Crew (C), Asset (S), Agent (A), or Planner (P). The default value is Technician (T). Resources who are dispatchers can’t be capacity-based or included in scheduling optimization. Only users with the Field Service Dispatcher permission-set license can be dispatchers. You can’t add additional resource types.

To create a dependent lookup filter with ServiceResource.ResourceType, use only the first letter of the picklist value, for example T for Technician.





 |
| ServiceCrewId | 

Type

reference

Properties

Create, Filter, Group, Sort, Nillable, Update

Description

The associated service crew. If the service resource represents a crew, select the crew. This field is hidden for all users by default. To use it, update its field-level security settings in Setup and add it to your service resource page layouts.



 |

## Associated Objects

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.

[ServiceResourceChangeEvent](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 48.0)

Change events are available for the object.

[ServiceResourceFeed](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.

[ServiceResourceHistory](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.

[ServiceResourceOwnerSharingRule](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.

[ServiceResourceShare](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.