Newer Version Available
AppointmentSchedulingPolicy
Represents a set of rules for scheduling appointments using
Lightning Scheduler.
This type extends the Metadata
metadata type and inherits its fullName field.
File Suffix and Directory Location
AppointmentSchedulingPolicy components have the suffix .policy and are stored in the appointmentSchedulingPolicies folder.
Version
AppointmentSchedulingPolicy components are available in API version 47.0 and later.
Special Access Rules
You must have the ViewSetup and CustomizeApplication user permissions to access the AppointmentSchedulingPolicy type.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| appointmentStartTimeInterval | picklist | 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). Valid values are:
|
| masterLabel | string | Required. The label for the appointment scheduling policy. |
| shouldConsiderCalendarEvents | boolean | 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 | boolean | Required. Indicates whether this appointment scheduling policy prevents excluded service resources from being assigned to appointments (true) or not (false). |
| shouldEnforceRequiredResource | boolean | Required. Indicates whether this appointment scheduling policy allows only required service resources to be assigned to appointments (true) or not (false). |
| shouldMatchSkill | boolean | 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 | boolean | 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 | boolean | Required. Indicates whether this appointment scheduling policy prevents users from scheduling appointments outside of an account’s visiting hours (true) or not (false). |
| shouldUsePrimaryMembers | boolean | 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 | boolean | 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 <appointmentStartTimeInterval>15</appointmentStartTimeInterval>
4 <masterLabel>Default Appointment Scheduling Policy</masterLabel>
5 <shouldConsiderCalendarEvents>true</shouldConsiderCalendarEvents>
6 <shouldEnforceExcludedResource>true</shouldEnforceExcludedResource>
7 <shouldEnforceRequiredResource>true</shouldEnforceRequiredResource>
8 <shouldMatchSkill>true</shouldMatchSkill>
9 <shouldMatchSkillLevel>false</shouldMatchSkillLevel>
10 <shouldRespectVisitingHours>true</shouldRespectVisitingHours>
11 <shouldUsePrimaryMembers>true</shouldUsePrimaryMembers>
12 <shouldUseSecondaryMembers>true</shouldUseSecondaryMembers>
13</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.