# How do Case Assignment Rules automate the initial routing of incoming support requests?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Assignment Rules, Automation

Read it on the site: https://www.forcechallenges.com/interview-questions/how-do-case-assignment-rules-automate-the-initial-routing-of-incoming-support-requests

## Answer

**Basics:** Without routing, cases land on whoever created them or on a default owner. An assignment rule says: if Priority = High and Product = Billing, assign to the Billing Escalations queue. Only one assignment rule can be active per object at a time.

**How it works:**
1. Setup > Case Assignment Rules > New; name it and mark Active.
2. Add Rule Entries with an order number, criteria (fields or formula), the assignee (user or queue), and an email template.
3. Salesforce evaluates entries top to bottom and stops at the first match.
4. Rules run automatically for Web-to-Case and (via routing settings) email-created cases, and for manual creation when "Assign using active assignment rules" is chosen.
5. If no entry matches, the default case owner applies.

**Advanced / deep dive:** In Apex, rules do not run unless you ask via DML options. Flows do not apply assignment rules by default; verify the option for the element you use, or call Apex. Use Omni-Channel after the rule: assignment rules put the case into a queue; Omni-Channel then pushes it to an agent. For more complex logic such as skills or capacity, route through Omni-Channel Flow instead. Keep entries few and ordered most-specific first; very large rule sets are hard to maintain, so consider custom metadata with Flow.

**Code / config example:**
```apex
Database.DMLOptions dmo = new Database.DMLOptions();
dmo.assignmentRuleHeader.useDefaultRule = true;   // run the active case rule
List<Case> cases = new List<Case>{ new Case(Subject = 'Login issue', Priority = 'High') };
Database.insert(cases, dmo);
```

**Hidden gotchas & must-remember points:**
- Editing a case does not re-run the rule unless you check the box or set DML options.
- Only one active case assignment rule at a time; activating another deactivates the first.
- First matching entry wins, so order matters.
- Assignment to a queue is not assignment to a person; notify via queue email.
- Entry count per rule is limited (verify current cap).
- Territory assignment rules and lead/case assignment rules are different features.

**Best practice:** Keep rules simple and ordered most specific first; use Omni-Channel for capacity-aware distribution.

---
Source: ForceChallenges · last updated 2026-11-02
