service-omni-presence-user-config-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseservice-omni-presence-user-config-deploy
service-omni-presence-user-config-deploy
Deploy an Omni PresenceUserConfig (the "presence configuration" that governs how work is offered to agents) together with the PresenceDeclineReason it references, in one atomic Metadata API package. The decline / auto-accept / decline-reason / ACW fields have cross-field validators — enabling Decline requires Auto-Accept off, Decline Reason requires Decline on, and the ACW timer must be paired with its max time — so they can only be set correctly as a single whole-record write, not field-by-field. This skill encodes that consistent record and assigns it to the given agents. It runs after / and is invoked by as a rep-experience step.
service-omni-agent-users-createservice-omni-presence-status-deployservice-omni-channel-setup-coordinate以原子化Metadata API包的形式,部署Omni PresenceUserConfig(用于控制工作分配给座席方式的“在线状态配置”)及其引用的PresenceDeclineReason。拒绝/自动接受/拒绝原因/ACW字段存在跨字段验证规则——启用拒绝需关闭自动接受,启用拒绝原因需开启拒绝,且ACW计时器必须与其最大时长配对——因此这些字段只能通过单次整记录写入正确设置,无法逐字段设置。本技能封装了这套一致的配置记录,并将其分配给指定座席。它在 / 之后运行,作为客服体验步骤被调用。
service-omni-agent-users-createservice-omni-presence-status-deployservice-omni-channel-setup-coordinateInputs
Inputs
bash
bash scripts/deploy-and-report.sh <org-alias> [config_developer_name] [agent_usernames_csv]- (required).
org-alias - (optional, default
config_developer_name).Omni_Demo_Presence_Config - (optional). Comma-separated Usernames (
agent_usernames_csv) and/or 15/18-char User Ids (…@…) to assign; Ids are resolved to usernames (metadata assigns by username). May also be set via005…. Empty → the config deploys with no user assignments.AGENT_USERNAMES_CSV
Env overrides: (default ), (default derived from the label), (default , 1–100), (default , 10–3600), (optional ServicePresenceStatus DeveloperName).
DECLINE_REASON_LABELTrainingDECLINE_REASON_DEVELOPER_NAMECAPACITY5ACW_SECONDS60PRESENCE_STATUS_ON_DECLINEbash
bash scripts/deploy-and-report.sh <org-alias> [config_developer_name] [agent_usernames_csv]- (必填)。
org-alias - (可选,默认值为
config_developer_name)。Omni_Demo_Presence_Config - (可选)。以逗号分隔的用户名(
agent_usernames_csv)和/或15/18位用户ID(…@…),用于分配配置;ID会被解析为用户名(元数据通过用户名分配)。也可通过005…环境变量设置。若留空,则部署的配置不包含用户分配。AGENT_USERNAMES_CSV
环境变量覆盖:(默认值为)、(默认值由标签派生)、(默认值为,取值范围1–100)、(默认值为,取值范围10–3600)、(可选,ServicePresenceStatus的开发者名称)。
DECLINE_REASON_LABELTrainingDECLINE_REASON_DEVELOPER_NAMECAPACITY5ACW_SECONDS60PRESENCE_STATUS_ON_DECLINEPreconditions and safety
Preconditions and safety
- Target org authenticated via CLI, Service Cloud license,
sfCLI ≥ 2.139.6.sf - Omni-Channel base settings enabled ().
service-omni-base-settings-configure - Any must already exist (
PRESENCE_STATUS_ON_DECLINE).service-omni-presence-status-deploy - The three-way production guard applies.
safe_to_write
- 目标组织已通过CLI认证,拥有Service Cloud许可证,且
sfCLI版本≥2.139.6。sf - Omni-Channel基础设置已启用()。
service-omni-base-settings-configure - 任何指定的必须已存在(
PRESENCE_STATUS_ON_DECLINE)。service-omni-presence-status-deploy - 启用了三重生产环境防护机制。
safe_to_write
Run
Run
deploy-and-report.sh- — the decline reason (label only).
PresenceDeclineReason:<reason> - — capacity + label,
PresenceUserConfig:<config>,enableAutoAccept=false,enableDecline=true,enableDeclineReason=true,declineReasons=<reason>,hasAfterConvoWorkTimer=true, optionalafterConvoWorkMaxTime=<ACW_SECONDS>, andpresenceStatusOnDeclinefor the resolved agents.assignments/users
Elements are emitted in strict XSD order. Idempotency comes from the Metadata API per component (→reused, →updated, →created); the deploy runs and polls to a terminal state.
files[].stateUnchangedChangedCreated--asyncdeploy-and-report.sh- —— 拒绝原因(仅包含标签)。
PresenceDeclineReason:<reason> - —— 包含容量+标签、
PresenceUserConfig:<config>、enableAutoAccept=false、enableDecline=true、enableDeclineReason=true、declineReasons=<reason>、hasAfterConvoWorkTimer=true、可选的afterConvoWorkMaxTime=<ACW_SECONDS>,以及为解析后的座席设置的presenceStatusOnDecline。assignments/users
元素严格按照XSD顺序生成。幂等性来自Metadata API针对每个组件的(→复用,→更新,→创建);部署以方式运行,并轮询直至进入终端状态。
files[].stateUnchangedChangedCreated--asyncBehavior
Behavior
Whole-record + consistent. The record is always emitted with the validator-safe combination, so a re-deploy is a clean no-op rather than a field diff that could trip a cross-field rule.
Non-destructive. Only the named config and decline reason are written; other presence configs and decline reasons on the org are never touched. Assignments are declared for the resolved agents; the skill does not remove users it did not add (a redeploy declares the full assignment set for this config).
整记录+一致性:生成的记录始终符合验证规则要求的组合,因此重新部署会是无操作的干净执行,而非可能触发跨字段规则的字段差异更新。
非破坏性:仅写入指定的配置和拒绝原因;组织中的其他在线状态配置和拒绝原因绝不会被修改。会为解析后的座席声明分配关系;本技能不会移除未添加的用户(重新部署会声明此配置的完整分配集合)。
Output contract
Output contract
A single JSON object: ∈ | | | , (), (), , , , .
statuscreatedupdatedreusedblockedconfig{developer_name, label, capacity, acw_seconds, state}decline_reason{developer_name, label, state}assigned_usernamesdeploy_idmanual_actionsblocking_issue返回单个JSON对象: ∈ | | | ,(),(),,,,。
statuscreatedupdatedreusedblockedconfig{developer_name, label, capacity, acw_seconds, state}decline_reason{developer_name, label, state}assigned_usernamesdeploy_idmanual_actionsblocking_issueLimitations
Limitations
- One presence configuration per invocation.
- Encodes the decline+ACW rep profile from the steel thread; other field combinations require forking the XML template.
- Does not set the channel-level After-Conversation-Work timer on a (a separate concern), deploy
ServiceChannel, or grant status access via permission set.ServicePresenceStatus
- 每次调用仅能部署一个在线状态配置。
- 封装了steel thread中的拒绝+ACW客服配置;其他字段组合需要修改XML模板。
- 不支持在上设置渠道级对话后工作(After-Conversation-Work)计时器(这是单独的事项)、部署
ServiceChannel,或通过权限集授予状态访问权限。ServicePresenceStatus
References
References
| File | When to read |
|---|---|
| PresenceUserConfig cross-field validators, XSD element order, decline-reason packaging, and ACW field pairing |
| Test bootstrap loaded by the contract suite to locate the skill root and run its shell entry point |
| Run after changing the deployment script to verify guard, whole-record, membership, and output contracts |
| 文件 | 阅读场景 |
|---|---|
| PresenceUserConfig跨字段验证规则、XSD元素顺序、拒绝原因打包方式以及ACW字段配对规则 |
| 契约测试套件加载的测试引导程序,用于定位技能根目录并运行其Shell入口点 |
| 修改部署脚本后运行,用于验证防护机制、整记录写入、成员分配和输出契约 |