# How do dynamic skill rules enhance routing precision for complex multi-product customer inquiries?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Skills-Based Routing, Dynamic Routing

Read it on the site: https://www.forcechallenges.com/interview-questions/how-do-dynamic-skill-rules-enhance-routing-precision-for-complex-multi-product-customer-inquiries

## Answer

**Basics:** A **Skill** (for example "Billing" or "Product_X") is assigned to agents (Service Resources) with an optional level 0 to 10. A work item such as a Case carries **skill requirements**. Instead of fixed queue membership, routing matches requirements to agents. "Dynamic" means the requirements are computed at routing time from the case data (product, language, tier, topic), not typed by hand.

**How it works:**
1. Create Skills and assign them to users through Service Resource records (ServiceResourceSkill).
2. Create a Routing Configuration and a queue that uses it; enable Omni-Channel and set up Service Channels with agent capacity.
3. Build an **Omni-Channel Flow** (record-triggered on Case) that runs the Route Work action, adds Skill Requirements (from Product, Language, Priority via decision logic), and routes to a queue or directly to skills.
4. Omni-Channel creates a PendingServiceRouting record; skills are attached; the engine finds agents who are online, have capacity, and meet all skills; the work is offered to the best match.
5. If no one matches, work waits in the queue or falls back to broader requirements.

**Advanced / deep dive:** For multi-product cases, use several requirements (Product_A level 5 and Language_ES). Matching requires an agent to have all required skills, so overly strict rules create stranded work. Use skill requirement options such as an "is additional skill" with a timeout in the routing setup, or a fallback queue, to relax rules after a wait. Apex or Flow can also determine skills from AI classification (for example Einstein/Agentforce case classification fields) feeding the Flow. Do not mix too many skills: manage them as a taxonomy with owners, otherwise administration cost explodes. Capacity (units or percentage) controls how many items an agent holds.

**Code / config example:**
```apex
// Apex (bulk-safe): add a skill requirement to pending routing records
PendingServiceRouting psr = new PendingServiceRouting(
    ServiceChannelId = channelId, WorkItemId = caseId,
    RoutingType = 'SkillsBased', RoutingModel = 'MostAvailable',
    CapacityWeight = 1, IsReadyForRouting = false);
insert psr;
insert new SkillRequirement(RelatedRecordId = psr.Id,
    SkillId = skillId, SkillLevel = 5);
psr.IsReadyForRouting = true; // release to the routing engine
update psr;
```

**Hidden gotchas & must-remember points:**
- Insert PendingServiceRouting with IsReadyForRouting false, add SkillRequirements, then set it true, or routing may start without skills.
- Skill requirements are matched with AND logic.
- Skill levels are 0 to 10.
- Agents must be in a presence status mapped to the service channel.
- Flow-based routing is the current declarative approach; legacy Process Builder is retired.
- Changing skills on a case after routing does not automatically re-route it.

**Best practice:** Keep a small, governed skill taxonomy, derive requirements from structured fields, and always provide a fallback path.

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