agentforce-architectur…
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA…
Configure routing on a newly-inserted Enhanced `MessagingChannel` so activation will accept it. Given a `{CHANNEL_ID}`, walks through picking a routing type (Omni-Channel Queue, Omni-Flow, Agentforce Service Agent, Digital Worker, or direct User), locates or provisions the
Claude Code
$ npx -y skills add forcedotcom/sf-skills --skill service-de-channel-routing-configure --agent claude-code
Codex
$ npx skills add forcedotcom/sf-skills --skill service-de-channel-routing-configure -a codex -y
Cursor
$ npx skills add forcedotcom/sf-skills --skill service-de-channel-routing-configure -a cursor -y
Gemini CLI
$ npx skills add forcedotcom/sf-skills --skill service-de-channel-routing-configure -a gemini-cli -y
GitHub Copilot
$ npx skills add forcedotcom/sf-skills --skill service-de-channel-routing-configure -a github-copilot -y
OpenCode
$ npx skills add forcedotcom/sf-skills --skill service-de-channel-routing-configure -a opencode -y
Windsurf
$ npx skills add forcedotcom/sf-skills --skill service-de-channel-routing-configure -a windsurf -y
name: service-de-channel-routing-configure
description: "Configure routing on a newly-inserted Enhanced `MessagingChannel` so activation will accept it. Given a `{CHANNEL_ID}`, walks through picking a routing type (Omni-Channel Queue, Omni-Flow, Agentforce Service Agent, Digital Worker, or direct User), locates or provisions the target, then PATCHes `SessionHandlerId` (plus `FallbackQueueId` where required). Use between insertion and activation — activation fails server-side with `nullQueueId`/`LiveMessageSetupException` if no valid `SessionHandlerId` is set. Do not use for full end-to-end setup — use `service-de-headless-channel-configure`."
metadata:
version: "1.1"
minApiVersion: "67.0"
domains: ["Service"]
cliTools:
- tool: ["node"]
semver: ">=20.0.0"
- tool: ["python3"]
semver: ">=3.9"
- tool: ["sf"]
semver: ">=2.0.0"
relatedSkills:
- "service-de-channel-activate"
- "service-de-channel-create"
- "service-de-channel-settings-configure"
- "service-de-headless-channel-configure"Ensures a `MessagingChannel` has valid routing configured before activation. The channel's `SessionHandler` field is a **polymorphic foreign key** (verified against `MessagingChannel.entity.xml`, `domain="Queue, FlowDefinition, User, BotDefinition, AgenticCtxtDecorDefinition"`) — it names *who* the channel routes incoming sessions to. Some targets additionally require a `FallbackQueue` (an Omni-Channel Queue that catches sessions the primary target can't take).
These skills create **Enhanced** channels (`PlatformType=Enhanced`, SCRT2). All five SessionHandler domains are writable on Enhanced channels. (A Standard/SCRT1 channel would only accept a Flow as SessionHandler — the server rejects any other domain with "Only flows of type Omni-Channel are supported". These skills never create Standard channels, so that path isn't handled here.)
**Where this fits:** the channel is inserted by `service-de-channel-create` (or a per-type leaf); this skill sets routing; `service-de-channel-settings-configure` sets consent; then `service-de-channel-activate` flips it live — activation requires both routing and consent. The `service-de-headless-channel-configure` orchestrator runs all four in sequence.
Supported routing types — all set `SessionHandlerId`, some also set `FallbackQueueId`:
| Type | SessionHandler target | Id prefix | FallbackQueue | | --- | --- | --- | --- | | **Omni-Channel Queue** | `Group` (Type=Queue) | `00G` | must be **null** | | **Omni-Flow** | `FlowDefinition` (ProcessType=RoutingFlow) | `300` | **required** | | **Agentforce Service Agent (ASA)** | `BotDefinition` (Type=ExternalCopilot) | `0Xx` | **required** | | **Digital Worker** | `AgenticCtxtDecorDefinition` | `1iE` | **required** | | **User** | `User` (with a RoutingConfiguration) | `005` | must be **null** |
Provisioning behavior:
| Reference file | Load when | | --- | --- | | `references/queue-creation.md` | The user picked "create a new queue" on the Queue routing path — full Metadata API scaffold → deploy → ID lookup → optional member add. | | `references/target-locate.md` | You need the per-domain SOQL to locate and validate an eligible target (Queue, Flow, ASA, Digital Worker, User) and the FallbackQueue requirement matrix. | | `references/named-queue.md` | The caller supplied `{QUEUE}` (a queue the user named). | | `references/asa-routing.md` | The user picked ASA (Agentforce Service Agent) routing — precondition check, enumerating live ASAs, and selection. | | `references/gotchas.md` | Troubleshooting an unexpected result, or before modifying this skill — the known gotchas. | | `references/worked-examples.md` | You want a reference run of the reuse-existing-queue, create-new-queue, Flow, or ASA paths. |
One of:
**Success — no change needed:**
{"ok": true, "noop": true, "routingType": "queue|flow|asa|digital_worker|user", "sessionHandlerId": "00G...|300...|0Xx...|1iE...|005...", "fallbackQueueId": "00G...|null", "targetName": "...", "message": "Routing already configured"}**Success — Queue routing configured:**
{"ok": true, "routingType": "queue", "sessionHandlerId": "00G...", "fallbackQueueId": null, "queueName": "...", "queueDeveloperName": "...", "created": true|false}**Success — Flow routing configured:**
{"ok": true, "routingType": "flow", "sessionHandlerId": "300...", "fallbackQueueId": "00G...", "flowName": "...", "flowDeveThis repository provides Salesforce agent skills, plugins, and sample apps for building applications.
Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA…
Use this skill to Upgrade Einstein Bots into Agentforce agents end-to-end in a single pass, orchestrating per-bot Agent Spec…
Data Cloud 360° view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific…
Build, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates,…
Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM)…
Use to design an AI agent persona — identity, voice, tone, behavioral style, guardrails — and encode it into Agent Script (.agent…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.