WorkType

Represents a type of work to be performed in Salesforce Scheduler. This object is available in API version 38.0 and later.

Supported Calls

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

Work types are templates representing an appointment topic (work type group) with an appointment location (service territory). Defines key appointment parameters such as appointment duration, prep and wrap-up buffers, and availability timings.

Special Access Rules

Salesforce Scheduler must be enabled.

Fields

Field Name Details
AppointmentCategoryId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The ID of the appointment category that’s assigned to the work type. This field is available in API version 58.0 and later.
This field is a relationship field.
Relationship Name
AppointmentCategory
Relationship Type
Lookup
Refers To
AppointmentCategory
ApptStartTimeIntvlInMin
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Specify the time interval in minutes between appointment start times. For example, if you set the interval as 15, appointments can then begin at the top of the hour and at 15-minute intervals thereafter (10:00 AM, 10:15 AM, 10:30 AM). Valid values can be between 5 through 720.

If you don’t specify a value for this field, Salesforce Scheduler considers the value specified in the default scheduling policy.

Note

This field is available in API version 57.0 and later.

AttendeeLimit
Type
int
Properties
Create, Filter, Group, Sort, Update
Description
The maximum number of attendees for a group service appointment in a shift. This field is considered when the appointment mode is Group. Available in API version 61.0 and later.
BlockTimeAfterAppointment
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Specify the after buffer time for the service appointment.

In Salesforce Scheduler, during appointment scheduling, the number of available time slots is automatically adjusted to accommodate the after buffer time.

Note

BlockTimeAfterUnit
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Specify the unit of time for BlockTimeAfterAppointment.
Possible values are:
  • Hours
  • Minutes
The default value is 'Minutes'.
BlockTimeBeforeAppointment
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Specify the before buffer time for the service appointment.

In Salesforce Scheduler, during appointment scheduling, the number of available time slots is automatically adjusted to accommodate the before buffer time.

Note

BlockTimeBeforeUnit
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Specify the unit of time for BlockTimeBeforeAppointment.
Possible values are:
  • Hours
  • Minutes
The default value is 'Minutes'.
DefaultAppointmentType
Type
picklist
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The default appointment type of the work type.
Possible values are:
  • Phone
  • At Branch
  • Video
In Lobby Management, the Scheduled Service Appointments list only shows appointments that are set to At Branch.
Description
Type
textarea
Properties
Create, Nillable, Update
Description
The description of the work type. Try to add details about the task or tasks that this work type represents.
DurationType
Type
picklist
Properties
Create, Filter, Group, Defaulted on create, Restricted picklist, Sort, Update
Description
The unit of the Estimated Duration: Minutes or Hours.
EstimatedDuration
Type
double
Properties
Create, Filter, Sort, Update
Description
The estimated length of the work. The estimated duration is in minutes or hours based on the value selected in the Duration Type field.
LastReferencedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The date when the work type 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 work type was last viewed by the current user.
Name
Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
The name of the work type.
OperatingHoursId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The ID of the operating hours that’s assigned to the work type. If a service resource needs special operating hours, create them in Setup and select them in the Operating Hours lookup field on the member’s detail page.
This is a relationship field.
Relationship Name
OperatingHours
Relationship Type
Lookup
Refers To
OperatingHours
OwnerId
Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The work type’s owner.
This is a polymorphic relationship field.
Relationship Name
Owner
Relationship Type
Lookup
Refers To
Group, User
ProductId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
References the product associated with the work type.
This field is available in API version 63.0 and later.
This field is a relationship field.
Relationship Name
Product
Refers To
Product2
TimeFrameEndUnit
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Specify the unit of time for TimeFrame End.
Possible values are:
  • Days
  • Hours
The default value is 'Days'.
TimeFrameStartUnit
Type
picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Specify the unit of time for TimeFrame Start.
Possible values are:
  • Days
  • Hours
The default value is 'Days'.
TimeframeEnd
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Specify the timeframe end to show only time slots that end before the duration that is set in Timeframe End.
TimeframeStart
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Specify the timeframe start to show only time slots that start after the duration that is set in Timeframe Start.

Usage

You can specify meeting preparation and wrap-up time by specifying BlockTimeBeforeAppointment and BlockTimeAfterAppointment. Specify the units of time as minutes or hours. During appointment scheduling, the number of available time slots is automatically adjusted to accommodate the before and after buffer time. By default, the before and after appointment buffers aren’t reflected on the service resource’s Salesforce calendar. Enable the Block Resource Availability setting to reflect the before and after appointment buffers on the Salesforce calendar.

Don’t specify more than 24 hours as buffer time.

Note

Timeframe Start and Timeframe End show time slots in a dynamic time frame based on when a user books an appointment. Salesforce Scheduler shows only time slots that start after the duration that is set in Timeframe Start and end before the duration that is set in Timeframe End. For example, you’ve set Timeframe Start to 2 days and Timeframe End to 5 days and a user schedules an appointment on Sep 13, 10:00 AM. Then, only time slots that start on or after Sep 15, 10:00 AM and end on or before Sep 18, 10:00 AM are shown.

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.

WorkTypeChangeEvent (API version 48.0)
Change events are available for the object.
WorkTypeFeed
Feed tracking is available for the object.
WorkTypeHistory
History is available for tracked fields of the object.
WorkTypeOwnerSharingRule
Sharing rules are available for the object.
WorkTypeShare
Sharing is available for the object.