AppointmentSchedulingPolicy

Represents a set of rules for scheduling appointments using Lightning Scheduler.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

AppointmentSchedulingPolicy components have the suffix .policy and are stored in the appointmentSchedulingPolicies folder.

Version 

Introduced in API version 47.0.

Special Access Rules 

You must have the ViewSetup and CustomizeApplication user permissions to access the AppointmentSchedulingPolicy type.

Fields 

appointmentAssignmentPolicy 

  • Type: string
  • Required: No
  • Introduced: API version 53.0
  • Description: The name of the appointment assignment policy.

appointmentStartTimeInterval 

  • Type: string (enumeration of type string)
  • Required: Yes
  • Description: Required. The proposed time interval in minutes between appointment start times. For example, if you set the interval to 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, and so on).
  • Possible values:
    • 5
    • 10
    • 15
    • 20
    • 30
    • 45
    • 60
    • 90
    • 120
    • 150
    • 180
    • 240
    • 300
    • 360
    • 420
    • 480

extCalEventHandler 

  • Type: string
  • Required: No
  • Introduced: API version 50.0
  • Description: Required. The API name of the custom Apex class that checks service resources’ external calendar events and returns the time slots where service resources are already booked.

isExtlCalendarIntegEnabled 

  • Type: boolean
  • Required: No

isSvcTerritoryMemberShiftUsed 

  • Type: boolean
  • Required: No
  • Introduced: API version 54.0
  • Description: Required. Indicates whether to consider shifts of service territory members when determining the availability of service resources for appointments (true) or not (false).

isSvcTerrOpHoursWithShiftsUsed 

  • Type: boolean
  • Required: No
  • Introduced: API version 54.0
  • Description: Required. Indicates whether to consider the intersection of shifts and service territory operating hours when determining the availability of service resources for appointments (true) or not (false).

masterLabel 

  • Type: string
  • Required: Yes
  • Description: Required. The label for the appointment scheduling policy.

shouldCheckExternalCalendar 

  • Type: boolean
  • Required: Yes
  • Introduced: API version 53.0
  • Description: Required. Indicates whether to check the external calendar for resource availability (true) or not (false).

shouldConsiderCalendarEvents 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether to consider events on the Salesforce calendar to determine the availability of service resources to be assigned to appointments (true) or not (false).

shouldEnforceExcludedResource 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether this appointment scheduling policy prevents excluded service resources from being assigned to appointments (true) or not (false).

shouldEnforceRequiredResource 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether this appointment scheduling policy allows only required service resources to be assigned to appointments (true) or not (false).

shouldMatchSkill 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether this appointment scheduling policy allows only required service resources who have certain skills to be assigned to appointments (true) or not (false).

shouldMatchSkillLevel 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether this appointment scheduling policy allows only required service resources who have certain skills and skill levels to be assigned to appointments (true) or not (false).

shouldRespectVisitingHours 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether this appointment scheduling policy prevents users from scheduling appointments outside of an account’s visiting hours (true) or not (false).

shouldUsePrimaryMembers 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether this appointment scheduling policy allows only service resources who are primary members of a service territory to be assigned to appointments (true) or not (false).

shouldUseSecondaryMembers 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether this appointment scheduling policy allows service resources who are secondary members of a service territory to be assigned to appointments (true) or not (false).

Declarative Metadata Sample Definition 

The following is an example of an appointmentSchedulingPolicy component.

1<?xml version="1.0" encoding="UTF-8"?>
2<AppointmentSchedulingPolicy xmlns="http://soap.sforce.com/2006/04/metadata">
3  <appointmentAssignmentPolicy>ResourceAssignmentRule1</appointmentAssignmentPolicy>
4  <appointmentStartTimeInterval>15</appointmentStartTimeInterval>
5  <masterLabel>Default Appointment Scheduling Policy</masterLabel>
6  <shouldCheckExternalCalendar>true</shouldCheckExternalCalendar>
7  <shouldConsiderCalendarEvents>true</shouldConsiderCalendarEvents>
8  <shouldEnforceExcludedResource>true</shouldEnforceExcludedResource>
9  <shouldEnforceRequiredResource>true</shouldEnforceRequiredResource>
10  <shouldMatchSkill>true</shouldMatchSkill>
11  <shouldMatchSkillLevel>false</shouldMatchSkillLevel>
12  <shouldRespectVisitingHours>true</shouldRespectVisitingHours>
13  <shouldUsePrimaryMembers>true</shouldUsePrimaryMembers>
14  <shouldUseSecondaryMembers>true</shouldUseSecondaryMembers>
15</AppointmentSchedulingPolicy>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2 <Package xmlns="http://soap.sforce.com/2006/04/metadata">
3   <types>
4     <members>sample</members>
5     <name>AppointmentSchedulingPolicy</name>
6   </types>
7   <version>47.0</version>
8 </Package>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.