Newer Version Available

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

TimeSlot

Represents a period of time on a specified day of the week during which field service work can be performed. Operating hours consist of one or more time slots. This object is available in API version 38.0 and later.

Supported Calls

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

Special Access Rules

Field Service Lightning must be enabled.

Fields

Field Name Details
DayOfWeek
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update
Description
The day of the week when the time slot takes place.
EndTime
Type
time
Properties
Create, Filter, Sort, Update
Description
The time when the time slot ends.
LastReferencedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed a record related to this record.
LastViewedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.
OperatingHoursId
Type
reference
Properties
Create, Filter, Group, Sort
Description
The operating hours that the time slot belongs to. An operating hours’ time slots appear in the Operating Hours related list.
StartTime
Type
time
Properties
Create, Filter, Sort, Update
Description
The time when the time slot starts.
TimeSlotNumber
Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
The name of the time slot. The name is auto-populated to a day and time format—for example, Monday 9:00 AM - 10:00 PM—but you can manually update it if you wish.
Type
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update
Description
The type of time slot. Possible values are Normal and Extended. You may choose to use Extended to represent overtime shifts.

Usage

Operating hours are composed of time slots, which indicate the hours of operation for a particular day. After you create operating hours, create time slots for each day. For example, if the operating hours should be 8 AM to 5 PM Monday through Friday, create five time slots, one per day. To reflect breaks such as lunch hours, create multiple time slots in a day: for example, Monday 8:00 AM – 12:00 PM and Monday 1:00 PM – 5:00 PM.

Time slots don’t come with any built-in rules, but you can create Apex triggers that limit time slot settings in your org. For example, you may want to restrict the start and end times on time slots to half-hour increments, or to prohibit end times later than 8 PM.

Tip