service-omni-skills-based-routing-configure
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseservice-omni-skills-based-routing-configure
配置Omni基于技能的路由(service-omni-skills-based-routing-configure)
Make agents routable by Omni skills-based routing (SBR). A routable agent needs the Skill and a SkillUser junction assigning that skill to the agent's user. is the classic Omni-Channel model written by Setup > Skills > Assign Users and evaluated when work has skill requirements. This skill ensures both, idempotently, for one skill across a set of active agent users.
SkillUserServiceResourceServiceResourceSkillServiceResource.IsActiveSkillUser通过Omni基于技能的路由(SBR)实现座席可路由。可路由的座席需要拥有Skill,以及将该技能分配给座席用户的SkillUser关联对象。是经典的Omni-Channel模型,可通过Setup > Skills > Assign Users进行配置,当工作项有技能要求时会被调用。本技能可幂等性地为一组活跃座席用户配置所需的技能及关联关系。
SkillUserServiceResourceServiceResourceSkillServiceResource.IsActiveSkillUserInputs
输入参数
bash
bash scripts/configure-and-report.sh <org-alias> <skill_developer_name> [agent_members_csv] [skill_master_label]- (required).
org-alias - (required). The Omni
skill_developer_nameDeveloperName to ensure and bind (e.g.Skill).Omni_Demo_Voice - (optional). Comma-separated agents to make skill-routable — each token a Username (
agent_members_csv) or a 15/18-char User Id (…@…). May also be supplied via005…. When omitted, the skill blocks (it will not guess which agents to skill).AGENT_MEMBERS_CSV - (optional). MasterLabel used only when the skill must be created; defaults to a title-cased form of the DeveloperName.
skill_master_label
bash
bash scripts/configure-and-report.sh <org-alias> <skill_developer_name> [agent_members_csv] [skill_master_label]- (必填)。
org-alias - (必填)。要确保存在并绑定的Omni
skill_developer_name的DeveloperName(例如:Skill)。Omni_Demo_Voice - (可选)。逗号分隔的需设置为技能可路由的座席——每个元素为用户名(
agent_members_csv)或15/18位用户ID(…@…)。也可通过环境变量005…提供。若省略该参数,本技能将停止执行(不会自动猜测要配置的座席)。AGENT_MEMBERS_CSV - (可选)。仅当需要创建技能时使用的MasterLabel;默认值为DeveloperName的标题化形式。
skill_master_label
Preconditions and safety
前置条件与安全要求
- Target org authenticated via CLI, Service Cloud license,
sfCLI ≥ 2.139.6.sf - Omni-Channel base settings enabled with skills-based routing turned on ().
service-omni-base-settings-configure - The named agents exist and are active ().
service-omni-agent-users-create - The three-way production guard applies.
safe_to_write
- 目标组织已通过CLI完成认证,拥有Service Cloud许可,且
sfCLI版本≥2.139.6。sf - Omni-Channel基础设置已启用,且基于技能的路由已开启(可通过技能配置)。
service-omni-base-settings-configure - 指定的座席已存在且处于活跃状态(可通过技能创建)。
service-omni-agent-users-create - 启用了三方生产环境保护机制。
safe_to_write
Run
运行方式
configure-and-report.sh- Skill — query by DeveloperName. Present → reused; absent → deploy a
Skillcomponent via the Metadata API and re-query for its Id.Skill - SkillUser — query existing records for the Skill and resolved users, then create only missing (
SkillUser,SkillId) bindings via REST DML. A concurrentUserIdis reconciled as reused.DUPLICATE_VALUE
configure-and-report.sh- Skill——通过DeveloperName查询。若已存在则复用;若不存在则通过Metadata API部署一个
Skill组件,并重查询其ID。Skill - SkillUser——查询该技能与已解析用户的现有记录,然后仅通过REST DML创建缺失的(
SkillUser,SkillId)绑定关系。若出现并发UserId错误,将自动处理为复用已有绑定。DUPLICATE_VALUE
Behavior
行为特性
Idempotent + non-destructive. Existing skills and bindings are reused; the skill never deletes or reassigns anything it did not create, so re-runs converge without duplication. Only active users are resolved — an inactive user cannot be routed work, so it is reported rather than silently skilled.
Partial safety. If some bindings succeed and others fail, the status is with per-agent errors in ; the successful bindings are left in place (each junction is an independent write).
partialblocking_issue幂等性 + 非破坏性。已有的技能和绑定关系会被复用;本技能绝不会删除或重新分配其未创建的内容,因此重复执行不会产生重复内容,最终会收敛到一致状态。仅会解析活跃用户——非活跃用户无法接收路由工作项,因此会被报告而非静默配置技能。
部分安全性。若部分绑定成功而其他绑定失败,状态会设为,并在中包含每个座席的错误信息;成功的绑定关系会保留(每个关联对象都是独立的写入操作)。
partialblocking_issueOutput contract
输出约定
A single JSON object: ∈ | | | , (), (array of ), , , , .
statusconfiguredreusedpartialblockedskill{developer_name, id, state}agents{username, user_id, skill_binding_id, skill_binding_state}created_countsreused_countsmanual_actionsblocking_issue- — skill and all bindings already existed.
reused - — at least one component created and all requested bindings now exist.
configured - /
partial— seeblocked;blocking_issuenames the prerequisite skill when the cause is a missing precondition.manual_actions
返回单个JSON对象: ∈ | | | ,(),(数组),,,,。
statusconfiguredreusedpartialblockedskill{developer_name, id, state}agents{username, user_id, skill_binding_id, skill_binding_state}created_countsreused_countsmanual_actionsblocking_issue- ——技能及所有绑定关系已存在。
reused - ——至少创建了一个组件,且所有请求的绑定关系现已存在。
configured - /
partial——详见blocked;若原因是缺少前置条件,blocking_issue会指明所需的前置技能。manual_actions
Limitations
局限性
- One skill per invocation; run again per skill an agent set needs.
- Does not author rules or field-based skill criteria — that is a separate skill.
WorkSkillRouting - Does not create agent users, queues, or presence configuration.
- is left at the platform default; forking the DML body is required to set explicit proficiency.
SkillUser.SkillLevel
- 每次调用仅能配置一个技能;若座席组需要多个技能,需重复执行。
- 不支持编写规则或基于字段的技能条件——这属于单独的技能范畴。
WorkSkillRouting - 不支持创建座席用户、队列或在线状态配置。
- 会保留平台默认值;若需设置明确的熟练度,需修改DML主体内容。
SkillUser.SkillLevel
References
参考资料
| File | When to read |
|---|---|
| Skill metadata vs Skill sObject, the SkillUser agent-binding model, and SBR base-setting prerequisites |
| When validating changes — run |
| 文件 | 阅读场景 |
|---|---|
| 了解Skill元数据与Skill sObject的区别、SkillUser座席绑定模型,以及SBR基础设置的前置条件 |
| 验证变更时——从本技能目录运行 |