К основному содержанию
скилл CX Codex

service-omni-service-channel-configure — скилл для Claude Code

Скилл service-omni-service-channel-configure для Claude Code находит или создаёт ServiceChannel для Case, Incident, MessagingSession или VoiceCall. Запускается при настройке Omni-Channel.

Apache-2.0 106 установок ★ 1 183 обновлён 2026-10-23

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add forcedotcom/sf-skills --skill service-omni-service-channel-configure -a claude-code
Открыть на GitHub

Что делает service-omni-service-channel-configure

Скилл проверяет, есть ли в Salesforce ServiceChannel для выбранного sObject, и переиспользует найденный канал. Если канала нет, scripts/deploy-and-report.sh разворачивает канонический XML. Поиск идёт через Tooling API, потому что ServiceChannel относится к Tooling API на v66.0. За один вызов обрабатывается один sObject.

Нужны авторизация целевой org через sf CLI с My Domain URL, лицензия Service Cloud, sf версии 2.139.6 или новее и jq версии 1.6 или новее. Базовые настройки Omni-Channel должны быть включены. Для Incident требуется Incident Management, для MessagingSession — Enhanced Messaging. Без этих условий запуск блокируется или завершается с INVALID_TYPE.

Поддерживаются только Case, Incident, MessagingSession и VoiceCall. Уже существующий стандартный или пользовательский канал не перезаписывается; настройка ёмкости через PresenceUserConfig.Capacity сюда не входит. Результат содержит статус created, reused или blocked.

Какие задачи решает

  • найти уже существующий ServiceChannel для routable sObject
  • создать канал для Incident, если его ещё нет
  • добавить маршрутизацию VoiceCall или Incident в Omni-Channel
  • избежать ошибки Salesforce при повторном создании канала
  • получить JSON-отчёт о создании или переиспользовании канала

Примеры запросов агенту

  • Настрой ServiceChannel для Case в org через bash scripts/deploy-and-report.sh <org-alias> Case.
  • Добавь маршрутизацию Incident в Omni-Channel командой bash scripts/deploy-and-report.sh <org-alias> Incident.
  • Проверь канал для VoiceCall и верни JSON-отчёт через bash scripts/deploy-and-report.sh <org-alias> VoiceCall.

Как установить service-omni-service-channel-configure

1Через Skills CLI (Vercel)

npx skills add forcedotcom/sf-skills --skill service-omni-service-channel-configure -a claude-code

2Вручную: положить файлы

~/.claude/skills/service-omni-service-channel-configure/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/service-omni-service-channel-configure/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о service-omni-service-channel-configure

Как установить service-omni-service-channel-configure в Claude Code?

Выполни npx skills add forcedotcom/sf-skills --skill service-omni-service-channel-configure -a claude-code, затем открой ~/.claude/skills/service-omni-service-channel-configure/SKILL.md.

Что делает service-omni-service-channel-configure?

Скилл сначала проверяет EntityDefinition и через Tooling API ищет ServiceChannel для одного из поддерживаемых sObject. Найденный канал переиспользуется, а при его отсутствии разворачивается канонический XML.

Что нужно для работы service-omni-service-channel-configure?

Нужны авторизованная через sf CLI org с My Domain URL, лицензия Service Cloud, sf версии 2.139.6 или новее и jq версии 1.6 или новее. Также требуются включённые базовые настройки Omni-Channel и разрешение OrgPermissions.LightningService; для Incident нужен Incident Management, для MessagingSession — Enhanced Messaging.

Исходный текст

SKILL.md · Apache-2.0
---
name: service-omni-service-channel-configure
description: "Use to ensure exactly one ServiceChannel exists on a Salesforce org for a routable sObject (Case | Incident | MessagingSession | VoiceCall), reusing any standard or custom channel already bound to that sObject and only deploying a canonical template when none exists. Salesforce enforces one ServiceChannel per RelatedEntity, so the skill detects via the Tooling API first. Standard channels ship for Case (Cases), MessagingSession (sfdc_livemessage), VoiceCall (sfdc_phone); Incident has none. Triggers: configure ServiceChannel for Case/Incident/Messaging/Voice routing, add Incident or Voice routing to Omni. Do not use to tune per-sObject capacity (use PresenceUserConfig.Capacity), to reset a mis-configured channel to canonical shape, or for sObjects outside Case/Incident/MessagingSession/VoiceCall."
allowed-tools: Bash Read Write Edit Glob Grep
metadata:
  version: "1.0"
  domains: ["Service"]
  minApiVersion: "66.0"
  relatedSkills:
    - "service-omni-base-settings-configure"
  accessCheck: "OrgPermissions.LightningService"
  cliTools:
    - tool: ["jq"]
      semver: ">=1.6"
    - tool: ["sf"]
      semver: ">=2.139.6"
---

# service-omni-service-channel-configure

Ensure exactly one `ServiceChannel` is present for a routable sObject, reusing whatever is already bound (Salesforce standard or a pre-existing custom channel) and deploying the skill's canonical v66 template only when none exists. Salesforce enforces one ServiceChannel per `RelatedEntity`, so the skill detects first and never deploys blindly — deploying a second channel for an sObject that already has one fails with "This Salesforce object is already in use by another Service channel." It handles one sObject per call; callers configuring multiple sObjects invoke it once for each sObject, after `service-omni-base-settings-configure` has enabled Omni-Channel.

| sObject | Standard channel (if any) | Canonical asset |
|---|---|---|
| `Case` | `Cases` | `Cases.serviceChannel-meta.xml` |
| `Incident` | none (Incident Management sObject) | `Incidents.serviceChannel-meta.xml` — deployed on first run |
| `MessagingSession` | `sfdc_livemessage` | `MessagingSessions.serviceChannel-meta.xml` — deployed only if the standard channel is missing |
| `VoiceCall` | `sfdc_phone` | `VoiceCalls.serviceChannel-meta.xml` — deployed only if the standard channel is missing |

## Inputs

```bash
bash scripts/deploy-and-report.sh <org-alias> [Case|Incident|MessagingSession|VoiceCall]
```

- `org-alias` (required).
- `sobject_type` (optional, default `Case`) — one of `Case | Incident | MessagingSession | VoiceCall`.

## Preconditions and safety

- Target org authenticated via `sf` CLI (My Domain URL), Service Cloud license, `sf` CLI ≥ 2.139.6.
- Omni-Channel base settings enabled (`service-omni-base-settings-configure`) — `ServiceChannel` is only queryable/writable when `enableOmniChannel=true`; a `INVALID_TYPE` on deploy means base settings are off.
- `Incident` requires the Incident Management feature enabled; `MessagingSession` requires Enhanced Messaging. The skill verifies `EntityDefinition` first and blocks with a click-path when the target sObject is absent.

## Run

`deploy-and-report.sh` performs the prereq check, discovery, and (only when needed) deploy, then emits the report:

1. **Prereq** — confirm the target sObject is queryable via `EntityDefinition`; block with a click-path otherwise.
2. **Discover** — query the Tooling API for a `ServiceChannel` with `RelatedEntity = <sobject_type>`. `ServiceChannel` is a Tooling entity on v66; the standard Data API returns `INVALID_TYPE`. A hit means reuse.
3. **Deploy** (only when nothing was found) — `sf project deploy start` of the canonical XML (`Cases` | `Incidents` | `MessagingSessions` | `VoiceCalls`); a `Changed` state is `created`, `Unchanged` is `reused`.

## Behavior

**Detect-then-reuse-or-deploy.** Because Salesforce rejects a second channel per `RelatedEntity`, deploy-first is unsafe: an operator who renamed the standard `Cases` channel would hit the "already in use" error instead of gracefully reusing. Tooling discovery is fast and returns both the reuse decision and the discovered `DeveloperName` in one call. The trade-off is that the skill cannot tell "our canonical shape matches" from "some custom channel is bound" — an operator with a non-canonical channel gets `reused` and their channel is left untouched (v1 never overwrites operator state).

**Capacity model.** The canonical assets use `TAB_BASED` for every variant. `STATUS_BASED` requires companion fields whose full schema is undocumented, so it is out of scope; per-agent capacity tuning belongs to `PresenceUserConfig.Capacity`, not this skill.

**Concurrency.** If a deploy fails with "already in use," another process created the channel between discovery and deploy; the skill soft-fails and a re-run reuses it.

## Output contract

A single JSON object per invocation with `status` ∈ `created` | `reused` | `blocked`, plus `sobject_type`, `channel_developer_name`, `channel_id`, `channel_origin`, `target_capacity_model`, `target_related_entity_type`, `before_state`, `deploy_id`, `manual_actions`, and `blocking_issue`.

- `reused` — an existing channel was found (discovery hit, or a deploy returned `Unchanged`).
- `created` — no channel existed; the canonical XML deployed with `Changed`.
- `blocked` — the sObject is not on the org, base settings are off (`INVALID_TYPE`), or a race left the channel already in use.
- `channel_origin` is one of `salesforce_standard` (an `sfdc_*` name or `Cases`), `canonical_asset` (a shipped asset name), `canonical_template` (freshly deployed this run), or `custom` (a pre-existing org-specific channel).
- `channel_id` is populated whenever a channel exists (`null` on `blocked`); `deploy_id` is populated only on the deploy branch; `blocking_issue` is non-null only when `status: blocked`.

## Limitations

- One sObject per invocation.
- Only `Case`, `Incident`, `MessagingSession`, `VoiceCall` are supported — extend by adding an `assets/force-app/main/default/serviceChannels/<Name>.serviceChannel-meta.xml` file and a dispatcher branch.
- Always reuses an existing channel; it does not reset a mis-configured channel to canonical shape.

## References

| File | When to read |
|---|---|
| `references/api-notes.md` | On unexpected discovery results, deploy failures, or sObject-specific schema questions |

© forcedotcom · Apache-2.0 · forcedotcom/sf-skills

Похожие скиллы

Все скиллы по теме «Бэкенд и API» →
salesforce-automation davepoon Скилл salesforce-automation для Claude Code автоматизирует работу с Salesforce через Composio. Создаёт и ищет лиды, контакты, аккаунты и сделки, выполняет SOQL-запросы. CX Codex +1 128установок salesforce-development официальный TemitayoAfolabi Плагин salesforce-development добавляет в GitHub Copilot Chat четыре агента для Apex, интерфейсов Salesforce, Flow и Visualforce. Выберите агента по типу задачи. ★ 41 430звёзд репо enterprise-integrator-architect Alysson Franklin Плагин enterprise-integrator-architect для Claude Code проектирует и реализует интеграции B2B-приложений с внешними корпоративными системами. Вызывается для настройки API, синхронизации данных и вебхуков сторонних сервисов. ★ 1 013звёзд репо crm-integration-wasp-drone Legion Code Inc. Субагент crm-integration-wasp-drone проектирует архитектуру интеграции с CRM, схему полей и двусторонний обмен данными. Помогает связать сервис с HubSpot, Salesforce, Attio или Pipedrive без потери записей. CX Codex ★ 96звёзд репо Salesforce mindstone Подключает ИИ-ассистента к CRM Salesforce для быстрого поиска организаций, ведения сделок и работы с лидами прямо из терминала. CX Codex +1 ★ 14звёзд репо crm-hygiene-check официальный anthropics Скилл crm-hygiene-check проверяет сделки в Salesforce или HubSpot на пустые поля, устаревшие даты и несоответствие стадии — выдаёт чек-лист правок. CX Codex +1 397установок

Из того же набора232

Весь набор →
service-omni-routing-flow-deploy Скилл service-omni-routing-flow-deploy для Claude Code развёртывает Flow маршрутизации Omni-Channel для Case или VoiceCall. По запросу настраивает маршрутизацию в очередь или по навыкам и проверяет результат. CX Codex +1 116установок dx-lifecycle-center Скилл dx-lifecycle-center для Claude Code и других платформ, который управляет соединениями с организациями Salesforce и разворачивает метаданные. Запускается при командах подключения сред или переноса компонентов. CX Codex +1 110установок service-omni-queue-routing-config-deploy Скилл service-omni-queue-routing-config-deploy для Claude Code создаёт или обновляет настройки маршрутизации очередей Omni-Channel в Salesforce. Запускается при настройке очереди для Case или Voice и при развёртывании QueueRoutingConfig. CX Codex +1 108установок platform-metadata-discovery-get Скилл platform-metadata-discovery-get для Claude Code выясняет, какие метаданные уже есть в Salesforce org. Он подключается перед изменением метаданных или написанием кода, который на них ссылается. CX Codex +1 107установок service-omni-queue-members-assign Скилл service-omni-queue-members-assign для Claude Code привязывает агентов к очередям Salesforce через Data API. Наполняет очереди Case и Voice участниками для распределения нагрузки в Omni-Channel. CX Codex +1 106установок service-omni-skills-based-routing-configure Скилл service-omni-skills-based-routing-configure для Claude Code связывает Omni Skill с активными пользователями агентов. Запускается при настройке маршрутизации Omni по навыкам. CX Codex +1 106установок service-omni-permission-set-assign Скилл service-omni-permission-set-assign для Claude Code назначает агентам наборы разрешений Omni. Запускается по просьбе выдать доступ к Omni-Channel или исправить назначения для виджета Omni. CX Codex +1 104установок service-omni-supervisor-config-deploy Скилл service-omni-supervisor-config-deploy для Claude Code разворачивает конфигурацию классического Omni-Channel Supervisor в Salesforce. Запускается по просьбе настроить Omni Supervisor или Supervisor Command Center. CX Codex +1 104установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой