---
schema_version: "1"
id: 1c1e4675a2cc5e0a95b027b7de69421a663c5ea84a32b878654671d9fd7f7a80
title: ShiftTemplate
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_shifttemplate.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_shifttemplate.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c69482c49f0182582cf615dcca8fabc968f5642ee71a32f16d394fa12177a2d4
description: Represents a template for creating shifts. This object is available in API version 51.0 and later.
---
# ShiftTemplate

Represents a template for creating shifts. This object is available in API version 51.0 and later.

## Supported Calls

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

## Special Access Rules

Field Service or Workforce Engagement must be enabled. For Field Service, users must have Field Service permission. For Workforce Engagement, the user needs to have a Workforce Engagement Admin or Planner permission set.

## Fields

| Field | Details |
| --- | --- |
| BackgroundColor | 
Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Sets a background color when shifts are displayed in the UI. Use a 3- or 6-digit hexadecimal format, for example #FF00FF. Available in API version 54.0 and later.



 |
| Description | 

Type

textarea

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Additional information about the shift like number of breaks or activities.



 |
| Duration | 

Type

double

Properties

Create, Filter, Sort, Update

Description

How long the shift lasts. The unit of measurement for this field is determined by ShiftTemplateDurationType.



 |
| IsActive | 

Type

boolean

Properties

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

Description

Indicates whether the shift is active or inactive.



 |
| IsNonStandard | 

Type

boolean

Properties

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

Description

Indicates whether the shift is nonstandard, such as overtime or on-call shifts.

The default value is false. Available in API version 54.0 and later.



 |
| JobProfileId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The Job Profile record. This field is optional.

This is a relationship field.

Relationship Name

JobProfile

Relationship Type

Lookup

Refers To

JobProfile



 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date when the shift template 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 shift template was last viewed.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, idLookup, Sort, Update

Description

The shift template record name.



 |
| OwnerId | 

Type

reference

Properties

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

Description

The owner of the shift template.

This is a polymorphic relationship field.

Relationship Name

Owner

Relationship Type

Lookup

Refers To

Group, User



 |
| RecordsetFilterCriteriaId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The ID of the recordset filter criteria selected for the shift template. Available in API version 53.0 and later.

This is a relationship field.

Relationship Name

RecordsetFilterCriteria

Relationship Type

Lookup

Refers To

RecordsetFilterCriteria



 |
| ShiftTemplateDurationType | 

Type

picklist

Properties

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

Description

The unit of measurement for the shift template duration.

Possible values are:

- H—Hours
- M—Minutes

The default value is H.



 |
| StartTime | 

Type

time

Properties

Create, Filter, Sort, Update

Description

The time of day when the shift starts.



 |
| TimeSlotType | 

Type

picklist

Properties

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

Description

The type of time slot. Possible values are:

- Normal
- Extended

You can use Extended to represent overtime shifts. Available in API version 55.0 and later.



 |

## 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.

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

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

[ShiftTemplateChangeEvent](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.")

Change Data Capture events are available for the object. Available in API version 54.0 and later.