@salesforce/afv-skills 1.40.0 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/package.json +1 -1
  2. package/skills/automation-flow-generate/SKILL.md +32 -43
  3. package/skills/experience-portal-create/SKILL.md +497 -0
  4. package/skills/experience-portal-create/assets/report-template.md +30 -0
  5. package/skills/experience-portal-create/references/mcp-invocation.md +288 -0
  6. package/skills/experience-portal-create/references/post-creation-activate-publish.md +165 -0
  7. package/skills/experience-portal-create/references/templates.md +253 -0
  8. package/skills/experience-ui-bundle-features-generate/SKILL.md +5 -1
  9. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -0
  10. package/skills/experience-ui-bundle-frontend-generate/references/page.md +1 -0
  11. package/skills/platform-datamask-run/SKILL.md +345 -0
  12. package/skills/platform-datamask-run/references/api-surface.md +130 -0
  13. package/skills/platform-datamask-run/references/policy-authoring.md +185 -0
  14. package/skills/platform-datamask-run/references/run-and-abort.md +116 -0
  15. package/skills/platform-datamask-run/scripts/poll-job.sh +115 -0
  16. package/skills/platform-dataspace-access-configure/SKILL.md +51 -3
  17. package/skills/platform-dataspace-access-configure/scripts/inspect-dataspace-scopes.sh +56 -0
  18. package/skills/platform-lightning-type-widget-coordinate/references/build-plan-format.md +1 -0
  19. package/skills/platform-sandbox-configure/SKILL.md +17 -2
  20. package/skills/platform-trial-org-create/SKILL.md +175 -0
  21. package/skills/platform-trial-org-create/examples/create_request.json +9 -0
  22. package/skills/platform-trial-org-create/examples/error_response.json +41 -0
  23. package/skills/platform-trial-org-create/examples/success_response.json +27 -0
  24. package/skills/platform-trial-org-create/references/error_codes.md +42 -0
  25. package/skills/platform-trial-org-create/references/signup_request_fields.md +69 -0
  26. package/skills/platform-trial-org-create/scripts/create_signup_request.sh +175 -0
  27. package/skills/platform-trial-org-create/scripts/get_signup_request.sh +155 -0
  28. package/skills/platform-widget-generate/SKILL.md +47 -6
  29. package/skills/platform-widget-generate/examples/conditional.json +3 -3
  30. package/skills/platform-widget-generate/examples/list-with-foreach.json +2 -2
  31. package/skills/platform-widget-generate/examples/single-object.json +2 -2
  32. package/skills/platform-widget-generate/references/widget-bundle-layout.md +1 -1
  33. package/skills/service-agentforce-channel-configure/SKILL.md +271 -0
  34. package/skills/service-agentforce-channel-configure/references/agent-wiring.md +97 -0
  35. package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +145 -0
  36. package/skills/service-agentforce-channel-configure/references/channel-branch-voice.md +69 -0
  37. package/skills/service-agentforce-channel-configure/references/channel-types.md +61 -0
  38. package/skills/service-agentforce-channel-configure/references/live-traffic-gate.md +86 -0
  39. package/skills/service-agentforce-channel-configure/references/queue-resolution.md +135 -0
  40. package/skills/service-agentforce-channel-configure/references/routing-flow.md +384 -0
  41. package/skills/service-catalog-template-deploy/SKILL.md +310 -0
  42. package/skills/service-catalog-template-deploy/references/cli-invocation.md +258 -0
  43. package/skills/service-catalog-template-deploy/scripts/activate-verify.mjs +164 -0
  44. package/skills/service-catalog-template-deploy/scripts/build-deploy-payload.mjs +94 -0
  45. package/skills/service-catalog-template-deploy/scripts/resolve-template.mjs +331 -0
  46. package/skills/service-catalog-template-search/SKILL.md +212 -0
  47. package/skills/service-catalog-template-search/references/cli-invocation.md +128 -0
  48. package/skills/service-catalog-template-search/scripts/classify-catalog.mjs +205 -0
  49. package/skills/service-concierge-portal-generate/SKILL.md +126 -0
  50. package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1428 -0
  51. package/skills/service-digital-engagement-channel-configure/SKILL.md +46 -6
  52. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +2 -1
  53. package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +4 -1
  54. package/skills/service-helpagent-coordinate/README.md +8 -2
  55. package/skills/service-helpagent-coordinate/SKILL.md +126 -130
  56. package/skills/service-helpagent-coordinate/assets/help-agent-spec.md +70 -53
  57. package/skills/service-helpagent-coordinate/references/agent-script.md +571 -457
  58. package/skills/service-helpagent-coordinate/references/channel-voice.md +38 -9
  59. package/skills/service-helpagent-coordinate/references/channel-web-chat.md +173 -49
  60. package/skills/service-helpagent-coordinate/references/output-report-format.md +126 -0
  61. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +153 -0
  62. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +79 -0
  63. package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +35 -0
  64. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +271 -0
  65. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/references/cli-invocation.md +265 -0
  66. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/classify-enable-plan.mjs +220 -0
  67. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/classify-final-report.mjs +102 -0
  68. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/record-enable-result.mjs +73 -0
  69. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +206 -0
  70. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/references/cli-invocation.md +194 -0
  71. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/scripts/classify-readiness.mjs +223 -0
  72. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +45 -7
  73. package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +45 -5
  74. package/skills/service-itsm-agentic-setup-configure/SKILL.md +116 -0
  75. package/skills/service-itsm-agentic-setup-configure/examples/output-templates.md +64 -0
  76. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +158 -0
  77. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/cli-invocation.md +361 -0
  78. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/error-taxonomy.md +44 -0
  79. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/reactivation.md +66 -0
  80. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +66 -0
  81. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/specialized-templates.md +148 -0
  82. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +169 -0
  83. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/build-create-body.mjs +116 -0
  84. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-agent-existence.mjs +185 -0
  85. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-preflight.mjs +168 -0
  86. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/create-scratch-dir.mjs +58 -0
  87. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +197 -0
  88. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +186 -0
  89. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/action-availability.md +51 -0
  90. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/cli-invocation.md +345 -0
  91. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/error-taxonomy.md +44 -0
  92. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/reactivation.md +63 -0
  93. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +44 -0
  94. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +149 -0
  95. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/build-create-body.mjs +110 -0
  96. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-action-availability.mjs +201 -0
  97. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-activate-result.mjs +135 -0
  98. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-agent-existence.mjs +194 -0
  99. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-preflight.mjs +158 -0
  100. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/create-scratch-dir.mjs +58 -0
  101. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +191 -0
  102. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +133 -0
  103. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +71 -0
  104. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +308 -0
  105. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +23 -0
  106. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +193 -0
  107. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +57 -0
  108. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +394 -0
  109. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +266 -0
  110. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/cli-invocation.md +106 -0
  111. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/helper-contracts.md +142 -0
  112. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/permset-topology.md +82 -0
  113. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-action-surface.mjs +137 -0
  114. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-assignment-state.mjs +99 -0
  115. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-permset-availability.mjs +120 -0
  116. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/resolve-target-user.mjs +86 -0
  117. package/skills/service-itsm-agentic-setup-uel-user-create/SKILL.md +284 -0
  118. package/skills/service-itsm-agentic-setup-uel-user-create/references/mcp-invocation.md +302 -0
  119. package/skills/service-itsm-channels-coordinate/SKILL.md +472 -0
  120. package/skills/service-itsm-incident-mgmt-configure/SKILL.md +212 -0
  121. package/skills/service-itsm-incident-mgmt-configure/references/mcp-invocation.md +225 -0
  122. package/skills/service-itsm-incident-priority-configure/SKILL.md +53 -12
  123. package/skills/service-itsm-swarming-configure/SKILL.md +212 -0
  124. package/skills/service-itsm-teams-configure/SKILL.md +395 -0
  125. package/skills/service-itsm-teams-configure/references/azure-credential-population.md +213 -0
  126. package/skills/service-itsm-teams-configure/references/gotchas.md +23 -0
  127. package/skills/service-itsm-teams-coordinate/SKILL.md +175 -0
  128. package/skills/service-itsm-teams-coordinate/examples/output-templates.md +85 -0
  129. package/skills/service-itsm-teams-debug/SKILL.md +144 -0
  130. package/skills/service-itsm-teams-debug/references/configuration-checklists.md +277 -0
  131. package/skills/service-itsm-teams-debug/references/report-generation.md +95 -0
  132. package/skills/service-itsm-teams-employee-agent-configure/SKILL.md +139 -0
  133. package/skills/service-itsm-teams-employee-agent-configure/assets/Teams_AgentForce.EmbeddedServiceConfig-meta.xml +43 -0
  134. package/skills/service-itsm-teams-employee-agent-configure/references/teams-embedded-employee-agent.md +480 -0
  135. package/skills/service-itsm-teams-itdesk-configure/SKILL.md +232 -0
  136. package/skills/service-itsm-teams-itservice-configure/SKILL.md +391 -0
@@ -1,17 +1,46 @@
1
- # Channel branch — Voice *(Coming soon)*
1
+ # Channel branch — Voice
2
2
 
3
- > **When to read this file.** Load it only if the user selected **Voice** at Checkpoint 3.
3
+ > **When to read this file.** Load it only when the user has selected **Voice** at Checkpoint 3 of `assets/help-agent-spec.md`. If they selected Web Chat, read `channel-web-chat.md` instead. If they selected Help Portal, delegate to the sibling skill `service-concierge-portal-generate` — do not inline portal steps here.
4
4
 
5
- ## Coming-soon channel — do not build supporting metadata
5
+ Voice wires the Help Agent to an existing `PstnVoice` MessagingChannel via an inbound RoutingFlow. It does **not** provision a new phone number — number acquisition puts the org in a state that isn't cleanly retrievable, so it's out of scope for this skill. If the user has no `PstnVoice` channel yet, tell them to provision the number in Setup (Service Cloud Voice / Number Management) first, then come back.
6
6
 
7
- Voice is **not yet supported** as a first-class channel. Do not provision a phone number, stand up routing, configure Amazon Connect, or create adjacent objects "toward" the feature — that produces broken half-configurations. **Do not write a Voice setup plan, a "here's what I would do" outline, or a "planning-only" scaffold either** — describing the steps is still treating a coming-soon channel as a build target. The only correct output for a Voice selection is the verbatim hard-stop message below, followed by re-presenting the channel options. The channel-selection step treats Voice as a coming-soon option alongside Help Portal; the safe response is to steer the user to Web Chat:
7
+ ---
8
8
 
9
- > *"This feature is coming soon, please select Web Chat."*
9
+ ## Existing number path
10
10
 
11
- ## If the user insists on an existing number
11
+ Query existing channels:
12
12
 
13
- If the user provides an **existing** phone number and asks you to wire it up, you may attempt it — but exit gracefully the moment the APIs aren't there:
13
+ ```bash
14
+ sf data query --target-org $ORG --json \
15
+ --query "SELECT Id, DeveloperName, MasterLabel, MessagingPlatformKey, IsActive FROM MessagingChannel WHERE MessageType='PstnVoice' ORDER BY MasterLabel"
16
+ ```
14
17
 
15
- - If the org's APIs to procure or attach a phone number are not available, **gracefully exit this branch.** Say something like: *"I can't set up Voice automatically in this org right now, so I'll skip it. You can add Voice later from Setup."* — then continue with any other selected channels.
18
+ If none are returned, stop and tell the user to provision a phone number and `PstnVoice` MessagingChannel in Setup first — this skill does not create one.
16
19
 
17
- Do not abort the whole setup over Voice. If Voice was one of several selected channels, report the skip plainly and proceed with the others.
20
+ If any are returned, present them and let the user choose. Capture the channel's `DeveloperName` as `CHANNEL_DEV_NAME`, then continue to **Step 8 — Wire the channel to the agent**. Fallback queue resolution (including the `SobjectType='VoiceCall'` requirement) is owned by `service-agentforce-channel-configure` — do not resolve or create the queue here.
21
+
22
+ ---
23
+
24
+ ## Step 8 — Wire the channel to the agent
25
+
26
+ Delegate to `service-agentforce-channel-configure` Branch B. Pass:
27
+ - **Agent DeveloperName** — the Help Agent
28
+ - **Channel type** — Voice
29
+ - **Channel identifier** — `CHANNEL_DEV_NAME`
30
+
31
+ The delegated skill resolves and configures the fallback queue itself.
32
+
33
+ ---
34
+
35
+ ## Step 9 — Loop
36
+
37
+ Return to the Checkpoint 3 loop — offer the user the option to add another channel or proceed to go-live.
38
+
39
+ ---
40
+
41
+ ## Rules / constraints
42
+
43
+ | Rule | Rationale |
44
+ |---|---|
45
+ | This skill never acquires a phone number | Provisioning puts the org in a state that isn't cleanly retrievable — must be done in Setup before this skill runs |
46
+ | Never resolve or create the fallback queue here | `service-agentforce-channel-configure` owns queue resolution end to end — resolving it twice can double-prompt the user |
@@ -1,6 +1,6 @@
1
1
  # Channel branch — Web Chat
2
2
 
3
- > **When to read this file.** Load it only when the user has selected **Web Chat** at Checkpoint 3. If they selected Help Portal or Voice, read the matching `channel-help-portal.md` / `channel-voice.md` instead. You do not need all three channel files in context at once — read only the branch the user chose.
3
+ > **When to read this file.** Load it only when the user has selected **Web Chat** at Checkpoint 3. If they selected Voice, read `channel-voice.md` instead. If they selected Help Portal, delegate to the sibling skill `service-concierge-portal-generate` — do not inline portal steps here. You do not need every channel file in context at once — read only the branch the user chose.
4
4
 
5
5
  Web Chat embeds a chat widget on a website. This branch provisions a messaging channel + omni-channel routing, a new Embedded Service Deployment (`Help Chat`), and a prepared LWR Experience Cloud site. The agent script does **not** change here — this is channel/site metadata around the agent.
6
6
 
@@ -10,6 +10,11 @@ Ask the user for **the domain** where the widget will live (e.g. `support.acme.c
10
10
 
11
11
  ## Step B — CRITICAL, DO NOT SKIP: ask who will be chatting
12
12
 
13
+ **Step B checklist (do all three, in order):**
14
+ 1. **Audience** — ask (or infer from the prompt) who will chat: `Public / anonymous`, `Both anonymous and authenticated (default)`, or `Authenticated only`.
15
+ 2. **`authMode`** — map audience → `authMode`: anonymous or mixed → `UnAuth`; authenticated-only → `Auth`. Name the chosen value explicitly in the settled-facts report as a bare value (`authMode: UnAuth`).
16
+ 3. **Post-deploy assertion** — after the channel is deployed in Step C, re-fetch the MessagingChannel and assert `embeddedConfig.authMode` matches the chosen value; if it doesn't, surface the discrepancy and stop the Web Chat branch. Always run this assertion.
17
+
13
18
  This determines the MessagingChannel's `embeddedConfig.authMode`, which is set when the channel is deployed in Step C below. Choosing wrong silently breaks the deployment: the widget refuses to render on the Setup → ESD → "Test Enhanced Web Chat" page and for any anonymous visitor on the live site, with no error surfaced to the user. This is the single highest-risk decision in the Web Chat branch — previous runs defaulted to `Auth` and shipped a non-functional deployment that took manual debugging to discover. Ask explicitly and confirm the answer back to the user before proceeding.
14
19
 
15
20
  Present three options:
@@ -17,59 +22,178 @@ Present three options:
17
22
  2. **Both anonymous and authenticated visitors** *(default — recommended for any customer-facing portal)* → `authMode = UnAuth`. Despite the name, `UnAuth` *allows* both: guests chat anonymously, and signed-in users can upgrade the session by passing an `identityToken` at runtime.
18
23
  3. **Authenticated visitors only** (no guests) → `authMode = Auth`. **Warn the user verbatim:** *"This requires your host app to mint a verified-user JWT for every visitor. The Setup → ESD → 'Test Enhanced Web Chat' button will not work because it loads the widget as a guest, and anonymous visitors on your Experience site will fail to load the chat. Pick this only if you have JWT issuance in place."*
19
24
 
20
- Default to option 2 if the user is unsure. Never silently pick `Auth`. After the channel is deployed in Step C, fetch the MessagingChannel back and assert `embeddedConfig.authMode` matches the chosen value; if it doesn't, surface the discrepancy and stop the Web Chat branch. Always run the post-deploy re-fetch assertion. **The final `report.md` names the chosen `authMode` as a bare value (`authMode: UnAuth`) — do not narrate the rationale or the assertion in the report.** Never emit a legacy `esw.min.js` / Live Agent V1 bootstrap snippet — the V2 widget mounts via the `experience_messaging:embeddedMessaging` LWR component (Step C.3, Checkpoint 3.5 Check 3b).
25
+ Default to option 2 if the user is unsure. Never silently pick `Auth`. Never emit a legacy `esw.min.js` / Live Agent V1 bootstrap snippet — the V2 widget mounts via the `experience_messaging:embeddedMessaging` LWR component (Step C.3, Checkpoint 3.5 Check 3b).
21
26
 
22
27
  ## Step C — Provision (in order)
23
28
 
24
- 1. Deploy the messaging channel + omni-channel routing (`service-digital-engagement-channel-configure`, channel deploys INACTIVE). **Set `embeddedConfig.authMode` from the choice in Step B.** For `UnAuth`, also set `anonymousUserJwtExpirationTime` (e.g. `360`). For `Auth`, set `verifiedUserJwtExpirationTime` (e.g. `60`).
25
- > **Note on the ASA routing field.** The MessagingChannel field that binds an AgentforceServiceAgent as the session handler is `sessionHandlerAsa` — **not** `sessionHandlerFlow`. If you see `sessionHandlerFlow` in an older template or reference, that's for Flow-backed routing, not agent-backed. `service-digital-engagement-channel-configure` should set `sessionHandlerAsa` when the channel's routing type is `AgentforceServiceAgent`; verify this in the deployed channel before continuing.
26
- 2. Activate the MessagingChannel after the agent is Active (and re-verify at Checkpoint 4 — see step 4 below).
27
- 3. **Create a NEW Embedded Service Deployment named `Help Chat`** (DeveloperName `HelpChat`, MasterLabel `Help Chat`) bound to the user's domain (`service-digital-engagement-deployment-configure`). **Do NOT re-point or re-use any existing ESD from a prior deployment** — the Experience Builder dropdown must show `Help Chat` as a distinct option that the user can select when dragging the Embedded Messaging component onto the page. If creating the ESD requires a Connect API endpoint that's not available in this org, surface the gap to the user and stop the Web Chat branch — do not silently fall back to mutating an existing deployment.
28
-
29
- > **MANDATORY: Create as V2 (`WebV2`) via the Connect API — never via bare Metadata deploy.** The Metadata API path for `EmbeddedServiceConfig` defaults to legacy V1 (Live Agent-shaped), which shows up in the Setup UI as *"Web (v1)"* with a *"Switch to V2"* button and **does not work with Enhanced Web Chat / MIAW / Agentforce Service Agent routing**. Enhanced Web Chat requires V2. Use the Connect API on API v67.0+ (older versions return 404 for this endpoint):
30
- >
31
- > ```http
32
- > POST /services/data/v67.0/connect/embeddedmessaging/deployment/setup
33
- > {
34
- > "name": "HelpChat",
35
- > "masterLabel": "Help Chat",
36
- > "deploymentType": "Web",
37
- > "clientVersion": "WebV2",
38
- > "hostDomain": "<the domain from Step A, e.g. support.acme.com>",
39
- > "messagingChannelId": "<18-char MessagingChannel record Id from Step C.1>"
40
- > }
41
- > ```
42
- >
43
- > **CRITICAL — `messagingChannelId` is REQUIRED and is the single most common cause of an ESD that won't publish.** The `deployment/setup` call only publishes when a messaging channel is bound to it. Omit `messagingChannelId` and the ESD is created but stays **unpublished** — the Setup UI shows the deployment with *Published on:* / *Version:* **empty** and a red banner *"Select a Messaging Channel and then try publishing again."* on the Publish button. This is not fixable by clicking Publish in the UI (there is no channel to select on a V2 deployment there); it must be bound at creation time. Because Step C.1 creates the channel first (INACTIVE), its record Id is already available here — query it and pass it:
44
- > ```bash
45
- > sf data query --query "SELECT Id FROM MessagingChannel WHERE DeveloperName = 'HelpChat'" --target-org <alias>
46
- > ```
47
- > Also pass `hostDomain` (the domain from Step A) — it ties the widget's security key to that domain.
48
- >
49
- > **With the channel bound, the successful response includes `"isPublishSuccess": true` — the ESD is created *and* published in a single call.** There is no separate "publish" step to run afterwards. `EmbeddedServiceConfigPub` (the internal published-snapshot sObject) is not exposed via REST/Tooling/Metadata/Apex, so there is no other supported API to trigger publish; do not attempt bare `sf project deploy start -m EmbeddedServiceConfig:HelpChat` and expect it to publish (it deploys the config but leaves *Published on:* / *Version:* empty, which reads as unpublished in the Setup UI even though `IsEnabled=true`). **If the response comes back with `"isPublishSuccess": false` or the UI shows the "Select a Messaging Channel" banner, the channel was not bound — delete the ESD and recreate with `messagingChannelId` in the body.**
50
- >
51
- > If a legacy V1 `HelpChat` ESD already exists (e.g. from a prior run before this fix), **delete it first** (`sf project delete source -m EmbeddedServiceConfig:HelpChat`), then recreate via the Connect API path above — the V1→V2 in-place upgrade is a UI-only "Switch to V2" button that has no supported API equivalent, so recreation is the reliable path.
52
-
53
- > **Note on the auto-generated `<site>` field on the ESD itself.** The Connect API `deployment/setup` call auto-generates an internal site (two rows in `Site`, e.g. `ESW_HelpChat_<timestamp>` and `ESW_HelpChat_<timestamp>1`) for the ESD's own endpoint. Attempting to overwrite the site field via a Metadata deploy fails with an immutable-field error — the ESD's own site cannot be re-pointed. The ESD's endpoint URL (`https://<myDomainStem>.my.site.com/<UrlPathPrefix>`, where `<UrlPathPrefix>` is the row **without** the `vforcesite` suffix) IS the value the V2 LWR component takes as `siteEndpoint` — capture it from `SELECT Name, UrlPathPrefix FROM Site WHERE Name LIKE 'ESW_<EsdDeveloperName>%'` and hand it to Checkpoint 3.5 Check 3(b). **The customer-facing widget on the LWR site is embedded via the `experience_messaging:embeddedMessaging` LWR component in `homeGuestLayout.json` (+ `homeAuthenticated.json` if needed), with a six-attribute `componentAttributes` payload built around `deploymentName: "<EsdDeveloperName>"` and `clientVersion: "WebV2"`.** Do not embed via a bootstrap `<script>` in `mainAppPage.json` `headMarkup`; the correct key is `deploymentName` (not `configurationName`, which is stripped on deploy), and the six-attribute V2 shape round-trips cleanly through metadata deploy/retrieve. See Checkpoint 3.5 Check 3(b) for the full shape and end-to-end path.
54
-
55
- > **Note on patching an existing V2 ESD (guest access, branding, etc.).** Do NOT use the Metadata API to patch an existing V2 ESD — even a no-op deploy that passes the current `site` value unchanged fails with an immutable-field error. Use the **Tooling API** instead: `PATCH /services/data/v67.0/tooling/sobjects/EmbeddedServiceConfig/<id>` with a `{"Metadata": {...}}` body. GET the current `Metadata` object first and include **every** field on the PATCH — omitting `clientVersion`, `branding`, `masterLabel`, or `deploymentType` nulls them out. Successful PATCH returns HTTP 204. Common use cases: setting `areGuestUsersAllowed: true` for a public-visitor site, updating `branding` to point at a customized BrandingSet, or toggling `isTermsAndConditionsEnabled`.
56
-
57
- > **Verifying V2 published state after creation.**
58
- > - **In the UI:** open Setup → Embedded Service Deployments → **Help Chat**. The title should read *"Embedded Service Deployment Settings - Web"* with **no `(v1)` suffix** and **no "Switch to V2" button**. The top-right should show *"Published on: {date}"* and *"Version: 1"* (not empty).
59
- > - **Via API:** query the ESD and confirm the underlying metadata has `clientVersion: WebV2`. If `Published on:` is empty in the UI or the response shows `WebV1`, the Connect API path was not taken — delete and recreate.
60
- 4. Locate an existing LWR Experience Cloud site (or create one) and prepare it for the user to drop the widget on in Checkpoint 4. **Query-first pattern — do not hardcode a site name:**
61
- ```sql
62
- SELECT Id, Name, UrlPathPrefix, SiteType, Status
63
- FROM Site
64
- WHERE SiteType = 'ChatterNetworkPicasso'
65
- AND Status = 'Live'
29
+ ### C.0 — Resolve escalation queue
30
+
31
+ Run immediately after Step B (before any deploy), once the channel type is known.
32
+
33
+ **Query existing queues that already support the relevant SobjectType for this channel:**
34
+
35
+ | Channel | SobjectType |
36
+ |---|---|
37
+ | Web Chat / Help Portal / WhatsApp / SMS / Messaging | `MessagingSession` |
38
+ | Voice / Phone | `VoiceCall` |
39
+ | Email / Case | `Case` |
40
+
41
+ ```bash
42
+ sf data query --target-org $ORG --json \
43
+ --query "SELECT Queue.Name, Queue.DeveloperName, Queue.Id
44
+ FROM QueueSobject
45
+ WHERE SobjectType='MessagingSession'"
46
+ ```
47
+
48
+ Branch via `AskUserQuestion`:
49
+ - **One or more queues found** → present each as an option (`{Name} ({DeveloperName})`), plus a final option *"Create a new queue for this agent"*. If the user picks an existing queue, capture its `DeveloperName` and skip queue-creation below.
50
+ - **Zero queues found** → inform the user no compatible queue exists and proceed to create one.
51
+
52
+ **If creating a new queue:**
53
+
54
+ 1. Name: `{AgentLabel} Queue`, DeveloperName: `{AgentDevName}_Queue`
55
+ 2. Create the `Group` record:
56
+ ```bash
57
+ QUEUE_ID=$(sf data create record --target-org $ORG \
58
+ --sobject Group \
59
+ --values "Type='Queue' Name='{AgentLabel} Queue' DeveloperName='{AgentDevName}_Queue'" \
60
+ --json | python3 -c "import sys,json; print(json.load(sys.stdin)['result']['id'])")
61
+ ```
62
+ 3. Grant the queue access to `MessagingSession`:
63
+ ```bash
64
+ sf data create record --target-org $ORG \
65
+ --sobject QueueSobject \
66
+ --values "QueueId='$QUEUE_ID' SobjectType='MessagingSession'"
66
67
  ```
67
- - **Zero Live LWR sites found** → defer to `experience-lwr-site-generate` to create one. Ask the user for a site name and URL path prefix; recommend the *Help Center* template as the natural default for this use case, since it's built around Knowledge browsing + a chat widget.
68
- - **Exactly one Live LWR site found** → **do not silently use it. Confirm with the user first.** Present the found site (Name + UrlPathPrefix + Id) and ask explicitly: *"Use this existing site for the Help Agent, or create a new one via `experience-lwr-site-generate`?"* — never assume the sole Live site is the right target. On a customer production org, an existing Experience Cloud site may be dedicated to a different audience (partner community, employee portal, marketing site) and wiring the Help Agent onto it would be intrusive. Only proceed once the user has explicitly confirmed which path to take.
69
- - **Multiple Live LWR sites found** → list them (Name + UrlPathPrefix) and ask the user which one to target. Do not silently pick. Include a "create a new site instead" option in the list.
68
+ 4. Add the executing user to the queue:
69
+ ```bash
70
+ RUNNING_USER_ID=$(sf org display --target-org $ORG --json \
71
+ | python3 -c "import sys,json; print(json.load(sys.stdin)['result']['userId'])")
72
+ sf data create record --target-org $ORG \
73
+ --sobject GroupMember \
74
+ --values "GroupId='$QUEUE_ID' UserOrGroupId='$RUNNING_USER_ID'"
75
+ ```
76
+
77
+ Capture the resolved `QUEUE_DEVELOPER_NAME` (either from an existing queue or the one just created). It is used in both Step C.1 (MessagingChannel `sessionHandlerQueue`) and Step C.2 (RoutingFlow queue lookup).
78
+
79
+ ---
80
+
81
+ ### C.1 — Create the Outbound (Escalation) RoutingFlow
82
+
83
+ > **This step is owned by `service-agentforce-channel-configure` Phase 3.** The full template, naming convention, check-before-create logic, and deploy/verify steps are in that skill's `routing-flow.md` Part 2. Follow that reference — do not duplicate the XML here.
84
+
85
+ For Web Chat, the channel type label is **Enhanced Chat**, so:
86
+ - Flow label: `{AgentLabel} Outbound Enhanced Chat Flow`
87
+ - DeveloperName: `{AgentDevName}_Outbound_Enhanced_Chat_Flow`
88
+ - `SERVICE_CHANNEL_DEV_NAME`: `sfdc_livemessage`, `SERVICE_CHANNEL_LABEL`: `Messaging`
89
+ - Queue: `QUEUE_DEVELOPER_NAME` from Step C.0
90
+
91
+ Follow the template and steps in `service-agentforce-channel-configure`'s `routing-flow.md` Part 2. Capture `{FLOW_DEVELOPER_NAME}` for use in the agent's `connection customer_web_client:` block at Checkpoint 4 (`outbound_route_name: "flow://{FLOW_DEVELOPER_NAME}"`). Note: Web Chat uses `connection customer_web_client:` — not `connection messaging:` — see `service-agentforce-channel-configure`'s `agent-wiring.md`.
92
+
93
+ ---
94
+
95
+ ### C.2 — Deploy MessagingChannel
96
+
97
+ Deploy the messaging channel + omni-channel routing (`service-digital-engagement-channel-configure`, channel deploys INACTIVE). **Set `embeddedConfig.authMode` from the choice in Step B.** For `UnAuth`, also set `anonymousUserJwtExpirationTime` (e.g. `360`). For `Auth`, set `verifiedUserJwtExpirationTime` (e.g. `60`). Set `sessionHandlerQueue` to the `QUEUE_DEVELOPER_NAME` resolved in Step C.0.
98
+
99
+ > **v67 ASA routing note.** `service-digital-engagement-channel-configure` handles the v67 limitation automatically for ASA routing: it deploys the XML without `sessionHandlerAsa` (rejected by the Metadata API), then binds `SessionHandlerId` + `FallbackQueueId` via Data API PATCH (its step 15a). Verify both fields are non-null after the skill completes. Also ensure the bot is Active before invoking the skill — the PATCH is rejected with "Only active Agentforce Service Agents are supported" otherwise.
100
+
101
+ ### C.3 — Activate MessagingChannel
102
+
103
+ Activate the MessagingChannel after the agent is Active (and re-verify at Checkpoint 4).
104
+
105
+ ### C.4 — Create a NEW Embedded Service Deployment named `Help Chat`
106
+
107
+ Delegate to **`service-digital-engagement-deployment-configure`** with these inputs:
108
+
109
+ - **Operation**: `create`
110
+ - **Deployment type**: `Web`
111
+ - **Deployment name / DeveloperName**: `HelpChat` / MasterLabel `Help Chat`
112
+ - **Channel**: MessagingChannel DeveloperName from Step C.1 (skill will query the record Id)
113
+ - **hostDomain**: the customer domain from Step A (e.g. `support.acme.com`) — ties the widget's security key to that domain
114
+
115
+ The skill creates the ESD via `POST /connect/embeddedmessaging/deployment/setup` (V2, Connect API), binds the messaging channel at creation time so `isPublishSuccess: true` is returned, and auto-generates the `ESW_*` scaffolding site. **Do NOT re-point or re-use any existing ESD from a prior deployment.**
116
+
117
+ After the skill completes, capture the ESC Id:
118
+
119
+ ```bash
120
+ sf data query --target-org $ORG --use-tooling-api \
121
+ -q "SELECT Id FROM EmbeddedServiceConfig WHERE DeveloperName='HelpChat'" --json \
122
+ | python3 -c "import sys,json;print(json.load(sys.stdin)['result']['records'][0]['Id'])"
123
+ ```
124
+
125
+ The ESD's endpoint URL (needed for the `siteEndpoint` attribute on the LWR component) is the `ESW_HelpChat_*` site row **without** the `vforcesite` suffix:
126
+
127
+ ```bash
128
+ sf data query --target-org $ORG \
129
+ -q "SELECT Name, UrlPathPrefix FROM Site WHERE Name LIKE 'ESW_HelpChat%' AND SiteType='ChatterNetworkPicasso'" --json
130
+ ```
131
+
132
+ Pass `siteEndpoint` (`https://<myDomainStem>.my.site.com/<UrlPathPrefix>`) to Checkpoint 3.5 Check 3(b).
133
+ ### C.5 — Resolve deployment target (Experience Cloud site or own website)
134
+
135
+ Ask the user where they want to deploy the chat widget via `AskUserQuestion`:
136
+ - **"I'll embed it on my own website"** *(Recommended for most customers)* — skip Experience Cloud site creation. The ESD was already created above without a `<site>` reference; skip widget injection (Steps D.1–D.7). Proceed to Step D.8 for the embed snippet instructions.
137
+ - **"Deploy on a Salesforce Experience Cloud site"** — continue with the site resolution below.
138
+
139
+ **If Experience Cloud path:** Query for real (non-auto-generated) sites — both LWR and Aura:
140
+
141
+ ```bash
142
+ sf data query --target-org $ORG --json \
143
+ --query "SELECT Id, Name, MasterLabel, UrlPathPrefix, SiteType, Status FROM Site WHERE Status='Active' AND SiteType IN ('ChatterNetworkPicasso','ChatterNetwork') ORDER BY SiteType, Name" \
144
+ | python3 -c "
145
+ import sys, json
146
+ recs = json.load(sys.stdin)['result']['records']
147
+ real = [r for r in recs if not r['Name'].startswith('ESW_')]
148
+ esw = [r for r in recs if r['Name'].startswith('ESW_')]
149
+
150
+ for r in real:
151
+ r['_type'] = 'LWR' if r['SiteType'] == 'ChatterNetworkPicasso' else 'Aura'
152
+
153
+ print(f'Real sites: {len(real)} ({sum(1 for r in real if r[\"_type\"]==\"LWR\")} LWR, {sum(1 for r in real if r[\"_type\"]==\"Aura\")} Aura) | ESW-filtered: {len(esw)}')
154
+ for r in real:
155
+ print(f' {r[\"MasterLabel\"]:40} ({r[\"_type\"]}) | /{r[\"UrlPathPrefix\"]}')
156
+ "
157
+ ```
158
+
159
+ > **ESW filtering — why and how:** Every ESD auto-creates a pair of `Site` records named `ESW_{EsdName}_{timestamp}` (one Aura, one LWR). These are internal endpoint scaffolding, not real Experience Cloud destinations. SOQL `NOT LIKE` cannot be combined with `AND` in the `sf data query` CLI without a shell-quoting error, so filter them out in Python post-processing as shown above. If all sites after filtering are ESW-prefixed, treat as "zero real sites found."
160
+ >
161
+ > **Duplicate MasterLabels:** Each real Experience Cloud site generates two `Site` records with the same `MasterLabel` — one `ChatterNetwork` (Aura) and one `ChatterNetworkPicasso` (LWR). Both are shown to the user. The `SiteType` on the record the user picks determines which metadata layout path `service-digital-engagement-messaging-site-integrate` follows (LWR: patches `sfdc_cms__themeLayout/*/content.json` footer regions; Aura: patches `homeGuestLayout.json`).
162
+ >
163
+ > **Status value:** `Site.Status` is `'Active'` (not `'Live'`) on all org shapes tested. Using `'Live'` returns zero rows.
164
+
165
+ **Branch by what's found:**
166
+
167
+ - **Zero real sites found** → ask: deploy on own website (give snippet), or create a new LWR Experience Cloud site via `experience-lwr-site-generate` (recommend *Help Center* template).
168
+
169
+ - **Real sites found** → present using the **long-list presentation rules** from SKILL.md. Do not label sites as LWR/Aura — show each as `{MasterLabel} (/{UrlPathPrefix})`. Always include "Create a new Experience Cloud site" and "Deploy on my own website (get snippet)" as fixed options on the final page.
170
+
171
+ **After the user selects:**
172
+
173
+ - **Site selected (either type)** → delegate to `service-digital-engagement-messaging-site-integrate`. The skill reads `SiteType` from the selected site's record and patches the correct layout automatically (LWR: `sfdc_cms__themeLayout/*/content.json` footer regions; Aura: `homeGuestLayout.json` and `homeAuthenticated.json`). After the skill completes, confirm: *"The chat widget has been added to [site name] and will appear as a floating overlay on every page."* Publish the site and verify the smoke-test URL returns 200.
174
+ - **Own website selected** → proceed to Step D.8 snippet instructions.
175
+
176
+ Do not filter by any hardcoded site name or `UrlPathPrefix` value — the correct site depends on the customer's org and is not knowable up front.
177
+
178
+ ### C.6 — Wire up knowledge citations The script's `knowledge:` block ships with `citations_enabled: True` and `citations_url: ""` (the URL isn't knowable until a site exists). Once the target site's public URL is resolved here, set `citations_url` to that URL so knowledge answers cite working links. If no customer-facing site URL can be resolved, set `citations_enabled: False` instead — do not leave citations enabled with an empty URL, or answers render broken/empty citation links.
179
+
180
+ ## Step D.8 — Post-setup next steps (Checkpoint 4, after go-live)
181
+
182
+ Print these after the ESD is published and the channel is Active.
183
+
184
+ **If deployed on an Experience Cloud site:**
185
+ - Test URL: `https://{siteBaseUrl}/{siteUrlPathPrefix}/s` — open in an incognito browser as a guest. The floating chat launcher should appear. Send a message to confirm the agent responds.
186
+ - Test escalation: say *"I need to speak to a human"* — the agent should transfer to the queue resolved in Step C.0. This requires at least one agent to be available in the Omni-Channel widget in the Service Console; set your own status to Available to test.
187
+
188
+ **If deploying on own website:**
189
+ - Direct the user to Setup → Embedded Service Deployments → {ESD Name} → **Get Code** to copy the JavaScript snippet. The snippet is org-specific and must be retrieved from Setup — do not attempt to generate or reconstruct it.
190
+ - The snippet goes in the `<head>` or before `</body>` of any page where the widget should appear. It must be served over HTTPS.
70
191
 
71
- Do not filter by any hardcoded site name or `UrlPathPrefix` value — the correct site depends on the customer's org and is not knowable up front.
72
- 5. **Wire up knowledge citations.** The script's `knowledge:` block ships with `citations_enabled: True` and `citations_url: ""` (the URL isn't knowable until a site exists). Once the target site's public URL is resolved here, set `citations_url` to that URL so knowledge answers cite working links. If no customer-facing site URL can be resolved, set `citations_enabled: False` instead — do not leave citations enabled with an empty URL, or answers render broken/empty citation links.
192
+ **Testing checklist (both paths):**
193
+ 1. Agent responds to a greeting → channel is live
194
+ 2. Agent answers a question from the knowledge source → grounding is working
195
+ 3. Agent escalates to a human when asked → RoutingFlow and queue are wired correctly (requires an agent available in Omni-Channel)
196
+ 4. Widget closes and reopens without losing session → widget state is healthy
73
197
 
74
198
  ## Handoff to Checkpoint 3.5 and Checkpoint 4
75
199
 
@@ -0,0 +1,126 @@
1
+ # Output Report Format — Help Agent Setup
2
+
3
+ > **When to read this file.** Load it right before you write the final `report.md` for a run. This file is the full specification for the two report shapes (settled-facts and guided-decision), the templates, and the failure modes to avoid. `SKILL.md` links here from its Output Expectations section.
4
+
5
+ ## The one deliverable
6
+
7
+ A single `report.md`: a **status report of what was decided and done**, not a design doc, plan, or architecture write-up. Two rules govern quality:
8
+
9
+ 1. **Report concrete outcomes, never intentions.** Write what *is* — the decided value, the created resource, the resolved ID — not what you *would* or *plan to* do. If a step could not run to completion because this is a non-interactive run, **decide the sensible default, state it as the decision, and report it as such** — do not stall on "awaiting confirmation," "to be resolved," "pending user input," or "please provide…". Hedging language ("will create", "to be executed", "once confirmed") reads as an unfinished plan and is scored as incomplete. Name the agent, the locale, the grounding source, `authMode`, the ADL name, the `rag_feature_config_id`, the site `UrlPathPrefix`, the ESD publish state — as settled facts.
10
+ 2. **No padding, no scaffolding prose.** No preamble, no design-doc sections, no restating the prompt. Dense, declarative lines only.
11
+
12
+ **Density bar (web-chat / portal flows are the usual offenders).** The whole report is the two tables plus the two short sections — target well under ~40 lines total. A table cell is a **value or a short clause, never a sentence with a subject and verb**: `UnAuth` not "The authMode was set to UnAuth"; `Help_Agent_Knowledge (indexing COMPLETED)` not "A dedicated Agentforce Data Library named Help_Agent_Knowledge was created and its indexing completed". Do not restate a decided value across multiple cells, do not narrate the mechanics of how a resource was created (which API, which CLI call, which retrieve/deploy sequence) — that belongs in the skill, not the report — and do not append explanatory prose after a table. State the reasoning callout (readiness ordering, `authMode`) only when the request centers on that one decision; otherwise the value alone suffices.
13
+
14
+ ## Choosing a report shape
15
+
16
+ **Before writing, choose the report shape by what the run actually did. There are two:**
17
+
18
+ - **A settled-facts report** — the flow *executed a step*: the user directed a concrete action ("set up the grounding", "put it on <named site>") and every input was supplied or has a sensible skill-owned default. Report what was decided and done.
19
+ - **A guided-decision report** — the flow is at a *decision the user owns*: an opening request with no agent details yet ("set up a help agent", "add a chat widget"), **or** a checkpoint surfacing multiple real alternatives the skill must not invent (e.g. several Live LWR sites). Presenting the checkpoint's questions/options *is* the deliverable; stay draft-first.
20
+
21
+ Use the settled-facts report, not the guided-decision one, when the missing value is a mechanical default the skill can just pick (data category → org default) — decide it and report it done. Use the guided-decision report only when the choice genuinely belongs to the user (identity at an opener; which of several existing sites). The guided-decision report is **not** an escape hatch for hedging on an execute request.
22
+
23
+ ## Settled-facts report
24
+
25
+ **Settled-facts report — the flow ran (completed, or blocked mid-execution).** Start with the exact H1 `# Help Agent Setup Report`, then the two tables and two short sections below, in order. Every cell is a **concrete, decided value** — a bare value, not a sentence. Keep prose out.
26
+
27
+ **Report DECISIONS as settled facts, never placeholders or intentions.** This is a non-interactive run: you do not get to defer. Do NOT emit "to be captured", "not yet reached", "flow is paused", "awaiting", "once confirmed", or "will create". For a value the flow **decides** (agent name, locale, tone, ADL name, `authMode`, data category), state the concrete decision as done — a cell with nothing decided gets `None`. For an **opaque ID the run generates** (the `rag_feature_config_id`, a Salesforce record Id, a site's URL path prefix), report the **actual value produced this run** — never invent a plausible-looking one and never copy an ID from this template; if the run genuinely did not produce it, name that in Blocking Issues rather than fabricating. Hedging is scored as incomplete; fabricated IDs are scored as inaccurate. Include every value below and nothing else.
28
+
29
+ **Scope the report to the checkpoint(s) the request targeted — do not narrate checkpoints the run never entered.** When the user directs a single checkpoint ("set up the grounding", "ground it on Knowledge" → Checkpoint 2 only), the report centers on that checkpoint. Fill its row with settled facts; give each checkpoint the run did **not** reach a bare `Not started` in its Decision cell — no plan, no "pending", no "not yet reached", no downstream detail. Do **not** manufacture a `Blocking Issues` entry or a `Next Action` about a later checkpoint you were never asked to run: if the targeted checkpoint completed, `Blocking Issues` is `None` and `Next Action` is the single next checkpoint by name (e.g. "Checkpoint 3 (channel) when you're ready"). A report that sprawls into unrequested checkpoints and hedges there is scored as incomplete even when the targeted checkpoint is perfect.
30
+
31
+ **When the request centers on one decision, carry that decision's reasoning — not a bare value.** Some requests are about a single load-bearing choice: *why the readiness steps run in a specific order*, or *which `authMode` to pick and why*. For these, the targeted cell (or a short `## <Topic>` section right after the tables) must state the **decision, its rationale, and the concrete failure it avoids** — because that reasoning is the deliverable, not scaffolding:
32
+
33
+ - **Readiness ordering** — give the ordered sequence (licenses / Einstein Agent User → **enable Data Cloud** → **assign Data Cloud permission sets**), say *why* the order is load-bearing (the permission sets do not exist until Data Cloud is enabled — assigning first fails with `PermissionSet not found: GenieUserEnhancedSecurity`), and warn that skipping the assignment yields empty runtime grounding even when ADL indexing reports SUCCESS. Do not compress this to "perm sets assigned". If Data Cloud is not yet enabled on this org, the Readiness row must say so — never assert "Data Cloud enabled; perm sets assigned" while `Blocking Issues` says it isn't; that contradiction is scored as inaccurate.
34
+ - **`authMode` choice** — name the value (`UnAuth` for an anonymous-or-mixed audience), state the rationale (`UnAuth` allows **both** guests and authenticated upgrades via `identityToken`; `Auth` is authenticated-only and silently breaks the guest widget and the Setup "Test Enhanced Web Chat" page), confirm the audience it was chosen for, and state the assertion as a settled part of the flow — "the deployed MessagingChannel is re-fetched and `embeddedConfig.authMode = UnAuth` is asserted" — **present tense, not "will be re-fetched"**. Do not compress this to "authMode UnAuth". The `authMode` decision is complete once chosen: do **not** frame it as pending ("to be confirmed"), and do **not** manufacture a `Blocking Issues` entry or `Next Action` about the *adjacent* site-resolution step — a scoped `authMode` request is not blocked on the LWR site. If nothing stopped the scoped decision, `Blocking Issues` is `None`.
35
+
36
+ The `‹…›` slots below mark where **this run's** real values go — replace each slot, never emit the slot text itself:
37
+
38
+ ```markdown
39
+ # Help Agent Setup Report
40
+
41
+ ## Setup Summary
42
+ | Field | Value |
43
+ |---|---|
44
+ | Readiness | Data Cloud enabled; perm sets assigned (GenieUserEnhancedSecurity, GenieAnalytics, DataSpacePermSet); Einstein Agent User assigned |
45
+ | Failure mode guarded | Stock NOT_SCHEDULED ADL → empty knowledgeSummary; guarded via dedicated ADL, indexing gated to COMPLETED |
46
+ | Delegation | agentforce-generate → agent + ADL; dx-org-permission-set-assign → Data Cloud perms; service-digital-engagement-* → channel + ESD |
47
+
48
+ ## Checkpoint Outcomes
49
+ | # | Checkpoint | Decision |
50
+ |---|---|---|
51
+ | 1 | Identity | ‹agent name› (‹DeveloperName›), ‹locale›, ‹tone› |
52
+ | 2 | Grounding | Salesforce Knowledge via agentforce-generate; dedicated ADL ‹library name› (stock All_Records_and_Fields_Default not wired); indexing gated to COMPLETED before wiring; rag_feature_config_id ‹ARFPC_ id from this run's adl publish› captured |
53
+ | 3 | Channel | Web Chat; authMode ‹UnAuth or Auth›; site ‹target site UrlPathPrefix›; ESD HelpChat WebV2 — *or* `Not started` if the run never entered this checkpoint |
54
+ | 4 | Go-live | ESD Published; channel Active; escalation flow wired — *or* `Not started` |
55
+
56
+ ## Blocking Issues
57
+ ‹the one thing that actually stopped the flow — one line — or `None`›
58
+
59
+ ## Next Action
60
+ One line — the single next step for the user.
61
+ ```
62
+
63
+ Non-slot values above (Data Cloud, perm-set names, `HelpChat WebV2`, delegation targets) are the skill's canonical defaults — reproduce them as-is. Fill the `‹…›` slots from this run (including `authMode`, which is decided per run from the Step B choice — do not default it in the report). **Any checkpoint the run did not reach gets a bare `Not started` — not a plan, forecast, or "pending" note.** For a request scoped to one checkpoint (e.g. Checkpoint 2 grounding), only that row carries settled facts; rows 3 and 4 read `Not started`, `Blocking Issues` is `None`, and `Next Action` names the next checkpoint (e.g. "Checkpoint 3 (channel) when you're ready").
64
+
65
+ **Blocked run?** `Blocking Issues` is the one sanctioned place to state a real blocker — one honest line there (e.g. "multiple Live LWR sites — asked user to choose"; "Knowledge data category not specified — chose the org's default group") is **required and is not hedging**. It records what stopped a checkpoint the run *actually entered* — never a checkpoint the request never targeted (a scoped Checkpoint-2 run is not "blocked" on Checkpoint 3). Keep the checkpoint cells decisive for what *was* settled; put the single unresolved thing here. What is scored as incomplete is hedging *inside the decision cells* ("to be captured", "not yet", "pending") — not a clear one-line blocker in this section.
66
+
67
+ ### Multi-channel run — trace the loop, don't report one channel
68
+
69
+ When the request names **two or more channels** ("web chat first, then Voice — add both"), the settled-facts report must show every named channel was wired. One `Not started` in the Channel row, or a Channel cell that names only the first channel with the second framed as "next step" / "to be added", is scored as an incomplete loop. The up-front request authorizes all the named channels, so the flow wires them in order **without** a between-branch `AskUserQuestion` — report that prompt-level authorization, never a user reply that did not occur. Expand the Channel row into a short trace right after the `## Checkpoint Outcomes` table — one row per named channel:
70
+
71
+ ```markdown
72
+ ## Channel Loop
73
+ | Step | Outcome |
74
+ |---|---|
75
+ | Channel 1 — ‹type› | ‹settled facts: authMode for Web Chat, resolved site/UrlPathPrefix or phone number, ESD/routing state› |
76
+ | Advance | ‹next named type› named up front in the request → wired next without a between-branch prompt |
77
+ | Channel 2 — ‹type› | re-entered Checkpoint 3; ‹settled facts for this branch› |
78
+ | Go-live | all named channels wired; proceed to go-live |
79
+ ```
80
+
81
+ Only when the prompt did **not** name a channel does the between-branch `AskUserQuestion` run — in that case report the options offered and the actual selection. Every named channel gets a settled outcome (or a one-line blocker in `Blocking Issues` if a branch genuinely could not complete). Do not stop the trace after Channel 1.
82
+
83
+ ## Guided-decision report
84
+
85
+ **Guided-decision report — a decision the user owns.** Here the deliverable is *the decision point itself*, presented cleanly. This is not hedging: at an opener or a genuine fork, asking with sensible defaults is the correct, complete response. Do **not** provision, deploy, or fabricate the value the user still owns. Orient, present the current checkpoint's choices with defaults, sketch what the remaining checkpoints will cover, and confirm nothing is live yet. Use exactly these sections:
86
+
87
+ ```markdown
88
+ # Help Agent Setup Report
89
+
90
+ ## Guided Setup
91
+ Help Agent setup runs as four checkpoints: identity → grounding → channel → go-live. Nothing is created, deployed, or published until you confirm at each step.
92
+
93
+ ## Current Checkpoint
94
+ Checkpoint ‹n — name›. This agent will ‹map the user's stated needs to the design in one line: knowledge-grounded Q&A from Salesforce Knowledge, support-case create/update, and escalation to a live human when needed›, delivered as ‹the channel the user named, e.g. a Web Chat widget on their site›.
95
+
96
+ ## Decisions Needed
97
+ - ‹Question 1 — offered default› (e.g. Agent name — `Help Agent`, API name `Help_Agent`)
98
+ - ‹Question 2 — offered default› (e.g. Language — `en_US`)
99
+ - ‹Question 3 — offered default› (e.g. Greeting, Tone)
100
+ - ‹…the real choices for THIS checkpoint only; for a multi-option fork, list the actual alternatives found (e.g. each Live LWR site by Name + UrlPathPrefix) and never pick for the user›
101
+
102
+ ## Checkpoint Roadmap
103
+ - Readiness (silent, before provisioning): confirm licenses / Einstein Agent User → enable Data Cloud → assign the Data Cloud permission sets, in that order.
104
+ - 2 Grounding: connect Salesforce Knowledge via a dedicated Agentforce Data Library, indexing gated to COMPLETED.
105
+ - 3 Channel: deploy the chosen channel + Embedded Service Deployment; confirm `authMode` from who will be chatting.
106
+ - 4 Go-live: embed, publish, and verify with a live round-trip — only after you confirm.
107
+
108
+ ## Next Action
109
+ Reply with your choices (or accept the defaults) and I'll proceed to the next checkpoint. Nothing is created, grounded, embedded, or published until you confirm at each step.
110
+ ```
111
+
112
+ Fill every `‹…›` from this run's context. Keep to these five sections — the Roadmap names what later checkpoints will do (it is not a settled-fact table and must not claim any of it is done); no provisioning tables, no settled-fact cells for steps not yet reached.
113
+
114
+ ## Never include
115
+
116
+ Each of the following is a scored failure:
117
+
118
+ - A preamble restating the prompt or the request
119
+ - The skills-inventory pre-flight roll call (the eight `OK:` / `resolve-at-runtime:` dependency lines). That check is silent and for your own awareness — it is **not** part of the deliverable. Only name a sibling skill in the report if a delegation step actually reached it and it could not be resolved, and then only that one skill, as a one-line `Blocking Issues` entry.
120
+ - "End of report." trailers
121
+ - Decorative `---` / `===` rules
122
+ - `Scope`, `Assumptions`, `Out-of-Scope`, `Architecture`, `Options Considered`, `Next Steps`, `Steps:`, or `Outcome Gate:` sections
123
+ - The checkpoints re-listed as questions
124
+ - The agent script or reference-file contents pasted inline
125
+ - Emoji
126
+ - Marketing adjectives ("seamless", "robust", "powerful", "comprehensive")
@@ -0,0 +1,153 @@
1
+ ---
2
+ name: service-itsm-agentic-setup-agentforce-coordinate
3
+ description: "Orchestrator for setting up Agentforce in Salesforce Service Cloud ITSM — Agentforce Studio enablement, the IT Service Fulfiller agent lifecycle, and the IT Service Employee agent lifecycle. Use when the user asks to set up Agentforce for ITSM, enable Studio and the Fulfiller/Employee agents together, wants a guided Agentforce ITSM walkthrough, or asks what Agentforce features are available for IT Service. Presents available Agentforce capabilities and delegates each selection to a specialized child skill while tracking progress. Triggers on: set up agentforce for itsm, configure agentforce studio and fulfiller, agentforce itsm walkthrough, what agentforce features for it service. DO NOT TRIGGER when: the user asks to enable Agentforce Studio alone, asks to create or activate the Fulfiller or Employee agent alone, or asks about CMDB, Incident Management, Teams, or general ITSM setup without Agentforce intent."
4
+ metadata:
5
+ version: "1.2"
6
+ domains: ["Service", "Agentforce"]
7
+ relatedSkills:
8
+ - "service-itsm-agentic-setup-agentforce-studio-configure"
9
+ - "service-itsm-agentic-setup-agentforce-studio-validate"
10
+ - "service-itsm-agentic-setup-employee-agent-configure"
11
+ - "service-itsm-agentic-setup-fulfiller-agent-configure"
12
+ cliTools:
13
+ - tool: ["node"]
14
+ semver: ">=18.0.0"
15
+ accessCheck:
16
+ - type: "license"
17
+ value: "Agentforce"
18
+ allowed-tools: Read Bash Write AskUserQuestion
19
+ ---
20
+
21
+ # Agentforce for ITSM Setup Orchestrator
22
+
23
+ Guide the user through setting up Agentforce Studio, the IT Service Fulfiller agent, and the IT Service Employee agent in Salesforce Service Cloud ITSM by presenting the available capabilities, delegating to specialized child skills, and tracking progress.
24
+
25
+ ## Goal
26
+
27
+ Act as the coordinator for Agentforce feature configuration in ITSM. Present the user with a menu of configurable features, invoke the appropriate child skill for each selection, and after each feature completes, return to the menu with updated progress until the user is done.
28
+
29
+ ## Behavior
30
+
31
+ ### 1. Extract context from conversation
32
+
33
+ Before presenting options, scan chat history for:
34
+
35
+ - Which features the user has already set up (skip or mark as done)
36
+ - Any preferences or constraints mentioned (e.g., "just enable Agentforce Studio", "we already have Studio on")
37
+ - The target org (if mentioned)
38
+ - Business context that informs which features are relevant
39
+
40
+ ### 2. Confirm the target org
41
+
42
+ Agentforce setup performs **writes against a real org** (feature-toggle enablement, agent creation
43
+ and activation). Before delegating to any child skill, confirm the target org with the user and
44
+ state plainly that this org will be modified. Never assume production is safe to change — ask for
45
+ explicit confirmation of the org.
46
+
47
+ ### 3. Present the Agentforce feature menu as a multi-select
48
+
49
+ Show the user what's available and what's done. Only features with a working child skill appear in the menu — use the **Feature menu** template in `examples/output-templates.md`. Collect the user's selections through a single multi-select prompt (use `AskUserQuestion` with `multiSelect: true` when tooling permits, otherwise ask the user to reply with a list of numbers such as `1, 2`). Do NOT show placeholder features that cannot be executed.
50
+
51
+ **Report file (harness / non-interactive runs).** If a `${outputDir}` is provided (via the harness's generated-file location directive), write the menu emission (attribution header + feature table with status + delegation targets + dependency signal + the multi-select prompt itself) to `${outputDir}/report.md` **before** raising `AskUserQuestion` — so the report file always exists even when the harness parks at the confirmation gate. Overwrite the same file after each feature completes with the updated status table. Skip these writes when running interactively for a user in a chat surface — write only when `${outputDir}` was passed as an explicit destination.
52
+
53
+ ### 4. Delegate to child skills in dependency order
54
+
55
+ **Studio-first rule (unconditional).** If Agentforce Studio enablement (#1) is in the user's selection and not already done, run it **first**, always — regardless of the order the user listed their numbers in. Both the Fulfiller Agent (#2) and Employee Agent (#3) lifecycles depend on Studio being enabled and will fail if attempted first. Reorder the queue silently so Studio runs before either agent lifecycle. This rule is non-negotiable and applies whether the user selected two features (Studio + one agent) or all three.
56
+
57
+ **User-order rule (between #2 and #3 only).** Fulfiller Agent (#2) and Employee Agent (#3) are independent of each other — neither depends on the other. If **both** are selected, run them in the order the user listed them (default 2 → 3 when unspecified). This rule applies **only** to the ordering between #2 and #3; it never overrides the Studio-first rule above.
58
+
59
+ | # | Feature | Child Skill |
60
+ |---|---------|-------------|
61
+ | 1 | Agentforce Studio enablement | `service-itsm-agentic-setup-agentforce-studio-configure` |
62
+ | 2 | Fulfiller Agent lifecycle | `service-itsm-agentic-setup-fulfiller-agent-configure` |
63
+ | 3 | Employee Agent lifecycle (broad or specialized template) | `service-itsm-agentic-setup-employee-agent-configure` |
64
+
65
+ `service-itsm-agentic-setup-agentforce-studio-configure` performs its own read-and-classify
66
+ preflight (reading live toggle state before writing) rather than delegating to
67
+ `service-itsm-agentic-setup-agentforce-studio-validate` — that skill is a separate, read-only entry
68
+ point a user can invoke directly to check readiness without writes. This orchestrator does not need
69
+ to call it as part of the delegation flow above.
70
+
71
+ ### 5. After each feature completes
72
+
73
+ Once a child skill finishes:
74
+
75
+ 1. **Verify** the child skill's own deterministic verdict by running
76
+ `node "<skill_dir>/scripts/verify-child-verdict.mjs" <studio|fulfiller|employee> <verdict>` — never
77
+ re-derive the success/failure comparison in prose. Pass Studio's `overall` field from
78
+ `classify-final-report.mjs`, or Fulfiller/Employee Agent's Phase 8 aggregate verdict, as
79
+ `<verdict>`. Exit code `0` means advance; exit code `1` means **stop and surface the failure in
80
+ plain language — do not advance to the next feature in the queue.** A partially-enabled Studio
81
+ (e.g. Einstein GenAI on but the parent umbrella still blocked, `overall: PARTIAL`) will make
82
+ Fulfiller/Employee Agent creation fail too, so the script treats `PARTIAL` the same as `FAILED`
83
+ for advancement purposes.
84
+ 2. **Update the status** — mark the completed feature as "Done"
85
+ 3. **Suggest the next logical step** — if another feature is available, recommend it based on the dependency order
86
+ 4. **Re-present the menu** with updated status — use the **Post-feature progress** template in `examples/output-templates.md`
87
+
88
+ ### 6. Completion summary
89
+
90
+ When the user says they're done (or all available features are configured), present a final summary using the **Completion summary** template in `examples/output-templates.md`.
91
+
92
+ ---
93
+
94
+ ## Feature Dependencies & Recommended Order
95
+
96
+ ```text
97
+ 1. Agentforce Studio enablement (foundation — org-level Agentforce and Einstein GenAI toggles)
98
+ 2. Fulfiller Agent lifecycle (create, commit, activate the IT Service Fulfiller agent)
99
+ 3. Employee Agent lifecycle (create, commit, activate the IT Service Employee agent)
100
+ ```
101
+
102
+ Agentforce Studio enablement is the foundation: it turns on the org-level Agentforce and Einstein GenAI features that both the Fulfiller and Employee agents depend on. Configure Studio first — attempting to create or activate either agent before Studio is enabled will fail. Fulfiller and Employee are independent siblings (neither depends on the other) — both can be selected together and run in either order after Studio.
103
+
104
+ ---
105
+
106
+ ## Rules
107
+
108
+ - ALWAYS show "(via service-itsm-agentic-setup-agentforce-coordinate)" in the setup header
109
+ - ALWAYS present the feature menu before doing anything — do not assume which feature the user wants
110
+ - ALWAYS present the feature menu as a multi-select — accept a set of one or more features in a single interaction
111
+ - NEVER set up a feature without the user selecting it. (Explicit selection ensures the user confirms intent and avoids partial configurations if they cancel mid-flow; use the sequential-confirmation loop in the "set up everything" rule for bulk requests.)
112
+ - NEVER show features that do not have a working child skill
113
+ - If the user says "set up everything" or "all", walk through each available feature sequentially in the recommended order, confirming between each step
114
+ - Track progress across the conversation — do not re-present completed features as "Not done"
115
+ - NEVER advance to the next feature in the queue if the current one failed or only partially
116
+ succeeded — stop and surface the failure in plain language instead
117
+ - If Agentforce Studio enablement reports the org lacks the Agentforce license (`accessCheck`), STOP
118
+ the whole flow — this is a license/edition prerequisite no API can grant, and neither the
119
+ Fulfiller nor the Employee Agent lifecycle can succeed without it
120
+ - ALWAYS confirm the target org before delegating to any child skill, and state that the org will be modified
121
+ - Do NOT expose internal technical jargon in user-facing output. This includes Salesforce record
122
+ IDs and org IDs, raw HTTP status codes (403, 500, …), API error codes (`FUNCTIONALITY_NOT_ENABLED`,
123
+ `DUPLICATE_VALUE`, …), internal endpoint/API names, developer names (feature apiNames like
124
+ `sales-cloud-agent-studio`), and CLI/tooling internals. Translate everything to plain, human-readable
125
+ language. Child-skill names shown as next-step pointers are fine.
126
+ - If the user asks about Agentforce features that are not yet available (e.g., Requester agent, custom topic packs, agent metrics dashboards), tell them those features are not yet available in this orchestrator and will be added as their child skills merge
127
+
128
+ ---
129
+
130
+ ## Verification checklist
131
+
132
+ Before emitting any menu or summary in this skill, mentally confirm each of the following. If any box is unchecked, adjust the output before sending.
133
+
134
+ - [ ] The header line ends with `(via service-itsm-agentic-setup-agentforce-coordinate)`
135
+ - [ ] The target org was confirmed with the user, and they were told it will be modified, before any child skill ran
136
+ - [ ] The current feature's child-skill result was verified as a full success before advancing to the next queued feature — a failed or partial result stopped the queue instead
137
+ - [ ] Only features with a working child skill are shown; placeholder features are hidden
138
+ - [ ] The feature menu is presented as a multi-select (single-select only if the user has already named a specific feature)
139
+ - [ ] Each feature row's `Status` column reflects the actual tracked state from the conversation (`Not done`, `In progress`, or `Done`) — not a hard-coded default
140
+ - [ ] For a completion summary, the header line and closing line are chosen by the rubric in `examples/output-templates.md` (all `Done` → *Complete*; any `Not done`/`In progress` → *Finished*)
141
+ - [ ] A feature is being configured only because the user explicitly selected it (or is being walked through sequentially with confirmation under an "all" / "everything" request)
142
+ - [ ] Studio enablement is verified done before delegating to the Fulfiller Agent or Employee Agent child skill
143
+ - [ ] The next action delegates to a child skill, never configures a feature inline
144
+ - [ ] No Salesforce record IDs appear in the output — human-readable names only
145
+
146
+ ---
147
+
148
+ ## Reference File Index
149
+
150
+ | File | When to read |
151
+ |------|--------------|
152
+ | `examples/output-templates.md` | Behavior steps 2, 4, and 5 — feature menu (multi-select), post-feature progress, and completion summary text blocks |
153
+ | `scripts/verify-child-verdict.mjs` | Behavior step 5 — run via `Bash` (`node`) to check a child skill's verdict deterministically before advancing the queue |