Assignment, escalation and auto-response rules
The classic rule engines (one active rule per type, ordered entries, business hours) and how they coexist with Omni-Channel and Flow without fighting it.
Simple explanation
Service Cloud has three declarative rule engines for cases. Each allows one active rule with ordered entries, and the first matching entry wins.
- Assignment rules set the owner (a user or a queue) when a case is created. Email-to-Case and Web-to-Case apply them automatically. Apex, SOAP and Bulk API inserts must request them explicitly (
Database.DMLOptions.assignmentRuleHeader,AssignmentRuleHeader, the job's assignment rule ID). REST API applies the active rule unlessSforce-Auto-Assign: FALSEis sent β verify. - Escalation rules act on cases that stay unresolved too long. Each entry has criteria plus time-based escalation actions ("after 4 business hours, reassign to Tier 2 and notify the manager"). They set
IsEscalatedand respect business hours. - Auto-response rules send the first acknowledgement email to customers who create cases through Email-to-Case or Web-to-Case. The first matching entry chooses the template.
Today they usually play a supporting role. Assignment rules drop cases into queues, Omni-Channel pushes them to agents, and entitlements and milestones handle contractual SLAs.
Real-world analogy
A post-room sorting desk.
- Assignment rules are the sorting instructions: anything for Legal goes into the Legal tray, and the first matching instruction wins.
- Auto-response is the "we've received your letter" postcard sent back to the sender.
- Escalation is the supervisor who walks past every few hours and moves anything that has sat too long to an urgent tray.
Worked example
A complaint arrives through the web form.
- Web-to-Case creates the case. The active assignment rule entry Type = Complaint AND Priority = High sends it to the Complaints β Priority queue.
- The auto-response rule entry for complaints sends a template that quotes the case number and the expected response time.
- Omni-Channel routes from that queue to an available complaints handler.
- If the case is still open after 8 business hours, the escalation rule reassigns it to the Complaints Team Lead queue and emails the manager. Milestones would track the contractual SLA separately.
Diagram
Key points
- One active rule per type and object. Entries are evaluated in order and the first match wins, so put specific entries before generic ones.
- Assignment rules run on create from Web-to-Case and Email-to-Case. From the UI, Apex and the SOAP/Bulk APIs they run only when requested (checkbox or header).
- Escalation actions are time-based (age in business hours) and can reassign, notify and set
IsEscalated. - Auto-response rules apply to Web-to-Case and Email-to-Case acknowledgements.
- Common modern pattern: assignment rules put cases in queues, Omni-Channel routes them to agents, and milestones measure SLAs.
- Record-triggered Flow and Omni-Channel Flow can replace assignment logic, but choose one owner for routing on each channel.
Limits and gotchas
- Double routing. An assignment rule and an Omni-Channel Flow both setting the owner on the same case causes races and "ping-pong". Pick one.
- Integration-created cases can skip assignment rules. Apex DML and SOAP/Bulk inserts run them only when requested, while REST defaults differ. This is a classic "why aren't integration cases routed?" bug, so set the header explicitly either way.
- Escalation rules aren't SLAs. They have no milestone tracker, no success or warning semantics and no per-customer entitlement. Use entitlements for contractual commitments.
- Business hours need maintaining, including holidays, or escalations fire at 3 a.m. on public holidays.
- Large rule sets become opaque. Document the order of execution, or move complex logic into a decision table or Flow.
π€ How to say this in an interview
"I treat assignment rules as the coarse sorting step that places a case in the right queue. Omni-Channel does the real-time distribution, and entitlements measure the SLA. Escalation rules are a safety net, not the SLA mechanism. Above all, one component owns routing for each channel, and I document the order of execution."
Common follow-ups
Cases created by your integration aren't being assigned. Why?
Apex DML and SOAP/Bulk API inserts run assignment rules only when the caller asks: Database.DMLOptions.assignmentRuleHeader.useDefaultRule = true in Apex, AssignmentRuleHeader in SOAP, an assignment rule ID on the Bulk job. REST has its own Sforce-Auto-Assign header with a different default β verify. Set it explicitly, or route these cases with Flow or Omni-Channel so routing doesn't depend on every caller remembering the header.
Escalation rules or milestones for SLAs?
Milestones (entitlements) for contractual SLAs: per-customer terms, business hours, warning, violation and success actions, plus a tracker the agent can see. Escalation rules are org-wide age triggers. They're fine as a backstop ("anything untouched for 2 days goes to a lead"), but they can't express per-customer commitments.