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

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

## Supported Calls

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

## Special Access Rules

Consumer Goods Cloud must be enabled.

## Fields

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

### GeoFnLcTypeAtShftEnd

- **Type**: picklist
- **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- **Description**: Specifies the allowed location type for geofence validation at the end of the shift.
    
    This field is reserved for future use.
- **Possible values**:
    - First Customer
    - Home
    - Warehouse

### GeoFnLcTypeAtShftStart

- **Type**: picklist
- **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- **Description**: Specifies the allowed location type for geofence validation at the start of the shift.
    
    This field is reserved for future use.
- **Possible values**:
    - First Customer
    - Home
    - Warehouse

### GeoFnNotificationType

- **Type**: picklist
- **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- **Description**: Specifies the notification type for geofence validation at the start and end of the shift.
    
    This field is reserved for future use.
- **Possible values**:
    - Error
    - Warning

### IsActive

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether the shift is active or inactive.

### IsGeoFnRqrAtShftEnd

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether geofencing was enabled at the end of the shift.
    
    This field is reserved for future use.
- **Default value**: false

### IsGeoFnRqrAtShftStart

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether geofencing was enabled at the start of the shift.
    
    This field is reserved for future use.
- **Default value**: false

### IsGeoLcRqrAtShftEnd

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether user's geolocation was captured at the end of the shift.
    
    This field is reserved for future use.
- **Default value**: false

### IsGeoLcRqrAtShftStart

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether user's geolocation was captured at the start of the shift.
    
    This field is reserved for future use.
- **Default value**: false

### 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.
    
    Available in API version 54.0 and later.
- **Default value**: false

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

### NotificationTypeAtShftEnd

- **Type**: picklist
- **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- **Description**: Specifies the notification type for open tours at the end of the shift.
    
    This field is reserved for future use.
- **Possible values**:
    - Error
    - Warning

### 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.
- **Default value**: H
- **Possible values**:
    - H—Hours
    - M—Minutes

### ShouldAutoEnd

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether the shift was automatically ended when the tour was completed.
    
    This field is reserved for future use.
- **Default value**: false

### ShouldAutoStart

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether the shift was automatically started when the tour began.
    
    This field is reserved for future use.
- **Default value**: false

### 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. You can use Extended to represent overtime shifts. Available in API version 55.0 and later.
- **Possible values**:
    - Normal
    - Extended

## 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.retail_api.meta/retail_api/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.retail_api.meta/retail_api/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.retail_api.meta/retail_api/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.