service-omni-supervisor-config-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseservice-omni-supervisor-config-deploy
service-omni-supervisor-config-deploy
Deploy the classic Omni-Channel Supervisor Configuration () to a Salesforce org in a single Metadata API deploy. is a full Metadata API type whose XSD embeds every companion as a repeatable child element, so the whole configuration — parent plus companions — lands atomically from one file, and Salesforce rolls the companions back together on a partial failure. By default the deploy binds supervisors explicitly by user and lists the queues they monitor; profile scope is optional (see Behavior).
OmniSupervisorConfigOmniSupervisorConfig.omniSupervisorConfig-meta.xml通过单次Metadata API部署,将经典版Omni-Channel Supervisor配置()部署至Salesforce组织。是完整的Metadata API类型,其XSD将所有关联配置作为可重复子元素嵌入,因此整个配置——父配置及关联项——可通过单个文件实现原子化部署,若出现部分失败,Salesforce会将所有关联配置一并回滚。默认情况下,部署会通过用户明确绑定管理员并列出他们监控的队列;基于配置文件的范围为可选设置(详见行为说明)。
OmniSupervisorConfigOmniSupervisorConfig.omniSupervisorConfig-meta.xmlInputs
输入参数
bash scripts/deploy-and-report.sh <org-alias> [supervisor_count] [additional_queues_csv] [profiles_csv] [skill_visibility] [config_developer_name]- (required) — must resolve via
org-alias.sf org display --target-org <alias> - (optional, default
supervisor_count, range1) — how many active1..5users to detect and bind.supervisor{N}.<suffix>@example.com - (optional) — queue DeveloperNames to bind. When the coordinator supplies this list it is authoritative; when omitted, the canonical
additional_queues_csv,CaseQueuedefaults are used. Every requested queue must already exist on the org.messagingqueue - (optional) — opt into profile-based fallback scope; supply metadata profile fullNames (e.g.
profiles_csv). Omit it to bind supervisors by user only.Standard,ServiceCloud - (optional, or
skill_visibility) —OMNI_SUPERVISOR_SKILL_VISIBILITYorAllSkills. Omitted values preserve an existing config's selection; a new config defaults toAnySkill.AllSkills - (optional, or
config_developer_name; defaultOMNI_SUPERVISOR_CONFIG_DEVELOPER_NAME) — the exact classicOmni_Supervisorto create or reconcile. Supply it when an org has multiple supervisor configurations; the skill never guesses between candidates.OmniSupervisorConfig.DeveloperNameoptionally sets the label for a new config. Existing labels are preserved by default.OMNI_SUPERVISOR_CONFIG_MASTER_LABEL
bash scripts/deploy-and-report.sh <org-alias> [supervisor_count] [additional_queues_csv] [profiles_csv] [skill_visibility] [config_developer_name]- (必填)——必须可通过
org-alias解析。sf org display --target-org <alias> - (可选,默认值
supervisor_count,范围1)——检测并绑定的1..5格式活跃管理员用户数量。supervisor{N}.<suffix>@example.com - (可选)——需绑定的队列开发者名称(DeveloperName)。若调用方提供此列表,则以该列表为准;若省略,则使用默认的
additional_queues_csv、CaseQueue。所有请求的队列必须已存在于目标组织中。messagingqueue - (可选)——启用基于配置文件的回退范围;需提供元数据配置文件的全名(例如
profiles_csv)。若省略此参数,则仅通过用户绑定管理员。Standard,ServiceCloud - (可选,或使用环境变量
skill_visibility)——取值为OMNI_SUPERVISOR_SKILL_VISIBILITY或AllSkills。若省略此值,则保留现有配置的选择;新配置默认使用AnySkill。AllSkills - (可选,或使用环境变量
config_developer_name;默认值OMNI_SUPERVISOR_CONFIG_DEVELOPER_NAME)——要创建或协调的经典版Omni_Supervisor的精确值。当组织存在多个管理员配置时需提供此参数;本工具不会自动猜测候选配置。环境变量OmniSupervisorConfig.DeveloperName可用于设置新配置的标签。默认情况下会保留现有标签。OMNI_SUPERVISOR_CONFIG_MASTER_LABEL
Preconditions and safety
前置条件与安全机制
- Target org authenticated via CLI, Service Cloud license present,
sfCLI ≥ 2.139.6.sf - Active supervisor users exist; their supervisor access is granted separately by .
service-omni-supervisor-permset-assign - Omni-Channel base settings are enabled () and the monitored queues exist (
service-omni-base-settings-configure).service-omni-queue-deploy - Production guardrail: the script computes as
safe_to_writeORIsSandboxORTrialExpirationDate != nullin {Developer Edition, Base Edition}, and blocks with no override when it is false. Any unmet precondition returnsOrganizationTypewith astatus: blockedand a click-path.blocking_issue
- 目标组织已通过CLI完成认证,具备Service Cloud许可证,且
sfCLI版本≥2.139.6。sf - 已存在活跃的管理员用户;管理员权限需通过单独授予。
service-omni-supervisor-permset-assign - Omni-Channel基础设置已启用(可通过配置),且受监控队列已存在(可通过
service-omni-base-settings-configure部署)。service-omni-queue-deploy - 生产环境防护机制:脚本会计算值,当目标组织为沙箱环境(
safe_to_write)、试用版(IsSandbox)或组织类型为开发者版/基础版时,该值为TrialExpirationDate != null;若值为true,则脚本会阻止部署且无覆盖选项。任何未满足的前置条件都会返回false,并附带status: blocked及操作路径。blocking_issue
Run
运行方式
One script does detect, deploy, and verify:
bash
bash scripts/deploy-and-report.sh <org-alias> [supervisor_count] [additional_queues_csv] [profiles_csv] [skill_visibility] [config_developer_name]It resolves the deploy artifact's tokens from live org state (discovered supervisor users, verified queues, and — only when is given — validated profiles), materializes the selected DeveloperName into the metadata filename and package manifest, then re-queries that same selected config to confirm the parent and its companion rows persisted before emitting JSON to stdout. The coordinator () invokes it with the authoritative queue list and selected supervisor config; standalone runs use the canonical defaults.
profiles_csvservice-omni-channel-setup-coordinate单个脚本即可完成检测、部署与验证:
bash
bash scripts/deploy-and-report.sh <org-alias> [supervisor_count] [additional_queues_csv] [profiles_csv] [skill_visibility] [config_developer_name]脚本会从组织的实时状态(已发现的管理员用户、已验证的队列,以及仅当提供时的已验证配置文件)解析部署工件的令牌,将选定的DeveloperName写入元数据文件名和包清单,然后重新查询该选定配置以确认父配置及其关联项已持久化,最后向标准输出(stdout)输出JSON。协调工具()会使用权威队列列表和选定的管理员配置调用本脚本;独立运行时则使用默认配置。
profiles_csvservice-omni-channel-setup-coordinateBehavior
行为说明
Companions. The deployed config always carries (one per supervisor) and (one per monitored queue). It follows the same single-file Metadata deploy shape as and .
omniSupervisorConfigUseromniSupervisorConfigQueueservice-omni-service-channel-configureservice-omni-presence-status-deployProfile scope is a fallback, off by default. Core resolves a supervisor's configuration by first, and only falls back to — matched against that supervisor's own profile — when the supervisor has no user row (). Because this skill binds every supervisor by user, profile companions are unnecessary and are omitted unless you pass . When supplied, values must be metadata fullNames (the element resolves against the fullName — , , — not the SOQL label); the skill validates each against and blocks on any the org does not expose.
OmniSupervisorConfigUserOmniSupervisorConfigProfileRealTimeQueueServiceImpl.getSupervisorConfigIdprofiles_csv<profile>StandardServiceCloudAdminUser.Profile.Namesf org list metadata -m ProfileIdempotency and surface preservation. Status follows the Metadata deploy component state: → , → , → . Any other state is a hard failure rather than a silent . Before updating an existing parent, the skill snapshots its reference-free and rows, validates that each can be recreated safely, then restores and re-queries them after the deploy. A custom/reference-bearing surface blocks before deployment instead of risking silent loss. When reconciling an existing config or verifying preservation, invoke only this skill; do not invoke , because adding standard rows afterward could mask a preservation failure. The companion surface skill remains responsible only for a separate request to add new standard actions or tabs.
UnchangedreusedChangedupdatedCreatedcreatedreusedOmniSupervisorConfigActionOmniSupervisorConfigTabservice-omni-supervisor-surface-deployFail-closed verification. The deploy must be (not ). After the parent config is queryable, the script re-queries the child and rows and requires at least the intended counts — the parent existing does not prove the companions landed. Every read must return a parseable array; an inconclusive read never counts as zero. Requested queues are validated against before use, and every requested queue must exist or the run blocks (dropping one silently would under-provision the config).
statusSucceededSucceededPartialOmniSupervisorConfigUserOmniSupervisorConfigQueue.result.records^[A-Za-z0-9_]{1,80}$关联配置项:部署的配置始终包含(每个管理员对应一个)和(每个受监控队列对应一个)。其单文件Metadata部署格式与和一致。
omniSupervisorConfigUseromniSupervisorConfigQueueservice-omni-service-channel-configureservice-omni-presence-status-deploy基于配置文件的范围为回退选项,默认关闭:核心系统会优先通过解析管理员的配置,仅当管理员没有对应的用户行时(),才会回退到——与该管理员自身的配置文件匹配。由于本工具会通过用户绑定所有管理员,因此基于配置文件的关联项并非必需,除非传入参数才会包含。若提供该参数,值必须为元数据全名(元素会根据全名解析——如、、——而非SOQL的标签);工具会通过验证每个配置文件,若组织未暴露该配置文件则会阻止部署。
OmniSupervisorConfigUserRealTimeQueueServiceImpl.getSupervisorConfigIdOmniSupervisorConfigProfileprofiles_csv<profile>StandardServiceCloudAdminUser.Profile.Namesf org list metadata -m Profile幂等性与界面保留:状态遵循Metadata部署组件的状态:→(复用),→(更新),→(创建)。任何其他状态都会视为严重失败,而非静默复用。在更新现有父配置前,工具会对其无引用的和行进行快照,验证是否可以安全重建,然后在部署后恢复并重新查询这些行。若存在自定义/带引用的界面,部署前会阻止操作,避免静默丢失数据。在协调现有配置或验证界面保留时,仅需调用本工具;请勿调用,因为后续添加标准行可能会掩盖界面保留失败的问题。关联界面工具仅负责处理添加新标准操作或标签的单独请求。
UnchangedreusedChangedupdatedCreatedcreatedOmniSupervisorConfigActionOmniSupervisorConfigTabservice-omni-supervisor-surface-deploy失败关闭验证:部署必须为(成功),而非(部分成功)。父配置可查询后,脚本会重新查询子项和的行数,要求至少达到预期数量——父配置存在并不代表关联项已部署成功。每次读取必须返回可解析的数组;不确定的读取结果永远不会被视为零。请求的队列会先验证是否符合格式,且每个请求的队列必须存在,否则运行会被阻止(静默丢弃队列会导致配置不足)。
statusSucceededSucceededPartialOmniSupervisorConfigUserOmniSupervisorConfigQueue.result.records^[A-Za-z0-9_]{1,80}$Output contract
输出约定
A single JSON object to stdout. is one of , , , or . The object also carries , , , snapshot/restoration counts, /, /, ( or ), the re-queried /, , , , and . is unless , in which case it names the missing prerequisite with a click-path in . Re-running an unchanged config returns and performs no functional change.
statuscreatedupdatedreusedblockedconfig_developer_nameconfig_idskill_visibilitysurface_preservationsupervisor_users_boundsupervisor_users_countqueues_boundqueues_countqueue_sourcecaller_suppliedcanonical_defaultverified_companion_user_countverified_companion_queue_countdeploy_idstatemanual_actionsblocking_issueblocking_issuenullstatus: blockedmanual_actionsreusedOrg-side spot-check:
sql
SELECT Id, DeveloperName, MasterLabel FROM OmniSupervisorConfig WHERE DeveloperName='<config_developer_name>'
SELECT COUNT(Id) FROM OmniSupervisorConfigUser WHERE OmniSupervisorConfigId = :configId
SELECT COUNT(Id) FROM OmniSupervisorConfigQueue WHERE OmniSupervisorConfigId = :configId向标准输出(stdout)返回单个JSON对象。取值为、、或。该对象还包含、、、(界面保留)的快照/恢复计数、/、/、(或)、重新查询得到的/、、、和。默认为,仅当时会指定缺失的前置条件,并在中提供操作路径。重新运行未更改的配置会返回,且不会执行任何功能性更改。
statuscreatedupdatedreusedblockedconfig_developer_nameconfig_idskill_visibilitysurface_preservationsupervisor_users_boundsupervisor_users_countqueues_boundqueues_countqueue_sourcecaller_suppliedcanonical_defaultverified_companion_user_countverified_companion_queue_countdeploy_idstatemanual_actionsblocking_issueblocking_issuenullstatus: blockedmanual_actionsreused组织端抽查SQL:
sql
SELECT Id, DeveloperName, MasterLabel FROM OmniSupervisorConfig WHERE DeveloperName='<config_developer_name>'
SELECT COUNT(Id) FROM OmniSupervisorConfigUser WHERE OmniSupervisorConfigId = :configId
SELECT COUNT(Id) FROM OmniSupervisorConfigQueue WHERE OmniSupervisorConfigId = :configIdLimitations
局限性
- Populates user and queue companions (plus optional profile scope). Existing reference-free Action and Tab rows are preserved across an update; new standard rows are added separately by . Custom-action, FlexiPage, AWS-dashboard, and AI-agent rows require external references and therefore block an update rather than being reconstructed incompletely.
service-omni-supervisor-surface-deploy - Binds supervisor users discovered by the pattern; it does not create them.
supervisor{N}.<suffix>@example.com - Does not change AgentWork sharing because that org-wide access control is separate from . Use
OmniSupervisorConfigfor supported metadata detection and the explicitly confirmedservice-omni-agent-work-sharing-configuretoPrivateoperation.Read - Does not activate the Command Center V2 runtime (a separate settings flip).
- 仅填充用户和队列关联项(以及可选的配置文件范围)。更新配置时会保留现有无引用的Action和Tab行;新标准行需通过单独添加。自定义操作、FlexiPage、AWS仪表板和AI-agent行需要外部引用,因此会阻止更新,避免不完整重建。
service-omni-supervisor-surface-deploy - 仅绑定通过模式发现的管理员用户;不创建用户。
supervisor{N}.<suffix>@example.com - 不会更改AgentWork共享设置,因为该组织级访问控制与是分离的。如需支持元数据检测以及明确确认的从
OmniSupervisorConfig到Private的操作,请使用Read。service-omni-agent-work-sharing-configure - 不会激活Command Center V2运行时(需单独设置开关)。
References
参考资料
| File | When to read |
|---|---|
| On a deploy failure — field-by-field |
| The token-templated deploy artifact ( |
| Manifest and project scaffold materialized into the temp deploy dir |
| 文件 | 阅读场景 |
|---|---|
| 部署失败时——查看 |
| 令牌模板化的部署工件(包含 |
| 清单和项目脚手架,会被实例化到临时部署目录 |