Sub topic 8
Escalation Rules: Criteria, Rule Entries, and Age
This chapter assumes you know what a Case is, how queues own cases, and how assignment rules route new cases. It also assumes you can navigate Setup and read basic SOQL. Here you will build the part of an escalation rule that decides which cases escalate and when. Actions such as reassigning and notifying are covered in the next chapter.
What an escalation rule does
An escalation rule checks open cases on a schedule and acts on those that have been open too long without being closed. It is the safety net for cases that routing placed correctly but nobody has resolved.
Keep these facts in mind:
- You can have many escalation rules, but only one is active at a time.
- A rule contains ordered rule entries.
- Each entry has criteria, an age limit, and actions.
- Salesforce evaluates cases against the active rule, starting with the entry that has the lowest order number.
Rule entries and criteria
A rule entry is one "if this case looks like this, escalate it after this long" statement. Criteria can be field conditions, such as Priority equals High, or a formula. Entries are evaluated in order, and a case is processed by the first entry it matches. Later entries are skipped for that case.
Because of this, put the most specific entries first and the broadest last. If a catch-all entry sits at order 1, no other entry can ever match.
| Order | Criteria | Escalate after |
|---|---|---|
| 1 | Priority = High AND Origin = Phone | 1 hour |
| 2 | Priority = High | 4 hours |
| 3 | Priority = Medium | 1 business day |
An entry can also carry the option to ignore the rule's business hours, or to use a specific set of business hours. Business hours are defined in the previous chapter's topic. Here, you only need to know that the age clock counts only time inside the chosen hours.
How age works
Age is the time since the case was created, or since a field you pick changed. The entry has an "Escalate after" setting in hours, and you can choose how it is measured:
- Case creation: Age counts from
CreatedDate. - Last modified: Age counts from the last change to the case.
Pick last modified if you want any agent activity to restart the clock. Pick creation if the target is a hard deadline for resolution.
Salesforce checks escalation rules about every 30 minutes. A one-hour limit therefore means roughly an hour to an hour and a half in practice. Do not use escalation rules for sub-hour precision.
Only open cases are checked. Once a case is closed, the clock stops. Also, a case escalates once per entry, and the IsEscalated field is set to true when the action runs.
Activating and applying the rule
Create the rule in Setup under Escalation Rules, add entries, and then activate it. Activating a new rule deactivates the previous one. Existing and new cases that match are picked up the next time the check runs.
To confirm escalation is working, query for escalated, open cases:
SELECT Id, CaseNumber, Subject, Priority, Owner.Name, CreatedDate
FROM Case
WHERE IsEscalated = true AND IsClosed = false
ORDER BY CreatedDate ASCCommon errors
- Broad entry first. An early catch-all entry hides every entry after it.
- No business hours selected. The clock runs around the clock, so cases escalate overnight.
- Expecting exact timing. The check interval makes timing approximate.
- No active rule. Entries do nothing unless the rule is activated.
Exercise
A rule has entry 1 "Priority = High, escalate after 4 hours" and entry 2 "Priority = High AND Origin = Phone, escalate after 1 hour". A high-priority phone case is open for two hours. Does it escalate, and how would you fix the rule?
Show answer
It does not escalate. The case matches entry 1 first, so entry 2 is skipped, and entry 1 needs 4 hours. Fix it by moving the more specific entry (High AND Phone) to order 1 and the broader High entry to order 2.