---
schema_version: "1"
id: 7de1b122d7f6dfead33460687d7eb36f2fb1c7a68c6b0d0620fb64911db7bd81
title: EscalationRules
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_escalationrules.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_escalationrules.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: dcc2c0812e6ff60d4e882fe7300e41cca402e42f541c7d66917a9d8c2f3217bb
description: Represents case escalation rules to escalate cases automatically if they aren’t resolved within a certain time. You can access rules metadata for all applicable objects, for a specific object, or for a specific rule on a specific object.
---
# EscalationRules

Represents case escalation rules to escalate cases automatically if they aren’t resolved within a certain time. You can access rules metadata for all applicable objects, for a specific object, or for a specific rule on a specific object.

The package.xml syntax for accessing all escalation rules for all objects is:

    <types>
        <members>\*</members>
        <name>EscalationRules</name>
    </types>

All rules for a specific object use a similar syntax without the wildcard. For example, all escalation rules for the Case object would use this syntax:

    <types>
        <members>Case</members>
        <name>EscalationRules</name>
    </types>

You can also access specific escalation rules for an object. The following example only accesses the “samplerule” and “newrule” escalation rules on the Case object. Notice that for this example the type name syntax is EscalationRule and not EscalationRules.

    <types>
        <members>Case.samplerule</members>
        <members>Case.newrule</members>
        <name>EscalationRule</name>
    </types>

## File Suffix and Directory Location

EscalationRules for an object have the suffix .escalationRules and are stored in the escalationRules folder. For example, all Case escalation rules are stored in the Case.escalationRules file.

## Version

EscalationRules components are available in API version 27.0 and later.

## Fields

| Field Name | Field Type | Description |
| --- | --- | --- |
| escalationRule | [EscalationRule\[\]](#escalationrule_sub) | Represents one escalation rule and specifies whether it’s active or not. Escalation rules are processed in the order they appear in the EscalationRules container. |

## EscalationRule

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



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

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

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

            </tr>

          </thead>

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

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

              <td class="entry" headers="d439772e166" data-title="Description">Indicates whether the escalation rule is active (<samp class="codeph java">true</samp>) or not (<samp class="codeph java">false</samp>).</td>

            </tr>

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

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

              <td class="entry" headers="d439772e166" data-title="Description">Inherited from <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm" title="The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.">Metadata</a>, this field is defined in the WSDL for this
                metadata type. It must be specified when creating, updating, or
                deleting. See <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_createMetadata.htm" title="Adds one or more new metadata components to your organization synchronously."><samp class="codeph java">createMetadata()</samp></a> to see an
                example of this field specified for a call.<p class="p">This value can't be
                  <samp class="codeph java">null</samp>.
                </p>
              </td>

            </tr>

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

              <td class="entry" headers="d439772e163" data-title="Field Type"><span class="keyword parmname"><a class="xref" href="#RuleEntry">RuleEntry[]</a></span></td>

              <td class="entry" headers="d439772e166" data-title="Description">Contains the definitions of the rule entries in the escalation
                rule. </td>

            </tr>

          </tbody>

        </table>

## RuleEntry

Represents the fields used by the rule.

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



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

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

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

            </tr>

          </thead>

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

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

              <td class="entry" headers="d439772e276" data-title="Description">Advanced filter conditions that were specified for the rule.
              </td>

            </tr>

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

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

              <td class="entry" headers="d439772e276" data-title="Description">The hours when escalation actions are performed. Specify only if
                <span class="keyword parmname">businessHoursSource</span> is set to
                <span class="keyword parmname">Static</span>.
              </td>

            </tr>

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

              <td class="entry" headers="d439772e273" data-title="Field Type">BusinessHoursSourceType (enumerations of type string)</td>

              <td class="entry" headers="d439772e276" data-title="Description">Valid values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">None</samp></li>

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

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

                </ul>
              </td>

            </tr>

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

              <td class="entry" headers="d439772e273" data-title="Field Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/customfield.htm#filteritem">FilterItem</a></td>

              <td class="entry" headers="d439772e276" data-title="Description">The items in the list that define the assignment criteria.
              </td>

            </tr>

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

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

              <td class="entry" headers="d439772e276" data-title="Description">Indicates whether the escalation is disabled when the record is
                modified <samp class="codeph java">true</samp>) or not (<samp class="codeph java">false</samp>).</td>

            </tr>

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

              <td class="entry" headers="d439772e273" data-title="Field Type">
                <a class="xref" href="#EscalationAction_section">EscalationAction</a>[]
              </td>

              <td class="entry" headers="d439772e276" data-title="Description">The actions to perform when the escalation criteria are met.
              </td>

            </tr>

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

              <td class="entry" headers="d439772e273" data-title="Field Type">EscalationStartTimeType (enumeration of type string)</td>

              <td class="entry" headers="d439772e276" data-title="Description">Indicates the start time for the escalation. Valid values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">CaseCreation</samp></li>

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

                </ul>
              </td>

            </tr>

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

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

              <td class="entry" headers="d439772e276" data-title="Description">The validation formula. <p class="p">Specify either
                  <span class="keyword parmname">formula</span> or
                  <span class="keyword parmname">criteriaItems</span>, but not both fields.
                </p>
              </td>

            </tr>

          </tbody>

        </table>

## EscalationAction

Describes the action to take for an escalation rule.

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



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

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

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

            </tr>

          </thead>

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

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

              <td class="entry" headers="d439772e469" data-title="Description">The name of the user or queue the item is assigned to. </td>

            </tr>

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

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

              <td class="entry" headers="d439772e469" data-title="Description">Specifies the template to use for the email that is automatically
                sent to the new owner specified by the escalation rule. <p class="p">Lightning
                  email templates aren’t packageable. We recommend using a Classic
                  email template.</p>
              </td>

            </tr>

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

              <td class="entry" headers="d439772e466" data-title="Field Type">AssignToLookupValueType (enumeration of type string)</td>

              <td class="entry" headers="d439772e469" data-title="Description">Valid values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">User</samp></li>

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

                </ul>
              </td>

            </tr>

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

              <td class="entry" headers="d439772e466" data-title="Field Type">int</td>

              <td class="entry" headers="d439772e469" data-title="Description">The number of minutes until the escalation occurs. </td>

            </tr>

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

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

              <td class="entry" headers="d439772e469" data-title="Description">Indicates that the owner of the case is notified when the case is
                escalated <samp class="codeph java">true</samp>) or not (<samp class="codeph java">false</samp>).</td>

            </tr>

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

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

              <td class="entry" headers="d439772e469" data-title="Description">Specifies the email address of the user to notify. </td>

            </tr>

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

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

              <td class="entry" headers="d439772e469" data-title="Description">Specifies the user to notify. </td>

            </tr>

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

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

              <td class="entry" headers="d439772e469" data-title="Description">Specifies the template to user for the notification email.
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example EscalationRules component:

<EscalationRules xmlns="http://soap.sforce.com/2006/04/metadata">
    <escalationRule\>
        <fullName\>samplerule</fullName\>
        <active\>false</active\>
        <ruleEntry\>
            <businessHours\>test</businessHours\>
            <businessHoursSource\>Static</businessHoursSource\>
            <criteriaItems\>
                <field\>Case.Description</field\>
                <operation\>contains</operation\>
                <value\>test</value\>
            </criteriaItems\>
            <escalationAction\>
                <assignedTo\>someuser@org.com</assignedTo\>
                <assignedToTemplate\>emailtemplatename</assignedToTemplate\>
                <assignedToType\>User</assignedToType\>
                <minutesToEscalation\>1440</minutesToEscalation\>
                <notifyCaseOwner\>false</notifyCaseOwner\>
            </escalationAction\>
            <escalationStartTime\>CaseLastModified</escalationStartTime\>
        </ruleEntry\>
    </escalationRule\>
</EscalationRules\>

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