Sub topic 2
Routing New Cases with Assignment Rules
Assume you know basic Salesforce navigation, users, queues, and support workflows. An assignment rule is a set of ordered conditions that decides which user or queue owns a new Case.
Route cases with assignment rules
Create a queue first, such as Tier2_Support, and add the agents who should receive its cases. Then create a case assignment rule in Setup. Each rule entry has:
- Criteria, such as
Priority equals HighorOrigin equals Email. - An assignment target, such as a queue or user.
- An order number.
Salesforce evaluates active entries from top to bottom. The first matching entry assigns the case, so put specific conditions before broad ones. A final entry can catch cases that match no special condition.
Assignment rules apply when a case is created through supported channels or when a user selects the option to apply the active rule. They do not automatically re-route every later field change.
Case c = new Case(
Subject = 'Cannot log in to the portal',
Origin = 'Web',
Priority = 'High'
);
Database.DMLOptions dmo = new Database.DMLOptions();
dmo.assignmentRuleHeader.useDefaultRule = true;
c.setOptions(dmo);
insert c;Define business hours and holidays
Business hours define when elapsed support time counts. Configure a calendar with working days, start and end times, time zone, and holidays. An escalation measured in business hours pauses outside that calendar. For example, an eight-business-hour escalation does not count overnight or during a configured holiday.
Use the calendar that matches the support commitment. A global calendar can produce incorrect timing when teams work different schedules.
> callout note > Check the business-hours time zone and holiday dates before testing escalation. Both can change the expected escalation time.
Build escalation rules
An escalation rule evaluates open cases against criteria, such as Priority equals High and IsClosed equals false. Its rule entries define when action occurs. Each entry commonly includes:
- The case age, measured from creation or another selected date.
- The business-hours setting.
- Actions, such as changing the owner, raising priority, or sending an email.
Salesforce evaluates the rule entries when the escalation process runs. Make earlier entries represent shorter thresholds or more urgent conditions, and ensure actions do not repeatedly trigger unintended updates.
Exercise
A high-priority case should move to the Tier 2 queue after four business hours. What must you configure?
Show answer
Create an active escalation rule for open high-priority cases, add a four-business-hour entry using the correct business-hours calendar, and set an action that changes the owner to the Tier 2 queue.