EscalationRule defines one named policy for automatically escalating cases that remain unresolved for a configured period. Its ruleEntry definitions select cases and establish escalation timing. Nested escalationAction definitions specify reassignment and notifications.
An individual EscalationRule is a child of the object-level EscalationRules container. The singular type addresses one rule; the plural type addresses the collection. A rule's presence in retrieved or deployed metadata does not mean it is enabled: its active value controls activation.
Key Elements
Timing and criteria belong to ruleEntry. Assignment, notification, and delay settings belong to each nested escalationAction.
| Element | What the Element Controls |
|---|---|
fullName |
Identifies the rule. Required and non-null for create, update, and delete operations. |
active |
Enables or disables the rule: true means active; false means inactive. |
ruleEntry |
Contains the rule's case-selection criteria, timing settings, and escalation actions. |
formula, criteriaItems
|
Provide alternative ways to select matching cases. Specify one or the other, not both. |
booleanFilter |
Supplies advanced filter logic for criteriaItems. |
businessHoursSource, businessHours
|
The source accepts None, Case, or Static. Specify businessHours only with Static; it identifies the hours when escalation actions are performed. |
escalationStartTime |
Selects the time origin: CaseCreation or CaseLastModified. |
disableEscalationWhenModified |
Controls whether modifying the record disables escalation. |
escalationAction |
Contains the actions to perform when escalation criteria are met. An entry can contain multiple actions. |
minutesToEscalation |
Specifies an action's delay in minutes. Interpret it with the entry's start-time, modification, and business-hours settings. |
assignedTo, assignedToType
|
Identify the new owner and distinguish User from Queue. For Queue, assignedTo references Queue metadata. |
assignedToTemplate |
References the email template used for the email automatically sent to the new owner. |
notifyTo, notifyEmail
|
Identify a user to notify and an email address to notify, respectively. These are notification recipients, not assignment targets. |
notifyCaseOwner |
Controls whether the case owner is notified when the case escalates. |
notifyToTemplate |
References the email template used for the notification email. |
Behavior and Constraints
Criteria use either a formula or filter items
Each ruleEntry uses either formula or criteriaItems, never both. When using filter items, booleanFilter expresses advanced filter logic. Each item identifies a field through field, an operation through operation, and a comparison through value or valueField.
Custom-field dependencies can appear in criteriaItems.field and criteriaItems.valueField. They can also be embedded in formula text, so checking only the structured filter items does not account for every possible field dependency.
Timing depends on more than the delay
minutesToEscalation alone does not explain when an action will occur. Read it together with these entry-level settings:
-
escalationStartTimechooses case creation or last modification as the time origin. -
disableEscalationWhenModifieddetermines whether a record modification disables escalation. ChoosingCaseLastModifiedas the time origin is distinct from disabling escalation on modification. -
businessHoursSourceselects the business-hours source. SupplybusinessHoursonly when the source isStatic.
When a matching case has not escalated, the rule's active state and these timing settings are part of the diagnosis. A configured interval by itself does not describe the rule's behavior.
Assignment and notification are separate
Each entry can have multiple escalationAction definitions, each with its own minutesToEscalation, assignment, and notification settings. Changing notifyTo or notifyEmail changes notification recipients; it does not change case ownership. Ownership is controlled by assignedTo and assignedToType.
The two action-level template fields also have different purposes. assignedToTemplate supplies the new-owner email, while notifyToTemplate supplies the notification email. Do not treat them as interchangeable references.
Deployment and Retrieval
Choose individual-rule or container scope
In package.xml, the manifest identifies which metadata components to deploy or retrieve. Use these type and member combinations:
| Scope | Metadata Type | Manifest Member |
|---|---|---|
| One named Case escalation rule | EscalationRule |
Case.<RuleName>, for example Case.samplerule
|
| All Case escalation rules | EscalationRules |
Case |
| All applicable escalation-rule containers | EscalationRules |
* |
For example, EscalationRule with member Case.samplerule selects the rule whose embedded fullName is samplerule in the Case container. Do not confuse that embedded name with the object-qualified manifest member.
Individual selection does not mean individual files
Case escalation rules are serialized together in Case.escalationRules in the escalationRules folder, rather than in a separate file for each rule. Preserve the distinction between individual-rule selection and container-level file storage when choosing retrieval or deployment scope.
Within the container, escalationRule elements are processed in their listed order. This container-level ordering does not establish an execution order for the nested escalationAction list.
Identity, activation, and template constraints
fullName must be specified and cannot be null when creating, updating, or deleting a rule. Activation is separate from identity: inspect or set active rather than assuming that deploying a rule makes it active.
For packaged escalation actions, Classic email templates are recommended because Lightning email templates are not packageable. This distinction matters for both assignedToTemplate and notifyToTemplate.
Relationships
The main dependencies are queues used as assignment targets, email templates used by actions, and custom fields used in criteria. The enclosing EscalationRules component provides container storage. A user name or notification email address is distinct from a Queue metadata reference.
References
-
Queue:assignedTo, when the action'sassignedToTypeisQueue. -
EmailTemplate:assignedToTemplateandnotifyToTemplatein escalation actions;templatein the shared rule-entry structure. -
CustomField:fieldandvalueFieldincriteriaItems, and field references embedded informula.
Referenced By
-
EscalationRules:escalationRule, which contains the individual rules.
Common Questions
How do I retrieve just one Case escalation rule?
Use metadata type EscalationRule with a manifest member such as Case.samplerule. Use EscalationRules with member Case for the whole Case collection. The rules are stored in the shared Case.escalationRules file.
Why has my case not escalated after the configured number of minutes?
Check active, the entry criteria, escalationStartTime, disableEscalationWhenModified, and the business-hours settings. The action's minutesToEscalation value does not describe timing on its own.
Can an escalation rule entry contain both a formula and criteria items?
No. Specify either formula or criteriaItems for an entry, not both. Use booleanFilter for advanced logic with criteria items.
Does changing the notification user change the case owner?
No. notifyTo and notifyEmail identify notification recipients. assignedTo and assignedToType control reassignment.
Can I package a Lightning email template used by an escalation action?
Lightning email templates are not packageable. Classic email templates are recommended for packaged escalation actions, including their new-owner and notification emails.