Sub topic 9
Escalation actions: reassign and notify
This chapter covers what happens after a case matches an escalation rule entry and its age limit passes. It assumes you know how queues work, how assignment rules route new cases, and where business hours fit into escalation timing. You also need basic SOQL.
What an escalation action is
An escalation rule entry decides which cases are affected and how old they must be. An escalation action decides what Salesforce does once that age is reached. Each rule entry can define up to five actions. Each action has its own age trigger, measured in minutes or hours from the case's creation time, or from the last modification time if you chose that option on the entry.
The two things an action can do are:
- Reassign the case to a user or a queue.
- Notify people by email.
An action can do both at once. Setting a field like Escalated is separate, and Salesforce does it for you.
How the Escalated flag behaves
When an escalation action fires, Salesforce sets the standard field IsEscalated to true on the case. This happens whether or not the action reassigns the case or sends any email. The flag stays set until a user or automation clears it. Escalation does not close, reopen, or change the status of a case.
You can use this flag in list views, reports, and SOQL. The query below lists open escalated cases, oldest first.
SELECT Id, CaseNumber, Subject, Priority, Owner.Name, CreatedDate
FROM Case
WHERE IsEscalated = true AND IsClosed = false
ORDER BY CreatedDate ASCTiming: when does an action fire?
Escalation rules are evaluated on a schedule by Salesforce, not on every save. Because of this, an action can fire a little after its configured age. Treat the age as a minimum, not an exact time.
The age is counted in one of two ways:
- If you chose to ignore business hours, the clock runs on calendar time.
- If you chose to use the case's business hours, the clock only advances during those hours and skips holidays attached to that business hours record.
An action's age is cumulative from the start of the case, not from the previous action. If action 1 fires at 2 hours and action 2 is set to 4 hours, action 2 fires two hours after action 1, not four.
Cases that match an entry fire each action only once per qualifying evaluation. If a user edits a case in a way that changes which entry it matches, the rule is reevaluated against the new state. That can restart the age counting for the new entry.
Configuring the reassign option
In the rule entry, you add an escalation action and pick the target in the "Escalate To" setting. The target can be:
- A specific user.
- A queue.
If you leave the escalate-to field empty, the case stays with its current owner. Use that when you only want to send a warning without moving the case.
Reassignment to a queue is the usual choice. It avoids routing work to someone who is on leave. A queue is stored as a Group record of type Queue, so its Id can also be assigned directly through Apex:
Group tier2 = [
SELECT Id
FROM Group
WHERE Type = 'Queue' AND DeveloperName = 'Tier2_Support'
LIMIT 1
];
Case c = new Case(
Subject = 'Data export fails',
Origin = 'Email',
OwnerId = tier2.Id
);
insert c;An escalation action works the same way internally. It changes OwnerId to the user or queue you selected.
Things to check on the target
- A queue must list Case as a supported object. If it does not, it cannot be chosen.
- A user target must be active and have access to the Case object.
- The queue should have members or an email address. An empty queue with no notification leaves the case unseen.
Configuring the notify option
An action can send an email in two ways:
- To the user the case is escalated to, using the "Notify" option for the new owner.
- To an additional address, such as a manager, using the "Notify Case Owner" and "Notify Additional Email" settings.
You also choose an email template. The template merges fields from the case, so recipients see the case number, subject, priority, and a link.
Practical points about notification:
- The template must be an active email template that is available to the Case object.
- Salesforce sends escalation email using the sender settings of the organization. A restricted organization-wide email address setup can block delivery.
- Email counts against your daily email limits. A rule that matches many cases can use a lot of them.
- If the case is reassigned to a queue, email goes to the queue's email address if set, and the queue members only receive notifications if the queue is configured to send to members.
Combining reassign and notify
A common pattern is a ladder of increasing urgency. The table shows one for high priority cases.
| Action | Age (business hours) | Reassign to | Notify |
|---|---|---|---|
| 1 | 1 hour | Current owner stays | Case owner |
| 2 | 3 hours | Tier 2 queue | Tier 2 team lead |
| 3 | 6 hours | Support manager | Director of support |
Keep the ladder short. More steps mean more email and more places for a case to move unnoticed.
Interaction with other automation
Escalation actions change the owner, and other automation reacts to that change. Check these three areas:
- Assignment rules. Reassigning by escalation does not run assignment rules again. The target you chose is final.
- Triggers and flows. A change of
OwnerIdfires record-triggered flows and Apex triggers on Case. Keep those fast, and make sure they do not undo the escalation. - Sharing. Moving the case to a queue or a user changes who can see it. If your sharing model is private, check that the new owner's role can read the case.
A frequent mistake is a flow that sets the owner back to the original queue whenever the owner changes. Escalation then looks as if it never happened, but the IsEscalated flag is still true.
Verifying that escalation worked
Create a test case that matches an entry, with a short age such as 5 minutes where your setup allows it. Then check three things in order:
- The case's
IsEscalatedfield is true. - The Owner field matches the target.
- The recipient received the email, or the email appears in the email logs.
The next query finds open cases still sitting in a queue, which helps you see whether escalated work was picked up.
SELECT Id, CaseNumber, Subject, Status
FROM Case
WHERE Owner.Type = 'Queue' AND IsClosed = false
ORDER BY CreatedDate ASCCommon problems
| Symptom | Likely cause | Fix |
|---|---|---|
| Nothing happens | The escalation rule is not the active one | Activate the rule. Only one case escalation rule can be active. |
| Case escalates late | Evaluation is periodic, or business hours pause the clock | Allow a margin, and check the business hours record |
| Case matches no entry | Criteria are too narrow, or entry order is wrong | Review entry order and field values |
| Email is not received | Template inactive, or email deliverability set to system emails only | Check the template and email deliverability setting |
| Case returns to old owner | Flow or trigger overrides `OwnerId` | Add a condition so automation ignores escalation changes |
| Action does not reassign | Target queue does not support Case | Add Case to the queue's supported objects |
Summary
Escalation actions are the part of an escalation rule that does the work. They set IsEscalated, optionally change the owner to a user or queue, and optionally send an email from a template. They fire on a schedule, and their ages are cumulative. Keep ladders short, use queues as targets, and check that other automation does not undo the reassignment.
Exercise
A rule entry has two actions. Action 1 is at 2 hours and notifies the case owner. Action 2 is at 5 hours and reassigns the case to the Tier 2 queue. The case was created at 9:00 and business hours are ignored. Roughly when does the reassignment happen, and what do you check if the case is still owned by the original agent at 15:00 with IsEscalated set to true?
Show answer
The reassignment happens at about 14:00, which is 5 hours after creation, because action ages are counted from the start of the case and not from the previous action. Evaluation is periodic, so it can be a little later. If the owner is still the original agent while IsEscalated is true, check that the action has Tier 2 set as the escalate-to target, that the queue supports Case, and that no flow or trigger sets OwnerId back to the original owner.
Exercise
Write a SOQL query that returns open cases that are escalated and currently owned by a queue.
Show answer
SELECT Id, CaseNumber, Subject, Owner.Name FROM Case WHERE IsEscalated = true AND IsClosed = false AND Owner.Type = 'Queue' ORDER BY CreatedDate ASC