TimeSlot

Represents a period of time on a specified day of the week during which work can be performed in Salesforce Scheduler. 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(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), update(), upsert()

Special Access Rules 

Salesforce Scheduler must be enabled.

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 must 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 can 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

Fields 

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 can only have been referenced (LastReferencedDate) and not viewed.

MaxAppointments 

  • Type: int
  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
  • Description: Maximum number of appointments for a single time slot. Available in API version 47.0 and later.

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. This is a relationship field.
  • Relationship Name: OperatingHours
  • Relationship Type: Lookup
  • Refers To: OperatingHours

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.

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. Default value must be Normal. You can choose to use Extended to represent overtime shifts.

WorkTypeGroupId 

  • Type: reference
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Work type group assigned to the time slot. Available in API version 47.0 and later. This is a relationship field.
  • Relationship Name: WorkTypeGroup
  • Relationship Type: Lookup
  • Refers To: WorkTypeGroup