Sub topic 8
Escalation rules: criteria, rule entries, and age
This chapter covers how escalation rules decide which open cases to act on and when. It assumes you know what a case is, how queues and case ownership work, how assignment rules route new cases, and how business hours are defined in Setup. Escalation actions (reassign and notify) get their own chapter. Here we focus on the rule structure, the age calculation, and the common mistakes.
What an escalation rule does
An escalation rule is a set of ordered rule entries that Salesforce evaluates against open cases on a schedule. It acts on cases that have stayed in a state for too long. This differs from an assignment rule, which runs when a case is created or edited.
Key facts:
- Only one escalation rule can be active at a time in an org.
- Salesforce checks cases against the active rule in the background, roughly every 30 minutes. It does not fire at the exact minute a case reaches its age limit.
- Only open cases are evaluated. Closed cases are skipped.
- Escalation does not close or change the status of a case. It runs the actions you configured, such as reassigning the owner or sending an email, and it sets the case's escalated flag.
The "about every 30 minutes" figure comes from Salesforce documentation on how escalation rules are processed. Treat it as approximate, and do not design an SLA that depends on minute-level precision.
Anatomy of an escalation rule
An escalation rule has three layers.
| Layer | Purpose |
|---|---|
| Rule | A named container. Only one rule is active at a time. |
| Rule entry | One ordered row with filter criteria, an age setting, and a business hours choice. |
| Escalation action | Up to five time-based steps within an entry. Each step has an age limit, an assignee, and notifications. |
Rule entries are evaluated in order by sort number. The first entry whose criteria match the case is used, and later entries are ignored for that case. This is the same first-match behavior as assignment rule entries, so the same design habit applies: put specific entries first and general entries last.
Rule entry criteria
Each rule entry defines which cases it applies to. You have two options:
- Run if the specified criteria are met. You build filters on case fields, for example
Priority equals HighandType equals Problem. - Run if the specified formula evaluates to true. You write a formula that returns true or false, which allows cross-object logic such as
Account.Type = "Enterprise".
Filter criteria are easier to read and maintain. Use a formula only when filters cannot express the condition.
Choosing criteria that match real cases
A common failure is criteria that match nothing. Check these points:
- Picklist values are matched as text. If someone renames a status value, the entry silently stops matching.
- Blank values need an explicit test.
Priority equals Highwill not match a case with no priority. - Queue ownership can be part of the criteria. Many orgs escalate only cases that are still owned by a queue, which means nobody has picked them up.
Age and the "Escalation Times" settings
The age of a case is what makes escalation different from other routing. For each entry you choose how age is measured.
Business hours or calendar time
You choose one of two modes for the entry:
- Ignore business hours. Age counts continuously, including nights, weekends, and holidays.
- Use the case's business hours. Age counts only inside the hours defined for the case, which come from the Business Hours field on the case or from the default business hours if the field is empty.
If a case is created Friday at 17:00 and your business hours are Monday to Friday, 09:00 to 17:00, a 4-hour age limit with business hours expires at 13:00 on Monday. With calendar time, the same limit expires at 21:00 on Friday. This is the most frequent source of "my escalation fired at a strange time" reports.
Age Over
Each escalation action has an Age Over value, in hours and minutes. Age is measured from a reference point you select on the entry:
- Case creation. The clock starts when the case is created and does not reset.
- Last modification. The clock restarts each time a user edits the case.
Choose this deliberately. With last-modification timing, an agent who adds a comment every few hours keeps the case from escalating. That may be what you want for activity-based escalation, but it hides stalled cases from an SLA view.
Multiple actions per entry
An entry can contain up to five escalation actions, each with its own Age Over value. A typical sequence for High priority cases:
- 1 hour: notify the owner.
- 2 hours: reassign to the Tier 2 queue.
- 4 hours: reassign to a support manager and notify the manager's team.
The Age Over values are all measured from the same reference point. They are not cumulative. Setting action 2 to 2 hours means 2 hours after the reference time, not 2 hours after action 1.
Setting up a rule
- In Setup, search for Escalation Rules and open the page.
- Click New, give the rule a name, and check Set this as the active escalation rule if you want it live. Save.
- Open the rule and click New in the Rule Entries list.
- Enter a sort order, then choose filter criteria or a formula.
- Choose whether to ignore business hours or use the case's business hours.
- Choose whether the escalation clock starts from case creation or last modification.
- Add escalation actions with Age Over values, the target user or queue, and notification templates.
- Save, and repeat for further entries.
Because only one rule is active, activating a new rule deactivates the current one. Build and test new rules in a sandbox, and plan the switch for a quiet period.
Checking that escalation worked
Escalation sets the IsEscalated field on the case. This query lists open escalated cases, oldest first, which is a quick way to verify behavior:
SELECT Id, CaseNumber, Subject, Priority, Owner.Name, CreatedDate
FROM Case
WHERE IsEscalated = true AND IsClosed = false
ORDER BY CreatedDate ASCIf a case you expected to escalate does not appear, work through these checks in order:
- Is the rule active?
- Is the case open?
- Which entry matched first? An earlier broad entry may have captured it.
- What are the business hours on the case, and has enough business time elapsed?
- Has at least one check cycle run since the age limit passed?
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| No case ever escalates | The rule is not active, or no entry matches | Activate the rule and test the criteria with a list view using the same filters |
| Escalation happens late | Business hours are in effect, or the background check has not run yet | Compare the elapsed business time, and allow for the check interval |
| Wrong entry applies | A broader entry has a lower sort number | Reorder entries so specific ones come first |
| Cases never escalate despite age | Clock is set to last modification and the case keeps being edited | Switch to creation time, or accept activity-based behavior |
| Case escalates once and then nothing more | Remaining actions are not defined, or the earlier action changed the case so it no longer matches the entry | Review criteria that depend on owner or status |
Design checks before activating
- Keep entries few and distinct. Five clear entries are easier to debug than twenty overlapping ones.
- Put a catch-all entry last so no open case is left outside every entry, if that is your intent.
- Name entries by what they do, such as "High priority, 2h to Tier 2".
- Set business hours on cases deliberately. If the field is empty, the default business hours apply, which may not match the customer's region.
- Test with realistic ages. In a sandbox, create a case, wait for a check cycle, and confirm the owner change and email.
Exercise
A rule entry for High priority cases uses business hours (Monday to Friday, 09:00 to 17:00) and has actions at 2 hours and 4 hours, measured from case creation. A High priority case is created Friday at 16:00. At what times, at the earliest, do the two actions become due, and why might they run a little later?
Show answer
One business hour passes on Friday (16:00 to 17:00). The 2-hour action is due after one more business hour, so Monday at 10:00. The 4-hour action is due after three more business hours, so Monday at 12:00. The actions run later than these times if the background check has not yet processed the case, because Salesforce evaluates escalation roughly every 30 minutes. The Age Over values are measured from creation and are not cumulative.
Exercise
Your org has two entries. Entry 1 (sort 1) matches all cases where Status is not Closed and escalates after 8 hours. Entry 2 (sort 2) matches Priority equals High and escalates after 1 hour. High priority cases are not escalating after 1 hour. What is wrong and how do you fix it?
Show answer
Entry 1 matches every open case, including High priority ones, and entries are evaluated in order with the first match used. Entry 2 is never reached. Fix it by giving the High priority entry the lower sort number and the general entry the higher one, or by narrowing Entry 1 to exclude High priority.