---
schema_version: "1"
id: ddceeedbe31dc21d10cf4a821e53641a3996ad37666877ef876728d6724dd607
title: Shift
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/sforce_api_objects_shift.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/sforce_api_objects_shift.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8e7941c364351d2a1d8f2ec70a943075d348d1290274d31ebb2e9198701fb4ac
description: Represents a shift for a user. Available in API versions 65.0 and later.
---
# Shift

Represents a shift for a user. Available in API versions 65.0 and later.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), 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.

### EndLocation

- **Type**: location
- **Properties**: Nillable
- **Description**: Captures the user’s geolocation at the end of the shift.
    
    This field is reserved for future use.

### EndTime

- **Type**: dateTime
- **Properties**: Create, Filter, Sort, Update
- **Description**: The date and time that the shift ends.

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

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

### IsHolidayShift

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates a shift that overlaps with holiday hours. Available in API version 55.0 and later.
- **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

### IsOsidGeoFnRngAtShftEnd

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether the shift was ended outside the allowed distance between the user's GPS location and the geofence end location (true) or not (false).
    
    This field is reserved for future use.
- **Default value**: false

### IsOsidGeoFnRngAtShftStart

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether the shift was started outside the allowed distance between the user's GPS location and the geofence start location (true) or not (false).
    
    This field is reserved for future use.
- **Default value**: false

### JobProfileId

- **Type**: reference
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The job profile associated with the shift. Available in API versions 47.0 and later.

### Label

- **Type**: string
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The label that a shift is given.

### LastReferencedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The date and time when the current user last viewed a related record.

### LastViewedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The date and time when the current user last viewed this record.

### 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.
    
    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. Available in API version 49.0 and later.
    
    This is a relationship field.
- **Relationship Name**: RecordsetFilterCriteria
- **Relationship Type**: Lookup
- **Refers To**: RecordsetFilterCriteria

### ShiftNumber

- **Type**: string
- **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort
- **Description**: The number automatically given to the shift upon creation.

### ShiftTemplateId

- **Type**: reference
- **Properties**: Create, Filter, Group, Nillable, Sort
- **Description**: The shift template ID, if the shift was created from a shift template. Available in API version 53.0 and later.
    
    This is a relationship field.
- **Relationship Name**: ShiftTemplate
- **Relationship Type**: Lookup
- **Refers To**: ShiftTemplate

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

### StartLocation

- **Type**: location
- **Properties**: Nillable
- **Description**: Captures the user’s geolocation at the start of the shift.
    
    This field is reserved for future use.

### StartTime

- **Type**: dateTime
- **Properties**: Create, Filter, Sort, Update
- **Description**: The date and time that the shift starts.

### Status

- **Type**: picklist
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: The current status of the shift.
    
    This field is a Dynamic Enum. The order of the picklist values depends on how the Admin configures them in Object Manager. This field is reserved for future use.
    
    This field is reserved for future use.
- **Default value**: New
- **Possible values**:
    - Complete
    - In Progress
    - New

### StatusCategory

- **Type**: picklist
- **Properties**: Filter, Group, Nillable, Restricted picklist, Sort
- **Description**: Specifies the status of the shift using static values. This field is derived from Status using the mapping defined in setup.
    
    This field is reserved for future use.
- **Possible values**:
    - Complete
    - In progress—In Progress
    - New

### TimeSlotType

- **Type**: picklist
- **Properties**: Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update
- **Description**: Type of time slot for the shift. The same setup values as the TimeSlot field in the OperatingHours object.
- **Possible values**:
    - Normal (default value)
    - Extended

### UserId

- **Type**: reference
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The user assigned to the shift.
    
    This field is a relationship field.
- **Relationship Name**: User
- **Refers To**: User
    
    This field is reserved for future use.

## Associated Objects

This object has the following associated objects. Unless noted, they are available in the same API version as this object.

- **[ShiftChangeEvent](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.") (API version 54.0)**: Change events are available for the object.

- **[ShiftFeed](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/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.
- **[ShiftHistory](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/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.
- **[ShiftOwnerSharingRule](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.
- **[ShiftShare](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.