---
schema_version: "1"
id: 6e860c8fea544f346049dcb766ba75ad070c28d10c82fa126dae2f120f033524
title: AppointmentSchedulingPolicy
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_appointmentschedulingpolicy.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_appointmentschedulingpolicy.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8007dce5b4f4c369bc87f63477950f40ee3161cab86cfe13d9de8a014f4ea3a6
description: Represents a set of rules for scheduling appointments using Lightning Scheduler. This type extends the Metadata metadata type and inherits its fullName field.
---
# AppointmentSchedulingPolicy

Represents a set of rules for scheduling appointments using Lightning Scheduler. This type extends the Metadata metadata type and inherits its fullName field.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

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.

## 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

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d143422e100">Field Name</th>

              <th class="featureTableHeader  " id="d143422e103">Field Type</th>

              <th class="featureTableHeader  " id="d143422e106">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">appointmentAssignmentPolicy</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">string</td>

              <td class="entry" headers="d143422e106" data-title="Description">The name of the appointment assignment policy. This field is available in API
                version 53.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">appointmentStartTimeInterval</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">picklist</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. The proposed time interval in minutes between appointment start
                times. For example, if you set the interval to <samp class="codeph nolang">15</samp>, 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:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">5</samp></li>

                  <li class="li"><samp class="codeph nolang">10</samp></li>

                  <li class="li"><samp class="codeph nolang">15</samp></li>

                  <li class="li"><samp class="codeph nolang">20</samp></li>

                  <li class="li"><samp class="codeph nolang">30</samp></li>

                  <li class="li"><samp class="codeph nolang">45</samp></li>

                  <li class="li"><samp class="codeph nolang">60</samp></li>

                  <li class="li"><samp class="codeph nolang">90</samp></li>

                  <li class="li"><samp class="codeph nolang">120</samp></li>

                  <li class="li"><samp class="codeph nolang">150</samp></li>

                  <li class="li"><samp class="codeph nolang">180</samp></li>

                  <li class="li"><samp class="codeph nolang">240</samp></li>

                  <li class="li"><samp class="codeph nolang">300</samp></li>

                  <li class="li"><samp class="codeph nolang">360</samp></li>

                  <li class="li"><samp class="codeph nolang">420</samp></li>

                  <li class="li"><samp class="codeph nolang">480</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">extCalEventHandler</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">lookup</td>

              <td class="entry" headers="d143422e106" data-title="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. Available in API version 50.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">isSvcTerritoryMemberShiftUsed</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. Indicates whether to consider shifts of service territory members
                when determining the availability of service resources for appointments (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field is available in API version 54.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">isSvcTerrOpHoursWithShiftsUsed</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. Indicates whether to consider the intersection of shifts and service
                territory operating hours when determining the availability of service resources for
                appointments (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field is available in API version 54.0
                and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">masterLabel</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">string</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. The label for the appointment scheduling policy.</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">shouldCheckExternalCalendar</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. Indicates whether to check the external calendar for resource
                availability (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field is available in API version 53.0
                and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">shouldConsiderCalendarEvents</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. Indicates whether to consider events on the Salesforce calendar to
                determine the availability of service resources to be assigned to appointments
                (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">shouldEnforceExcludedResource</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. Indicates whether this appointment scheduling policy prevents
                excluded service resources from being assigned to appointments (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">shouldEnforceRequiredResource</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. Indicates whether this appointment scheduling policy allows only
                required service resources to be assigned to appointments (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">shouldMatchSkill</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. Indicates whether this appointment scheduling policy allows only
                required service resources who have certain skills to be assigned to appointments
                (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">shouldMatchSkillLevel</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="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 (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">shouldRespectVisitingHours</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. Indicates whether this appointment scheduling policy prevents users
                from scheduling appointments outside of an account’s visiting hours (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">shouldUsePrimaryMembers</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="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 (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).</td>

            </tr>

            <tr>
              <td class="entry" headers="d143422e100" data-title="Field Name"><span class="keyword parmname">shouldUseSecondaryMembers</span></td>

              <td class="entry" headers="d143422e103" data-title="Field Type">boolean</td>

              <td class="entry" headers="d143422e106" data-title="Description">Required. Indicates whether this appointment scheduling policy allows service
                resources who are secondary members of a service territory to be assigned to
                appointments (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).</td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of an appointmentSchedulingPolicy component.

<?xml version="1.0" encoding="UTF-8"?>
<AppointmentSchedulingPolicy xmlns="http://soap.sforce.com/2006/04/metadata">
  <appointmentAssignmentPolicy\>ResourceAssignmentRule1</appointmentAssignmentPolicy\>
  <appointmentStartTimeInterval\>15</appointmentStartTimeInterval\>
  <masterLabel\>Default Appointment Scheduling Policy</masterLabel\>
  <shouldCheckExternalCalendar\>true</shouldCheckExternalCalendar\>
  <shouldConsiderCalendarEvents\>true</shouldConsiderCalendarEvents\>
  <shouldEnforceExcludedResource\>true</shouldEnforceExcludedResource\>
  <shouldEnforceRequiredResource\>true</shouldEnforceRequiredResource\>
  <shouldMatchSkill\>true</shouldMatchSkill\>
  <shouldMatchSkillLevel\>false</shouldMatchSkillLevel\>
  <shouldRespectVisitingHours\>true</shouldRespectVisitingHours\>
  <shouldUsePrimaryMembers\>true</shouldUsePrimaryMembers\>
  <shouldUseSecondaryMembers\>true</shouldUseSecondaryMembers\>
</AppointmentSchedulingPolicy\>

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

<?xml version="1.0" encoding="UTF-8"?>
 <Package xmlns="[http://soap.sforce.com/2006/04/metadata](http://soap.sforce.com/2006/04/metadata)">
   <types>
     <members>sample</members>
     <name>AppointmentSchedulingPolicy</name>
   </types>
   <version>47.0</version>
 </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](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).