Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
SchedulingRule
Parent Type
File Suffix and Directory Location
SchedulingRule components have the suffix .schedulingRule and are stored in the SchedulingRules folder.
Version
SchedulingRule components are available in API version 53.0 and later.
Special Access Rules
This type is available only if Workforce Engagement is enabled in your org. To view, create, edit, and delete records, the user requires the Workforce Engagement Planner permission set.
Fields
| Field Name | Description |
|---|---|
| isProtected |
|
| masterLabel |
|
| schedulingCategory |
|
| schedulingRuleParameters |
|
| schedulingRuleType |
|
SchedulingRuleParameter
Represents a scheduling rule parameter, such as a work limit, that’s associated with a scheduling rule.
| Field Name | Description |
|---|---|
| schedulingParameterKey |
|
| value |
|
Declarative Metadata Sample Definition
The following is an example of a SchedulingRule component.
1<?xml version="1.0" encoding="UTF-8"?>
2<SchedulingRule xmlns="http://soap.sforce.com/2006/04/metadata">
3 <masterLabel>Max Shifts Per Week</masterLabel>
4 <schedulingCategory>B</schedulingCategory>
5 <schedulingRuleParameters>
6 <schedulingParameterKey>C</schedulingParameterKey>
7 <value>MaxShiftsPerWeek</value>
8 </schedulingRuleParameters>
9 <schedulingRuleParameters>
10 <schedulingParameterKey>W</schedulingParameterKey>
11 <value>Shifts</value>
12 </schedulingRuleParameters>
13 <schedulingRuleParameters>
14 <schedulingParameterKey>R</schedulingParameterKey>
15 <value>Week</value>
16 </schedulingRuleParameters>
17 <schedulingRuleParameters>
18 <schedulingParameterKey>L</schedulingParameterKey>
19 <value>Max</value>
20 </schedulingRuleParameters>
21 <schedulingRuleType>W</schedulingRuleType>
22</SchedulingRule>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 <name>SchedulingRule</name>
5 <members>MaxShiftsPerWeek</members>
6 </types>
7 <version>53.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.