Sub topic 11
Monitoring queues and escalated cases
This chapter assumes you can build list views and basic reports in Salesforce, and that you know what queues and escalation rules do. SOQL knowledge helps with the query sections but isn't required for the rest. The chapter covers how to see what is waiting in queues, what has escalated, and whether your routing setup is working.
Why monitoring matters
Routing and escalation rules run silently. A misrouted case doesn't raise an error. It sits in a queue nobody watches. An escalation rule that never fires also produces no message. You only find these problems by looking at the data.
Two questions cover most monitoring needs:
- What is waiting in each queue, and for how long?
- Which cases have escalated, and did anyone act on them?
You can answer both with list views, reports, dashboards, and SOQL.
The fields that make monitoring possible
Everything you monitor comes from a few fields on the Case object.
| Field | What it tells you | Typical use |
|---|---|---|
| Owner (OwnerId) | The user or queue that owns the case | Find unassigned work |
| Owner.Type (SOQL) | `Queue` or `User` | Separate queued cases from picked-up cases |
| IsEscalated | Set when an escalation rule fires, or when someone checks Escalated | Find escalated work |
| IsClosed | True when the status is a closed status | Exclude finished cases |
| Status and Priority | Where the case is in its lifecycle and how urgent it is | Filter and group |
| CreatedDate and Age | When the case was opened and how long it has been open | Spot old cases |
The Owner field is polymorphic, so it can point to a User or a Group. In list views and reports the Case Owner column shows the queue name when a queue owns the case. In SOQL you check Owner.Type to tell the two apart.
Monitoring queues with list views
A list view is the fastest tool for the people working the queue. Agents can open it every few minutes.
To build a queue list view:
- Open the Cases tab and create a new list view, for example "Tier 2 Support: Open".
- Under filters, set the owner filter to all cases so you aren't limited to your own.
- Add a filter for Case Owner equals the queue name.
- Add a filter for Closed equals false.
- Sort by Date/Time Opened ascending so the oldest case appears first.
- Add columns for Case Number, Subject, Priority, Status, and Date/Time Opened.
Share the view with the group that works the queue. Pin it as the default for that team if your app setup allows it.
Queue members can also see a queue's cases by switching the list view to that queue, since queues appear as list view options on objects the queue supports. The queue only appears for Case if you added Case as a supported object when you created it.
A view for unassigned work
A useful second view shows every open case still owned by any queue. It tells a supervisor how much work no individual agent has accepted. Filter on Closed equals false and Case Owner equals each queue, using the "or" filter logic, or use a report for this (see below). List views are limited in how they filter by owner type, so reports are usually better for a cross-queue view.
Monitoring queues with reports
Reports handle what list views can't: grouping, counts, and charts across all queues.
Start from the Cases report type and build a summary report:
- Group rows by Case Owner. Queues appear as their own groups alongside users.
- Filter on Closed equals false.
- Show Case Number, Subject, Priority, Status, and Age.
- Add a Row Count summary so each queue shows its backlog.
To keep users out of the numbers and see only queues, add a filter on Case Owner that lists your queue names. If you add queues often, a bucket field on Case Owner can map several queue names to one category such as "Tier 2 queues".
Useful variations:
- Backlog by priority. Group by Case Owner, then by Priority. A large High count in one queue is an early warning.
- Aging. Filter on Age greater than a threshold, such as 2 days, to show cases that have waited too long without pickup.
- Pickup trend. Use a created-date filter and a line chart to compare cases created with cases closed per day.
Monitoring escalated cases
The Escalated checkbox on a case is the signal for escalation. An escalation rule sets it when a rule entry's age condition is met, and an agent can also check it manually. Because both paths set the same field, a report on it includes manual escalations.
Build a report for escalation:
- Use the Cases report type.
- Filter Escalated equals true and Closed equals false.
- Group by Case Owner to show where escalated cases sit now.
- Add columns for Priority, Date/Time Opened, Age, and Status.
If the escalation action reassigns cases to a manager or queue, you expect to see escalated cases under that owner. If they still show the original owner, the action probably didn't reassign them. Check the rule entry's action settings.
Query for escalated cases
You can run the same check in SOQL, for example in the Developer Console or in code:
SELECT Id, CaseNumber, Subject, Priority, Owner.Name, CreatedDate
FROM Case
WHERE IsEscalated = true AND IsClosed = false
ORDER BY CreatedDate ASCThe oldest escalated case comes first, which is usually the one that needs attention most. If this query returns rows after you set up an escalation rule, escalation is working. If it returns nothing after cases have clearly passed their time limit, go to the troubleshooting chapter's checklist: is the rule active, do the cases match an entry, and do business hours count the elapsed time.
Query for work waiting in queues
SELECT Id, CaseNumber, Subject, Status
FROM Case
WHERE Owner.Type = 'Queue' AND IsClosed = false
ORDER BY CreatedDate ASCThis lists open cases still owned by a queue, so no individual agent has picked them up. Add Owner.Name to the SELECT list to see which queue holds each one. Use GROUP BY with COUNT() when you want totals per queue:
SELECT Owner.Name, COUNT(Id) total
FROM Case
WHERE Owner.Type = 'Queue' AND IsClosed = false
GROUP BY Owner.NameRun this from a scheduled job or an external dashboard if you need monitoring outside the Salesforce UI.
Dashboards and subscriptions
A dashboard turns the reports into one screen for supervisors. A practical layout:
- A bar chart of open cases per queue, from the backlog report.
- A table of the ten oldest queue-owned cases.
- A metric for the number of open escalated cases.
- A stacked chart of High, Medium, and Low priority cases in each queue.
Set the dashboard's running user carefully. If it runs as a specific user, everyone viewing sees that user's data. Choose a user with access to all cases in scope, or let viewers see their own data if that is what you want. Check that the person you pick can see cases owned by queues.
Reports can be subscribed to on a schedule. A daily or hourly email of the escalated report puts the data in front of managers who don't open Salesforce. Add a condition to the subscription, such as sending only when the record count is greater than zero, so the email only arrives when something needs action.
Common monitoring mistakes
- Reporting only on users. A report grouped by user omits queue-owned cases if you filter on user roles or profiles. Group by Case Owner to include queues.
- Forgetting closed cases. Without the Closed filter, backlog counts include history.
- Queue not supporting Case. If Case isn't a supported object on the queue, cases can't be assigned to it, and routing to it fails.
- Sharing gaps. Users who can't see cases owned by the queue see incomplete reports. Check sharing settings and report folder access.
- Counting escalations without context. Combine the escalated report with Age and Priority so a count of ten means something.
Exercise
A supervisor wants to know how many open cases are still waiting in each queue, with the oldest case listed first. Which SOQL fields and conditions would you use, and why is a filter on Closed needed?
Show answer
Filter on Owner.Type = 'Queue' and IsClosed = false, select Owner.Name, and order by CreatedDate ASC. The Owner.Type filter keeps only cases that no individual has picked up. The IsClosed filter removes finished cases, which would otherwise inflate the counts and bury the cases that still need work. For counts per queue, use COUNT(Id) with GROUP BY Owner.Name.
Exercise
You built an escalation rule and a report filtered on Escalated equals true and Closed equals false. Cases clearly passed their time limit, but the report is empty. Name three things to check.
Show answer
Check that the escalation rule is active, that the cases match a rule entry's criteria, and that business hours or the entry's age settings count the elapsed time as you expect. You can also check that the report's Case Owner or sharing filters don't hide the cases from the report's running user.