service-omni-base-settings-configure
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseservice-omni-base-settings-configure
service-omni-base-settings-configure
Enable the five booleans (, , , , ) via a single Metadata API deploy. Nothing downstream — queues, presence statuses, routing flows — works without , so this must be the first write in an Omni setup sequence. The skill probes first and deploys only when a toggle is false or missing.
OmniChannelSettingsenableOmniChannelenableOmniAutoLoginPromptenableOmniSecondaryRoutingPriorityenableOmniSkillsRoutingenableOmniStatusCapModelenableOmniChannel=true通过一次Metadata API部署启用五项布尔值(、、、、)。如果未启用,所有下游组件——队列、在线状态、路由流——都无法正常工作,因此这必须是Omni设置流程中的首个写入操作。该工具会先探测状态,仅在开关为false或缺失时才进行部署。
OmniChannelSettingsenableOmniChannelenableOmniAutoLoginPromptenableOmniSecondaryRoutingPriorityenableOmniSkillsRoutingenableOmniStatusCapModelenableOmniChannel=trueInputs
Inputs
bash
bash scripts/configure-and-report.sh run <org-alias> # detect; deploy if needed; re-verify
bash scripts/configure-and-report.sh plan <org-alias> # read-only: detect only, never deploysorg-aliastrueplatform-metadata-deployOmniChannel.settings-meta.xmlbash
bash scripts/configure-and-report.sh run <org-alias> # detect; deploy if needed; re-verify
bash scripts/configure-and-report.sh plan <org-alias> # read-only: detect only, never deploysorg-aliastrueplatform-metadata-deployOmniChannel.settings-meta.xmlPreconditions and safety
Preconditions and safety
- Target org authenticated via CLI (My Domain URL, not
sf), Service Cloud license present,.lightning.force.comCLI ≥ 2.139.6.sf - Production guardrail: the writer computes as
safe_to_writeORIsSandboxORTrialExpirationDate != nullin {Developer Edition, Base Edition}, and blocks with no override when it is false. This permits CDOs (OrganizationTypewith a non-nullIsSandbox=false); do not weaken it to a bareTrialExpirationDatecheck.IsSandbox
- 目标组织已通过CLI完成身份验证(使用My Domain URL,而非
sf),具备Service Cloud许可证,且.lightning.force.comCLI版本≥2.139.6。sf - 生产环境防护: 脚本会计算的值,当组织为沙盒(
safe_to_write为true)、试用版到期日期不为空(IsSandbox),或组织类型属于{Developer Edition, Base Edition}时,该值为true;若值为false,则会阻止写入且无法覆盖。此规则允许CDO(TrialExpirationDate != null但试用版到期日期非空);请勿将其简化为仅检查IsSandbox=false的判断逻辑。IsSandbox
Run
Run
configure-and-report.sh- run — probe; if all five are already enabled, emit (no deploy); otherwise run the
reusedguard, deploy the explicitsafe_to_writesource file with all fiveassets/force-app/main/default/settings/OmniChannel.settings-meta.xml(atrueis treated as failure), re-probe, and emitSucceededPartialiff all five are now true, elseconfigured. The explicit source path bypasses source-tracking no-op decisions when the org value has drifted.blocked - plan — probe only; emit if all enabled, else
reused. Never deploys.action_needed
The probe retrieves and takes 1–2 minutes (Metadata retrieve is slow); this is expected. The deploy runs from (a valid DX project) and names the settings file with ; its template is never mutated at runtime, so the skill stays reproducible and does not report "No local changes to deploy" solely because local source tracking is clean.
Settings:OmniChannelassets/--source-dirconfigure-and-report.sh- run — 探测状态;如果五项开关均已启用,则输出(不执行部署);否则执行
reused防护检查,部署safe_to_write源文件(所有开关均设为assets/force-app/main/default/settings/OmniChannel.settings-meta.xml,若部署结果为true则视为失败),重新探测状态,只有当所有五项开关均为true时才输出SucceededPartial,否则输出configured。明确指定源路径可避免因组织值偏离导致的源跟踪无操作决策。blocked - plan — 仅探测状态;如果所有开关均已启用则输出,否则输出
reused。绝不会执行部署操作。action_needed
探测操作会获取,耗时1-2分钟(Metadata检索速度较慢),这属于正常情况。部署操作从(一个有效的DX项目)执行,并通过指定设置文件;其模板在运行时不会被修改,因此该工具的执行结果可重现,且不会仅因本地源跟踪状态干净而报告“无本地更改可部署”。
Settings:OmniChannelassets/--source-dirBehavior
Behavior
Whole-document writes. is a whole-document metadata type — the Metadata API does not accept partial updates, so the skill always deploys the full file rather than PATCHing individual toggles.
SettingsLogin-behavior gap. The Omni login-behavior radio (Setup → Omni-Channel Settings → "Define login behavior when an agent opens a new window/tab") has no public API on v66. The report always surfaces its click-path — even on a no-op run — so a "nothing to do" result never hides the one manual action. still deploys cleanly (other Omni features may depend on it internally) but does not drive that radio.
reusedenableOmniAutoLoginPromptFail-closed verify. After a deploy the skill re-probes and requires all five toggles true; a deploy that reports success but does not stick (an uncommon org-level restriction) blocks rather than reporting success.
全文档写入:是一种全文档元数据类型——Metadata API不接受部分更新,因此该工具始终部署完整文件,而非对单个开关进行PATCH操作。
Settings登录行为差异:在v66版本中,Omni登录行为单选按钮(设置→Omni-Channel设置→“定义代理打开新窗口/标签页时的登录行为”)没有公开API。报告总会显示其操作路径——即使在无操作的运行中也是如此,因此“无需操作”的结果绝不会隐藏这一唯一的手动操作。仍可正常部署(其他Omni功能可能在内部依赖它),但无法控制该单选按钮。
reusedenableOmniAutoLoginPrompt失败闭合验证:部署完成后,工具会重新探测状态,要求所有五项开关均为true;如果部署报告成功但设置未生效(罕见的组织级限制),则会阻止后续操作而非报告成功。
Output contract
Output contract
configure-and-report.shstatusconfiguredreusedaction_neededblockedall_enabledbeforeafterdeploy_idsafe_to_writemanual_actionsblocking_issue- — a toggle was false, the deploy ran, and the re-probe shows all true (run mode).
configured - — all five were already true; no deploy.
reused - — plan mode saw a disabled toggle; nothing deployed.
action_needed - —
blocked, the deploy failed or wassafe_to_write=false, or the re-probe still shows a false toggle.SucceededPartial
manual_actionsdeploy_idnullreusedaction_neededblocking_issuestatus: blockedconfigure-and-report.shstatusconfiguredreusedaction_neededblockedall_enabledbeforeafterdeploy_idsafe_to_writemanual_actionsblocking_issue- — 存在开关为false的情况,已执行部署,且重新探测显示所有开关均为true(运行模式)。
configured - — 所有五项开关已启用;未执行部署。
reused - — 计划模式下检测到禁用的开关;未执行部署。
action_needed - —
blocked、部署失败或结果为safe_to_write=false,或重新探测仍显示存在开关为false。SucceededPartial
在非阻塞报告中,始终包含登录行为差异的操作项;在/状态下为;仅当时,才会指明失败原因。
manual_actionsdeploy_idreusedaction_needednullstatus: blockedblocking_issueLimitations
Limitations
- Configures only , always with all five toggles true — other
OmniChannelSettingstypes belong toSettings.platform-metadata-deploy - Cannot turn the login-behavior radio (no public API on v66) — it only surfaces the click-path.
- 仅配置,且始终将所有五项开关设为true——其他类型的
OmniChannelSettings需使用Settings。platform-metadata-deploy - 无法控制登录行为单选按钮(v66版本无公开API)——仅能显示其操作路径。
References
References
| File | When to read |
|---|---|
| Before a deploy — the five toggles' semantics, dependencies, and the login-behavior caveat |
| 文件 | 阅读时机 |
|---|---|
| 部署前——了解五项开关的语义、依赖关系以及登录行为的注意事项 |