WorkSkillRouting defines object-specific attribute-to-skill mappings for Omni-Channel skills-based routing. Each mapping associates a work-item field value with a skill that an agent needs to handle the work. Create one attribute mapping set for each Salesforce object.
The individual mappings are nested WorkSkillRoutingAttribute entries inside workSkillRoutingAttributes. They define skill requirements and whether those requirements can relax when no matching agent is available. The timeout for dropping additional skills belongs to the routing configuration, not to WorkSkillRouting.
Key Elements
| Element | What the Element Controls |
|---|---|
isActive |
Required boolean. Controls whether the routing assignments are active and can be evaluated. |
masterLabel |
Required string. The internal display label, which is not translated. |
relatedEntity |
Required string. Identifies the Salesforce object whose attributes are mapped, such as Case. |
workSkillRoutingAttributes |
The collection of nested mappings between work-item field values and skills. |
field |
Required within each mapping. Identifies the field to evaluate, such as Case.Origin. |
value |
The field value associated with the selected skill, such as Web. |
skill |
Required within each mapping. Identifies the skill used to route work when the field matches the mapped value. |
skillLevel |
The required proficiency level for the skill. Allowed values range from 0 to 10. |
isAdditionalSkill |
Marks a skill as eligible to be dropped after the designated timeout so routing can consider agents who do not have every initially requested skill. |
skillPriority |
Controls the order in which additional skills are dropped. Lower-priority ranks such as 9 or 10 drop first; higher-priority ranks such as 0 or 1 drop last. Equal-priority skills drop together. |
Behavior and Constraints
isActive controls evaluation of the mapping set. Within that set, relatedEntity identifies the object, while each entry's field and value identify the attribute condition that selects a skill.
For example, a mapping can associate Case.Origin equal to Web with Technical_Skill at skillLevel 3. These are example values, not defaults or required settings.
Additional skills and fallback routing
An additional skill is a skill requirement that routing can drop after a timeout. The combination of isAdditionalSkill and skillPriority controls this fallback behavior:
-
isAdditionalSkilldetermines whether the skill is eligible to be dropped through this mechanism. - The routing configuration's Drop Additional Skills Timeout determines the designated timeout. There is no timeout element on
WorkSkillRouting. - If no agent with the additional skill is available after that timeout,
skillPrioritydetermines the dropping order. A rank of9, for example, drops before a rank of1. - Additional skills with the same
skillPriorityare dropped as a group, not one at a time.
skillPriority governs additional skills; setting a priority alone does not mark a skill as additional. Skill priority can be configured through attribute setup for skills-based routing or through Apex code.
These settings define the initial skill requirements and the permitted relaxation of those requirements. They do not guarantee a routing outcome: agent availability and the routing configuration's timeout also affect which agent can receive the work.
Deployment and Retrieval
WorkSkillRouting components use the .workSkillRouting file suffix and reside in the workSkillRoutings folder. The type inherits fullName from the base Metadata type. Its required masterLabel is the display label.
The type supports the * wildcard in the package.xml manifest for deployment and retrieval. The individual attribute mappings are nested in the parent component's workSkillRoutingAttributes collection.
The dependencies to account for are the associated object, the mapped fields and values, and the selected skills. Changing any of these, or a mapping's proficiency and fallback settings, can change the skill requirements a work item acquires.
Moving the mapping component does not configure the Drop Additional Skills Timeout. That setting remains part of the separate routing configuration, so the mapping and the timeout must be considered together when diagnosing different routing behavior between orgs.
Relationships
The parent object's association is separate from the references inside each mapping. relatedEntity identifies the object; nested field and skill elements identify the mapped field and selected skill. WorkSkillRoutingAttribute is the nested mapping structure.
References
-
CustomObject:relatedEntity. -
CustomField:field, withinworkSkillRoutingAttributes. -
Skill:skill, withinworkSkillRoutingAttributes.
Reported Issues
-
Apex SOQL access was reported as unavailable. A 2021 community answer listed both
WorkSkillRoutingandWorkSkillRoutingAttributeas absent from the ApexSchemanamespace and not queryable in Apex. This report concerns Apex query access, not retrieval of the metadata component. See the discussion of Tooling API objects and Apex queries.
Common Questions
Where are WorkSkillRouting metadata files stored?
They are stored in the workSkillRoutings folder with the .workSkillRouting suffix. The type supports * in a package.xml manifest.
Where do I set the timeout for dropping additional skills?
Set the Drop Additional Skills Timeout on the routing configuration. In WorkSkillRouting, use isAdditionalSkill to mark eligible skills and skillPriority to control their dropping order.
Does skill priority 1 drop before priority 9?
No. Lower-priority ranks such as 9 drop first; higher-priority ranks such as 1 drop last. Additional skills with equal priority drop together.
Which dependencies matter when moving a WorkSkillRouting component?
Check the object identified by relatedEntity, each mapped field and value, and each referenced skill. Also account for the separate routing configuration's timeout when comparing fallback behavior.