forcedotcom/sf-skills / plugins/builder/service-omni/skills/service-omni-skills-based-routing-configure
service-omni-skills-based-routing-configure
VerifiedUse to make agents routable by Omni skills-based routing: ensure an Omni Skill exists, then assign it to each active agent through the classic Omni-Channel SkillUser junction. Idempotent — existing skills and user bindings are reused, and only missing bindings are created. Works on Service Cloud orgs without requiring Field Service. Triggers: set up skills-based routing agents, assign Omni skills to agents, make agents skill-routable, create an Omni skill and bind users, repair missing agent skill assignments. Do not use to author WorkSkillRouting rules, create agent users, or configure queues.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.1 KB |
| references/api-notes.md | markdown | 2.6 KB |
| scripts/configure-and-report.shexecutable | script | 12.3 KB |
| scripts/tests/_bootstrap.py | script | 5.5 KB |
| scripts/tests/test_sbr_contracts.pyexecutable | script | 5.6 KB |
references/api-notes.md
View on GitHub# API notes — service-omni-skills-based-routing-configure
## The two objects skills-based routing needs
| Object | API | Purpose |
|---|---|---|
| `Skill` | Metadata API (`Skill`) to create; `Skill` sObject to read | The skill definition. Skills are metadata-backed — they cannot be `INSERT`ed via DML, so a missing skill is created by deploying a `Skill` component, then re-queried for its Id. |
| `SkillUser` | REST DML | Junction assigning a `Skill` to an agent `User`, matching Setup > Skills > Assign Users. Required: `SkillId`, `UserId`. |
## Skill: metadata create, sObject read
The `Skill` sObject exposes `Id`, `DeveloperName`, `MasterLabel` and is queryable, so detection is a
SOQL read by DeveloperName. Creation is a Metadata API deploy of:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Skill xmlns="http://soap.sforce.com/2006/04/metadata">
<description>…</description>
<label>…</label>
</Skill>
```
After the deploy the skill's Id is obtained by re-querying the sObject (the deploy response carries
the fullName, not the record Id). A freshly-deployed skill may lag a moment before it is queryable;
if the re-query returns nothing the skill blocks and asks for a re-run rather than binding to an
empty Id.
## SkillUser
- The skill deduplicates `SkillUser` by `(SkillId, UserId)` and creates only missing bindings for
active users. `SkillLevel` is optional and remains at the platform default.
- `SkillUser` is created through REST DML. A concurrent create can return `DUPLICATE_VALUE`; the
script reconciles that response as reused because the desired binding now exists.
- `ServiceResourceSkill` is not used. It belongs to the Field Service model and requires an active
`ServiceResource`. Plain Service Cloud orgs do not expose a writable or queryable
`ServiceResource.IsActive`, so that path produces inactive resources and rejected bindings.
## Prerequisite: base settings
Skills-based routing must be enabled in Omni-Channel settings
(`service-omni-base-settings-configure`) before skills route work. A Skill deploy can succeed while
SBR is off, so the skill points the operator at the base-settings skill when the deploy fails with
an SBR-disabled error.
## Out of scope: WorkSkillRouting
Authoring `WorkSkillRouting` rules (field-based skill criteria such as "add Voice when Case
Priority = Medium") is a **separate** capability — it is a Tooling-API rule header
(`WorkSkillRoutingStandardEntity`: `MasterLabel`, `DeveloperName`, `IsActive`) with skill-requirement
and field-criteria children, and only one rule is permitted per entity. It is not created here.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |