Newer Version Available

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

ServiceResource

Represents a service technician or service crew in field service. 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 Lightning 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 deactivates 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.

Tip

IsOptimizationCapable
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
When selected, this option means that the resource can be assigned to service appointments during the optimization process. This setting applies only if the Field Service Lightning managed packages are installed. Its label in the user interface is Include in Scheduling Optimization. Only users with the “Field Service Scheduling” permission set license can be included in optimization. If this option is selected and the related user doesn’t have the permission set license, they user creating the service resource is prompted to assign it.

Optimization isn’t available for service crews, so if the service resource has a Resource Type of Crew, selecting this option has no results.

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 is not 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
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.
Name
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The resource’s name. You’ll likely want this to be 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.
RelatedRecordId
Type
reference
Properties
Create, Filter, Group, Sort, Nillable
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.
ResourceType
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Indicates whether the resource is a Technician, Dispatcher, Crew, or Agent. 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.

Note

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.

Note