--- name: service-helpagent-coordinate description: "Use to set up, configure, ground, or go live with a Salesforce Help Agent (an Agentforce Service Agent in Service Cloud) via a guided four-checkpoint flow. Use whenever a user says any of: set up / create / build / add a help agent, service agent, or support chat agent; add or embed a chat widget on a website or Experience Cloud / LWR site; put a help agent on a channel (web chat, voice, phone, help portal), even while rejecting web chat; ground a help agent on Salesforce Knowledge; or wants an AI to answer customer questions, manage support cases, and escalate to a human. The right skill even when the request names only one part, names a coming-soon channel this skill hard-stops on, or references help-agent-spec.md or the Agentforce Quick Setup wizard. DO NOT TRIGGER when authoring a brand-new agent with no Help Agent lineage (use agentforce-generate), configuring OAuth/ECAs (use integration-connectivity-connected-app-configure), or only deploying metadata (use platform-metadata-deploy)." allowed-tools: Bash Read Write Edit Glob Grep WebFetch AskUserQuestion TodoWrite metadata: version: "0.9" minApiVersion: "67.0" relatedSkills: - "agentforce-generate" - "dx-org-permission-set-assign" - "experience-lwr-site-generate" - "integration-connectivity-connected-app-configure" - "platform-metadata-deploy" - "service-digital-engagement-channel-configure" - "service-digital-engagement-deployment-configure" - "service-digital-engagement-messaging-site-integrate" cliTools: - tool: ["curl"] semver: ">=7.0.0" - tool: ["sf"] semver: ">=2.139.6" --- # service-helpagent-coordinate: Service Cloud Help Agent, guided setup Use this skill to stand up a **Service Cloud Help Agent** (an Agentforce Service Agent) on a Salesforce org from Claude Code, following the same guided flow as the Help Agent Quick Setup wizard. This is a **coordinate** skill: it orchestrates existing skills against a canonical spec — it does **not** author a new agent primitive. ## Why this skill exists Salesforce's official Help Agent template-creation API is not yet shipped. Without it, Claude has no built-in concept of "Help Agent" and would otherwise generate a generic agent. `assets/help-agent-spec.md` substitutes for the missing API: its agent script is the canonical template the eventual Quick Start UI will produce. Treat the spec as source of truth for the agent's lineage (topics, actions, instructions). ## Scope **In scope:** - Guided, four-checkpoint Help Agent setup (identity → grounding → channel → go-live) - Knowledge grounding via Agentforce Data Library (ADL) - Web Chat / Help Portal channel setup and Experience Cloud site embed - Readiness checks (licenses, Einstein Agent User, Data Cloud permission sets) **Out of scope — delegate elsewhere:** - OAuth / External Client App setup → [integration-connectivity-connected-app-configure](../integration-connectivity-connected-app-configure/SKILL.md) - Raw agent authoring with no Help Agent lineage → `agentforce-generate` - Metadata deploy/retrieve → `platform-metadata-deploy` ## Prerequisites - Claude Code + Salesforce CLI installed and an authenticated org (see repo `README.md`) - MCP servers registered: `salesforce-api-context`, `metadata-experts`, `sobject-reads` - Salesforce Skills installed into `.agents/skills/` (or `.claude/skills/`) - **A Salesforce org with the required features enabled (or enable-able via metadata):** Agentforce, Einstein Generative AI, Knowledge, Experience Cloud, and Data Cloud. Any org shape that meets this bar works — production, sandbox, scratch, or Developer Edition. The readiness check in `assets/help-agent-spec.md` §4.0 detects each feature and enables what can be enabled; it stops with a clear message if a required capability is missing and cannot be turned on. ## Skills this coordinates The spec feeds these existing skills — do **not** author a new Help Agent skill: | Skill | Role | |---|---| | `agentforce-generate` | Agent authoring + ADL provisioning/grounding (see its `references/data-library-reference.md`, `references/org-setup-for-adl.md`) | | `dx-org-permission-set-assign` | Data Cloud permission-set assignment | | `service-digital-engagement-channel-configure` | Messaging channel setup (uses `sessionHandlerAsa` for AgentforceServiceAgent routing — see `references/channel-web-chat.md`) | | `service-digital-engagement-deployment-configure` | Embedded Service Deployment (targets `SiteType = 'ChatterNetworkPicasso'` sites — Aura won't work) | | `experience-lwr-site-generate` | Experience Cloud (LWR) site — used when the org has no Live LWR site yet | | `service-digital-engagement-messaging-site-integrate` | Widget placement + embed (Checkpoint 3.5 / 4) | ## Workflow Read `assets/help-agent-spec.md` first — it is the authoritative flow and is intentionally kept small. **Do not pre-load the rest.** The heavy or conditional material is split into `references/` and read only when the flow reaches it (progressive disclosure — this is deliberate, to keep token usage low): - **`references/agent-script.md`** — the ~500-line canonical agent script + placeholder list. Load it **only when you are ready to create the agent, after Checkpoint 2** — not during Checkpoints 1, 3, or 4. - **`references/channel-web-chat.md`** — Web Chat provisioning detail. Load **only if the user picks Web Chat** at Checkpoint 3. - **`references/channel-help-portal.md`** / **`references/channel-voice.md`** — coming-soon channel hard-stops. Load only if the user picks that channel. Read the one channel file that matches the user's selection — never all three. Then run the interactive setup **without one-shotting**: walk the user through four checkpoints in order, waiting for a reply at each. ### Readiness check (silent, MANDATORY, do not reorder) Order is load-bearing — running step 3 before step 2 fails with `PermissionSet not found: GenieUserEnhancedSecurity` because the Data Cloud permission sets do not exist in the org until Data Cloud itself is turned on: 1. Verify licenses + Einstein Agent User. 2. **Enable Data Cloud** — must complete before step 3 (permission sets don't exist until Data Cloud is on). If Data Cloud is not yet provisioned, offer the user the choice up front — enable and come back later, or wait through it now. 3. **CRITICAL — Assign the Data Cloud permission sets immediately after enablement.** Non-negotiable — skipping it ships an agent whose grounding returns empty `knowledgeSummary` at runtime even though ADL indexing reports SUCCESS. Also verify the `SvcCopilotTmpl` and `EmployeeCopilot` namespaces are present. These are Salesforce out-of-the-box platform artifacts surfaced by `enableEinsteinGptPlatform: true` — not AppExchange managed packages — and will not appear in `sf package installed list`. Probe the namespace directly (e.g. `SELECT DeveloperName FROM Flow WHERE NamespacePrefix = 'SvcCopilotTmpl' LIMIT 1`). ### Recognizing where the user is entering Do not assume every run starts at Checkpoint 1. Read the opening prompt and enter at the right checkpoint: if identity is already decided, start at Checkpoint 2 (grounding); if grounding is already in place, start at Checkpoint 3 (channel). Never restart at Checkpoint 1 or re-ask decisions the user already stated. If the opening prompt names **Voice / phone / telephony / IVR / Amazon Connect**, asks to "reach" or "contact" the agent "by phone" / "by call", or asks for it "as a Voice channel" (even phrased as a rejection of web chat), or **Help Portal** as the channel, take the coming-soon hard stop immediately: respond verbatim *"This feature is coming soon, please select Web Chat."* and re-present the channel options — do not run the checkpoints or write any Voice/Help-Portal plan. ### Checkpoint 1 — Meet Your Agent Agent name, language, greeting, tone. Offer defaults. ### Checkpoint 2 — Give Your Agent Context (grounding) Ask which knowledge source (Salesforce Knowledge / files / website sync). Grounding is **provisioning an Agentforce Data Library**, not designing a search — the agent's `knowledge:` block does the retrieval at runtime. This checkpoint MUST produce all five of: 1. **Delegate provisioning to `agentforce-generate`** — it owns ADL create/index/publish. Do not hand-roll data-library metadata. 2. **A dedicated, named library** — create `Help_Agent_Knowledge`. **Never wire the stock `All_Records_and_Fields_Default`** (it sits in `NOT_SCHEDULED` on trial or preloaded sample-data orgs and returns empty `knowledgeSummary` with no error). 3. **Category selection** — for Salesforce Knowledge, query the org's Data Category Groups and ask which categories to ground on. Do not assume "all." 4. **Wait-for-indexing gate** — poll and only proceed once `indexingStatus.status ∈ {COMPLETED, READY, SUCCESS}`. `NOT_SCHEDULED` is not success. 5. **Capture the `rag_feature_config_id`** (format `ARFPC_`) and wire it into the agent script's `knowledge:` block — never hardcode. **Anti-rule:** never respond to a grounding request by designing a SOQL/SOSL/GraphQL/Apex search over Knowledge articles. Grounding is ADL provisioning; retrieval is the agent's job at runtime. ### Checkpoint 3 — Add to Channels Web Chat / Help Portal / Voice. Create messaging channel + Embedded Service Deployment; locate the target site via a **query-first pattern**: ```sql SELECT Id, Name, UrlPathPrefix, SiteType, Status FROM Site WHERE SiteType = 'ChatterNetworkPicasso' AND Status = 'Live' ``` Only ever present or target `ChatterNetworkPicasso` (LWR) sites — never Aura (`ChatterNetwork`). Resolve the site **in the same turn**, do not defer: - **Zero Live LWR sites** → create one via `experience-lwr-site-generate` (recommend the Help Center template). - **Exactly one** → confirm it with the user before using (an existing site may serve a different audience); do not silently adopt it. - **Multiple** → in the SAME turn, show the executed SOQL, enumerate the results as a table (`Name | UrlPathPrefix | Id`), state plainly "no site is created or modified until you choose," then ask which one to target (include a "create a new site instead" option). Do not answer "I'll query and get back to you" — run the query and present results now. Do not filter by hardcoded name or URL path prefix — the correct site depends on the customer's org. **Coming-soon channels are hard stops.** If the user selects **Help Portal** or **Voice**, respond verbatim *"This feature is coming soon, please select Web Chat."*, re-present the channel options, and wait. Never write a provisioning plan, phone number, portal site, or "planning-only" scaffold for these channels — even adjacent objects produce broken half-configurations. See `references/channel-voice.md` / `references/channel-help-portal.md`. ### Checkpoint 3.5 — Silent pre-flight (INTERNAL — never announce) Run silently; surface output only on failure. Every check must pass before Checkpoint 4: 1. Data Cloud access in place for running user **and** Einstein Agent User (defer to `agentforce-generate`). 2. ADL is Activated **and** grounded — run a canary retrieval with the captured `rag_feature_config_id`; if empty despite SUCCESS, surface the **Known manual step** (Data Space scope on the permission set) verbatim, wait for confirmation, re-run. 3. Messaging channel is **Active** (assert status; activation is `service-digital-engagement-channel-configure`'s job, not the site-integrate skill's), **and** the widget is actually placed — independently re-read the deployed guest-layout JSON for the `experience_messaging:embeddedMessaging` node rather than trusting the site-integrate skill's 200-only signal; inject if missing. ### Checkpoint 4 — Review & Go Live Embed (LWR + Aura), then complete four explicit go-live steps: (a) wire the **Escalation Flow** to the agent (reuse `Help_Agent_Escalation_Flow` if it already exists — do not create a duplicate); (b) confirm the **Messaging Channel is Active** in Setup → Messaging Settings; (c) **Publish the Embedded Service Deployment** in Setup → Embedded Service Deployments; (d) offer to test together. An unpublished deployment or an inactive channel silently ships a dead widget. ## Rules / Constraints | Rule | Rationale | |---|---| | Never one-shot the setup | It is a guided conversation; wait for user input at each checkpoint | | Never skip or reorder the readiness steps | Permission sets don't exist before Data Cloud enablement — you'll see `PermissionSet not found: GenieUserEnhancedSecurity` | | Never advance past 3.5 with empty ADL retrieval | Ships a silently-broken agent | | Never hardcode a site name or URL path prefix | The correct target LWR site depends on the customer's org — query first, then decide | | Never assume `SvcCopilotTmpl` / `EmployeeCopilot` are packages | They are OOB namespaces surfaced by `enableEinsteinGptPlatform`; probe the namespace directly | | Never wire an Embedded Service Deployment to an Aura (`ChatterNetwork`) site | It must target `ChatterNetworkPicasso` (LWR) or the widget will fail silently | | Create the Embedded Service Deployment as V2 via the Connect API, never bare Metadata deploy — and embed the V2 ESD via the `experience_messaging:embeddedMessaging` LWR component | Metadata API defaults to legacy V1 (`WebV1`, *"Web (v1)"* in Setup) which breaks Enhanced Web Chat; create via Connect API on v67.0+ with `clientVersion: WebV2`. The customer widget mounts via the LWR component keyed on `deploymentName` (not a bootstrap `