service-omni-presence-status-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseservice-omni-presence-status-deploy
service-omni-presence-status-deploy
Deploy the sObject-specific ServicePresenceStatus bound to that sObject's ServiceChannel, and ensure a universal status exists, in one atomic Metadata API deploy. Every Omni agent needs an "available for work" status carrying a channel (so incoming work routes) and an "off-work" status (so they can step away). A presence status binds to exactly one ServiceChannel by DeveloperName, so each routing target needs its own Available status. It pairs with , which grants agents access to the statuses this skill deploys, and is invoked once per routing target by .
Available_<X>Busyservice-omni-permission-set-assignservice-omni-channel-setup-coordinate| Target sObject | Available status | Bound channel |
|---|---|---|
| | |
| | |
| | |
| | |
Busy is UI-defined, not metadata-defined. The Omni "Busy vs Online" option is not expressible via the Metadata API — a carries only and , and a status with no channels is treated as busy. The conventional busy DeveloperName is simply , and most orgs already have one, so this skill reuses an existing and deploys the bundled asset only when none exists. A busy status is not required to receive work — the Available status carrying the channel is what routes it.
ServicePresenceStatus<label><channels>BusyBusy通过一次原子化Metadata API部署,创建与目标sObject对应的ServiceChannel绑定的 ServicePresenceStatus,并确保全局状态存在。每位Omni Agent都需要一个关联渠道的“工作可用”状态(用于接收路由过来的工作)和一个“离岗”状态(用于暂时离开工作)。在线状态通过DeveloperName与唯一的ServiceChannel绑定,因此每个路由目标都需要专属的Available状态。该技能与配合使用——后者为Agent授予访问当前技能所部署状态的权限,且由针对每个路由目标调用一次。
Available_<X>Busyservice-omni-permission-set-assignservice-omni-channel-setup-coordinate| Target sObject | Available status | Bound channel |
|---|---|---|
| | |
| | |
| | |
| | |
Busy状态由UI定义,而非元数据定义。Omni的“忙碌 vs 在线”选项无法通过Metadata API实现——仅包含和字段,无渠道关联的状态会被视为忙碌状态。常规的忙碌状态DeveloperName为,大多数组织已存在该状态,因此本技能会复用现有状态,仅在不存在时才部署捆绑的资源。接收工作无需忙碌状态——关联渠道的Available状态才是实现工作路由的关键。
ServicePresenceStatus<label><channels>BusyBusyInputs
Inputs
bash
bash scripts/deploy-and-report.sh <org-alias> [Case|Incident|MessagingSession|VoiceCall]- (required).
org-alias - (optional, default
sobject_type).Case
bash
bash scripts/deploy-and-report.sh <org-alias> [Case|Incident|MessagingSession|VoiceCall]- (必填)
org-alias - (可选,默认值为
sobject_type)Case
Preconditions and safety
Preconditions and safety
- Target org authenticated via CLI (My Domain URL), Service Cloud license,
sfCLI ≥ 2.139.6.sf - Omni-Channel base settings enabled () — otherwise the deploy fails with
service-omni-base-settings-configure.INVALID_TYPE - The target sObject's ServiceChannel exists () — otherwise the deploy fails with
service-omni-service-channel-configure.Value '<channel>' is not validrequires the Incident Management feature enabled;Incidentrequires Enhanced Messaging.MessagingSession - The three-way production guard applies.
safe_to_write
- 目标组织已通过CLI(My Domain URL)完成身份验证,拥有Service Cloud许可证,且
sfCLI版本≥2.139.6sf - 已启用Omni-Channel基础设置()——否则部署会因
service-omni-base-settings-configure错误失败INVALID_TYPE - 目标sObject对应的ServiceChannel已存在()——否则部署会因
service-omni-service-channel-configure错误失败。Value '<channel>' is not valid要求启用事件管理功能;Incident要求启用增强型消息功能MessagingSession - 已启用三重生产环境保护机制
safe_to_write
Run
Run
deploy-and-report.shAvailable_<X>Busyfiles[].state- — every component
reused.Unchanged - — any component
updated, noneChanged.Created - — any component
created.Created
There is no separate detect step — Salesforce's is authoritative. The deploy uses explicit flags (never ) so unrelated assets cannot piggyback.
files[].state--metadata--source-dirdeploy-and-report.shAvailable_<X>Busyfiles[].state- ——所有组件均为
reused(未变更)Unchanged - ——存在组件为
updated(已变更),无组件为Changed(已创建)Created - ——存在组件为
created(已创建)Created
无需单独的检测步骤——Salesforce的为权威依据。部署使用明确的参数(绝不使用),以避免无关资源被附带部署。
files[].state--metadata--source-dirBehavior
Behavior
Reuse over redeploy. An existing is detected and left untouched; only a missing one is deployed. The skill never deletes or overwrites presence statuses it did not deploy — orgs often carry other custom statuses (, ).
BusyOmni_OnBreakavailableForMiawSchema. The XML omits (removed in v66; online/busy is inferred from the presence of ), and the skill never SOQL-queries (not queryable on v66 — only Id, DeveloperName, MasterLabel are reliable). binds the standard channel that Enhanced Messaging always ships.
<statusType><channels>StatusTypeAvailable_Messagingsfdc_livemessage优先复用,避免重复部署。系统会检测现有状态并保持其不变;仅在不存在时才部署该状态。本技能绝不会删除或覆盖非自身部署的在线状态——组织通常会包含其他自定义状态(如、)。
BusyOmni_OnBreakavailableForMiaw架构说明。XML文件中省略了字段(该字段在v66版本中已移除;在线/忙碌状态由是否存在字段推断),且本技能从不通过SOQL查询(v66版本中该字段不可查询——仅Id、DeveloperName、MasterLabel字段可靠)。状态与增强型消息功能默认提供的标准渠道绑定。
<statusType><channels>StatusTypeAvailable_Messagingsfdc_livemessageOutput contract
Output contract
A single JSON object with ∈ | | | , , a array (each with , , , , and — for — ), , , and .
statuscreatedreusedupdatedblockedsobject_typepresence_statusesdeveloper_namelabelchannelsstateBusyreused_existingdeploy_idmanual_actionsblocking_issue- — deploy failed (missing prereq, schema mismatch, or org error);
blockednames the prerequisite skill to run andmanual_actionsis an operator-friendly translation of the Salesforce error.blocking_issue - is populated on every run (Salesforce issues one even for no-op deploys).
deploy_id
输出为单个JSON对象,包含以下字段:(取值为、、或)、、数组(每个元素包含、、、字段;若为状态,还包含字段)、、和。
statuscreatedreusedupdatedblockedsobject_typepresence_statusesdeveloper_namelabelchannelsstateBusyreused_existingdeploy_idmanual_actionsblocking_issue- ——部署失败(缺少前置条件、架构不匹配或组织错误);
blocked字段指定需运行的前置技能,manual_actions字段为面向操作人员的Salesforce错误翻译版本blocking_issue - 字段在每次运行时都会填充(即使是无操作部署,Salesforce也会生成该ID)
deploy_id
Limitations
Limitations
- Deploys only the +
Available_<X>pair — custom statuses require forking theBusy.assets/servicePresenceStatuses/*.xml - Only ,
Case,Incident,MessagingSession— extend by adding a dispatcher branch and a matching asset.VoiceCall - Does not configure capacity or decline reasons, and never deletes existing statuses.
PresenceUserConfig
- 仅部署+
Available_<X>状态对——自定义状态需复刻Busy文件进行配置assets/servicePresenceStatuses/*.xml - 仅支持、
Case、Incident、MessagingSession——如需扩展,需添加调度分支及匹配的资源VoiceCall - 不配置容量或拒绝原因,且绝不会删除现有状态
PresenceUserConfig
References
References
| File | When to read |
|---|---|
| Load when preparing the explicit Metadata API deployment for the selected Available status and the optional Busy status |
| On unexpected deploy behavior — the v66 XML schema (no |
| 文件 | 阅读时机 |
|---|---|
| 为选定的Available状态及可选的Busy状态准备显式Metadata API部署时查阅 |
| 出现意外部署行为时查阅——包含v66版本XML架构(无 |