---
schema_version: "1"
id: d2424dfa3cf1c577d8dd92e7fb080518a18799af8a0979f9959415f9f8d08250
title: ShiftPattern
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_shiftpattern.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_shiftpattern.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 58b4054dbf12e6ac146e212962b58c0b9976517981544a2d2b1c716194e128f3
description: Represents a pattern of templates for creating shifts. This object is available in API version 51.0 and later.
---
# ShiftPattern

Represents a pattern of templates 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(), undelete(), update(), upsert()

## Special Access Rules

Field Service must be enabled. Users must have Field Service permission.

## Fields

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

textarea

Properties

Create, Nillable, Update

Description

A short description of the shift pattern to help users identify the pattern.



 |
| IsActive | 

Type

boolean

Properties

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

Description

Indicates that the shift pattern can be used to create shifts.

The default value is ‘false’.



 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date that the shift pattern was last used.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date that the shift pattern was last viewed.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, idLookup, Sort, Update

Description

A short, descriptive name of the shift pattern.



 |
| OwnerId | 

Type

reference

Properties

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

Description

The ID of the owner of the shift pattern. Default is the user who creates the shift pattern.

This is a polymorphic relationship field.

Relationship Name

Owner

Relationship Type

Lookup

Refers To

Group, User



 |
| PatternLength | 

Type

int

Properties

Create, Filter, Group, Sort, Update

Description

The duration in days of the shift pattern.



 |

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

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

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

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

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

#### See Also

- [ShiftPatternEntry](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_shiftpatternentry.htm "ShiftPatternEntry links a shift template to a shift pattern. This object is available in API version 51.0 and later.")
- [Shift Patterns](https://help.salesforce.com/articleView?id=fs_shift_patterns.htm&language=en_US "Shift Patterns - HTML (New Window)")