service-omni-presence-user-config-deploy
Use to deploy an Omni PresenceUserConfig (presence configuration) as one whole-record Metadata write with the decline/ACW fields set consistently: A…
它会碰到什么
逐条看命中(3 条严重或高危)
- 高
scripts/tests/_bootstrap.py:79cred-envreadenv["PATH"] = os.pathsep.join(kept)
- 高
scripts/tests/_bootstrap.py:81cred-envreadenv["PATH"] = path_prefix + os.pathsep + env.get("PATH", "") - 高
scripts/tests/_bootstrap.py:84exec-spawnproc = subprocess.run(
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
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 service-omni-agent-users-create / service-omni-presence-status-deploy and is invoked by service-omni-channel-setup-coordinate as a rep-experience step.
Inputs
bash scripts/deploy-and-report.sh <org-alias> [config_developer_name] [agent_usernames_csv]
org-alias(required).config_developer_name(optional, defaultOmni_Demo_Presence_Config).agent_usernames_csv(optional). Comma-separated Usernames (…@…) and/or 15/18-char User Ids (005…) to assign; Ids are resolved to usernames (metadata assigns by username). May also be set viaAGENT_USERNAMES_CSV. Empty → the config deploys with no user assignments.
Env overrides: DECLINE_REASON_LABEL (default Training), DECLINE_REASON_DEVELOPER_NAME (default derived from the label), CAPACITY (default 5, 1–100), ACW_SECONDS (default 60, 10–3600), PRESENCE_STATUS_ON_DECLINE (optional ServicePresenceStatus DeveloperName).
Preconditions and safety
- Target org authenticated via
sfCLI, Service Cloud license,sfCLI ≥ 2.139.6. - Omni-Channel base settings enabled (
service-omni-base-settings-configure). - Any
PRESENCE_STATUS_ON_DECLINEmust already exist (service-omni-presence-status-deploy). - The three-way
safe_to_writeproduction guard applies.
Run
deploy-and-report.sh materializes two components into a temp DX project and deploys them in one call:
PresenceDeclineReason:<reason>— the decline reason (label only).PresenceUserConfig:<config>— capacity + label,enableAutoAccept=false,enableDecline=true,enableDeclineReason=true,declineReasons=<reason>,hasAfterConvoWorkTimer=true,afterConvoWorkMaxTime=<ACW_SECONDS>, optionalpresenceStatusOnDecline, andassignments/usersfor the resolved agents.
Elements are emitted in strict XSD order. Idempotency comes from the Metadata API files[].state per component (Unchanged→reused, Changed→updated, Created→created); the deploy runs --async and polls to a terminal state.
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
A single JSON object: status ∈ created | updated | reused | blocked, config ({developer_name, label, capacity, acw_seconds, state}), decline_reason ({developer_name, label, state}), assigned_usernames, deploy_id, manual_actions, blocking_issue.
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
ServiceChannel(a separate concern), deployServicePresenceStatus, or grant status access via permission set.
References
| File | When to read |
|---|---|
| references/api-notes.md | PresenceUserConfig cross-field validators, XSD element order, decline-reason packaging, and ACW field pairing |
| scripts/tests/_bootstrap.py | Test bootstrap loaded by the contract suite to locate the skill root and run its shell entry point |
| scripts/tests/test_presence_user_config_contracts.py | Run after changing the deployment script to verify guard, whole-record, membership, and output contracts |
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
skills/service-omni-presence-user-config-deploy/SKILL.md同一个仓库里的其他技能
- commerce-b2b-open-code-components-integrate
- commerce-b2b-open-code-components-replace
- dx-devops-conflict-resolve
- dx-devops-pipeline-manage
- dx-devops-test-failures-analyze
- dx-devops-test-pipeline-configure
- dx-devops-test-suite-assignments-configure
- dx-devops-test-suite-run
- dx-devops-work-item-manage
- dx-app-analytics-query
- platform-agentexchange-partner-offers-configure
- automation-sandbox-post-copy-config-generate