@salesforce/afv-skills 1.44.0 → 1.45.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 (97) hide show
  1. package/package.json +1 -1
  2. package/skills/consumer-goods-rtr-datacloud-export-configure/SKILL.md +72 -0
  3. package/skills/consumer-goods-rtr-datacloud-export-configure/references/inputs-and-namespace.md +38 -0
  4. package/skills/consumer-goods-rtr-datacloud-export-configure/references/procedure.md +158 -0
  5. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/detect-namespace.js +86 -0
  6. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/render-apex.js +64 -0
  7. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/resolve-id-by-name.js +47 -0
  8. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/sf-rest.js +171 -0
  9. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/soql-escape.js +26 -0
  10. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/upsert-report-config.apex +51 -0
  11. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/upsert-system-setting.apex +21 -0
  12. package/skills/consumer-goods-tpe-dashboard-configure/SKILL.md +74 -0
  13. package/skills/consumer-goods-tpe-dashboard-configure/references/phases-1-6.md +112 -0
  14. package/skills/consumer-goods-tpe-dashboard-configure/references/phases-7-12.md +157 -0
  15. package/skills/consumer-goods-tpe-dashboard-configure/scripts/find-failure-reason.js +132 -0
  16. package/skills/consumer-goods-tpe-dashboard-configure/scripts/poll-status.js +116 -0
  17. package/skills/consumer-goods-tpe-dashboard-configure/scripts/render-apex.js +64 -0
  18. package/skills/consumer-goods-tpe-dashboard-configure/scripts/run-data-transform.js +121 -0
  19. package/skills/consumer-goods-tpe-dashboard-configure/scripts/schedule-business-period-export.apex +27 -0
  20. package/skills/consumer-goods-tpe-dashboard-configure/scripts/sf-rest.js +171 -0
  21. package/skills/consumer-goods-tpe-dashboard-configure/scripts/soql-escape.js +25 -0
  22. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/SKILL.md +141 -0
  23. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/references/payload-shapes.md +447 -0
  24. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/references/procedure.md +263 -0
  25. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/scripts/clone-tpe-dashboards.js +537 -0
  26. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/scripts/sf-rest.js +195 -0
  27. package/skills/consumer-goods-tpe-datakit-deploy/SKILL.md +157 -0
  28. package/skills/consumer-goods-tpe-datakit-deploy/scripts/detect-namespace.js +86 -0
  29. package/skills/consumer-goods-tpe-datakit-deploy/scripts/download-static-resource.js +151 -0
  30. package/skills/consumer-goods-tpe-datakit-deploy/scripts/extract-crm-field-permissions.js +115 -0
  31. package/skills/consumer-goods-tpe-datakit-deploy/scripts/sf-rest.js +109 -0
  32. package/skills/consumer-goods-tpe-datakit-deploy/scripts/update-field-permissions.js +433 -0
  33. package/skills/service-catalog-template-coordinate/SKILL.md +263 -0
  34. package/skills/service-catalog-template-coordinate/examples/output-templates.md +44 -0
  35. package/skills/service-catalog-template-coordinate/references/mcp-invocation.md +183 -0
  36. package/skills/service-catalog-template-coordinate/references/operations.md +230 -0
  37. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +243 -0
  38. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/references/cli-invocation.md +205 -0
  39. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/references/helper-contracts.md +236 -0
  40. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/references/permset-topology.md +132 -0
  41. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/classify-activated-agents.mjs +106 -0
  42. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/classify-agent-access-state.mjs +113 -0
  43. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/classify-assignment-state.mjs +99 -0
  44. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/classify-platform-permset-availability.mjs +155 -0
  45. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/gate-unified-catalog-tiers.mjs +100 -0
  46. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/rank-candidate-users.mjs +95 -0
  47. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/resolve-target-user.mjs +86 -0
  48. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +44 -23
  49. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +33 -9
  50. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +17 -18
  51. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +3 -1
  52. package/skills/service-itsm-agentic-setup-configure/SKILL.md +20 -12
  53. package/skills/service-itsm-agentic-setup-configure/examples/output-templates.md +73 -5
  54. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +8 -7
  55. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/cli-invocation.md +45 -33
  56. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/reactivation.md +8 -6
  57. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +10 -10
  58. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-agent-existence.mjs +114 -56
  59. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-preflight.mjs +33 -17
  60. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +9 -3
  61. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +8 -7
  62. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/cli-invocation.md +43 -32
  63. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/reactivation.md +6 -4
  64. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +10 -10
  65. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-agent-existence.mjs +106 -55
  66. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-preflight.mjs +27 -13
  67. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +9 -3
  68. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +159 -161
  69. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone-action.json +51 -0
  70. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +1 -1
  71. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +120 -0
  72. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +28 -5
  73. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +19 -1
  74. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +350 -30
  75. package/skills/service-itsm-channels-coordinate/SKILL.md +80 -213
  76. package/skills/service-itsm-slack-itservice-configure/SKILL.md +363 -0
  77. package/skills/service-itsm-slack-itservice-configure/references/connect-agentforce-to-slack.md +159 -0
  78. package/skills/service-itsm-slack-itservice-configure/references/manage-slack-connection.md +88 -0
  79. package/skills/service-itsm-slack-itservice-configure/references/manage-user-access.md +117 -0
  80. package/skills/service-itsm-slack-itservice-configure/references/record-visibility.md +78 -0
  81. package/skills/service-itsm-slack-itservice-configure/references/site-membership-verification.md +126 -0
  82. package/skills/service-itsm-slack-itservice-configure/scripts/classify-user-access.mjs +167 -0
  83. package/skills/service-itsm-teams-configure/SKILL.md +50 -47
  84. package/skills/service-itsm-teams-configure/references/azure-credential-population.md +42 -28
  85. package/skills/service-itsm-teams-configure/references/gotchas.md +1 -2
  86. package/skills/service-itsm-teams-coordinate/SKILL.md +22 -18
  87. package/skills/service-itsm-teams-coordinate/examples/output-templates.md +12 -9
  88. package/skills/service-itsm-teams-itdesk-configure/SKILL.md +60 -44
  89. package/skills/service-itsm-teams-itservice-configure/SKILL.md +56 -70
  90. package/skills/service-catalog-template-deploy/SKILL.md +0 -310
  91. package/skills/service-catalog-template-deploy/references/cli-invocation.md +0 -258
  92. package/skills/service-catalog-template-deploy/scripts/activate-verify.mjs +0 -164
  93. package/skills/service-catalog-template-deploy/scripts/build-deploy-payload.mjs +0 -94
  94. package/skills/service-catalog-template-deploy/scripts/resolve-template.mjs +0 -331
  95. package/skills/service-catalog-template-search/SKILL.md +0 -212
  96. package/skills/service-catalog-template-search/references/cli-invocation.md +0 -128
  97. package/skills/service-catalog-template-search/scripts/classify-catalog.mjs +0 -205
@@ -0,0 +1,363 @@
1
+ ---
2
+ name: service-itsm-slack-itservice-configure
3
+ description: "Configure the \"Set Up Self Service for Employees on Slack\" / \"Slack for Employee Service\" checklist for Employee Service (ITSM) on Slack — the employee side, covering the Slack for Employee Service org preference, Employee Slack Notifications permission-set assignment, employee portal (Digital Experience site) enablement/selection, and connecting Slack to a Preferred Digital Experience Site. Use this for: 'set up Slack for Employee Service', 'assign Employee Slack Notifications permission set', 'manage user access for Slack employee service', 'select a preferred digital experience site for Slack', 'set up self service for employees on Slack', or any request to complete the IT Service / Employee Service half of the Slack ITSM Go page checklist. DO NOT TRIGGER for the Microsoft Teams equivalents (service-itsm-teams-itservice-configure) or for turning ITSM notification preferences on or off."
4
+ metadata:
5
+ version: "1.0"
6
+ minApiVersion: "67.0"
7
+ domains: ["Service"]
8
+ relatedSkills:
9
+ - "experience-portal-create"
10
+ - "service-itsm-agentic-setup-employee-agent-configure"
11
+ - "service-itsm-agentic-setup-fulfiller-agent-configure"
12
+ - "service-itsm-channels-coordinate"
13
+ - "service-itsm-teams-itservice-configure"
14
+ mcpTools:
15
+ headless-360:
16
+ tools: ["dispatch", "dispatch_readonly"]
17
+ semver: ">=1.0.0"
18
+ cliTools:
19
+ - tool: ["node"]
20
+ semver: ">=18.0.0"
21
+ accessCheck:
22
+ - type: "orgPref"
23
+ value: "EmployeeServiceSlackEnabled"
24
+ allowed-tools: |
25
+ Read AskUserQuestion Bash
26
+ mcp__headless-360__discover
27
+ mcp__headless-360__describe
28
+ mcp__headless-360__dispatch
29
+ mcp__headless-360__dispatch_readonly
30
+ ---
31
+
32
+ # Set Up Self Service for Employees on Slack (Employee Service / ITSM)
33
+
34
+ Complete the **"Set Up Self Service for Employees on Slack"** checklist group — the employee side of
35
+ Employee Service (ITSM) on Slack, so employees can create and manage their own tickets from Slack. Every
36
+ operation dispatches through **headless-360**.
37
+
38
+ > **Execute one step at a time.** These are real state-changing writes — run one operation, confirm it
39
+ > succeeded, then proceed. Don't batch setup calls into one parallel block.
40
+
41
+ > **Step 1 is a blocking gate.** The Slack↔Salesforce connection request is Slack-admin-side. Every run,
42
+ > display the Step 1 block and **STOP until the user confirms the request was sent** — no API call (not
43
+ > even reads) before that. If unconfirmed, Slack setup is **not** done.
44
+
45
+ > **Speak plainly; keep internals in reasoning.** Never surface tooling names, raw error codes, internal
46
+ > endpoints, developer names, or record Ids — translate to plain language ("Slack for Employee Service is
47
+ > now on") and refer to users/sites by human-readable **Name**. Begin each user-facing summary with the
48
+ > stamp **`(via service-itsm-slack-itservice-configure)`**.
49
+
50
+ ## Scope
51
+
52
+ - **Automated (API)**: turn on **`EmployeeServiceSlackEnabled`**; assign all three core permsets —
53
+ **`EmployeeSlackNotifications`** + **`ItsmPortalUelUserPermset`** + an API-Enabled permset — to each
54
+ confirmed employee user; list the employee portal; set the **Preferred Digital Experience Site**
55
+ (`SLACK_PREFERRED_SITE`). Also **read** connection status.
56
+ - **Guided + delegated**: **Connect Agentforce to Slack** (Step 6) — ensure the **IT Service Employee
57
+ Agent** exists (delegate to `service-itsm-agentic-setup-employee-agent-configure`), read-check the
58
+ connection, then guide the UI-only writes.
59
+ - **Guided, UI-only**: the connection request (Part 1, Step 1) + approve/activate (Parts 2 & 3, Step 2,
60
+ only if the API read can't confirm) + mapping field; agent↔Slack connection + workspace install (Step 6).
61
+ - **Out of scope**: Slack notification preferences (on/off).
62
+
63
+ **Prerequisite:** the org must have Employee Service (ITSM) licensing/permission — `EmployeeServiceSlackEnabled`
64
+ is only editable then (see Gotchas). An employee portal should exist or be created via `experience-portal-create`.
65
+
66
+ ---
67
+
68
+ ## Workflow
69
+
70
+ ### Step 1 — Request the Slack↔Salesforce connection (Slack-admin-side) — BLOCKING GATE
71
+
72
+ Connecting the org to a Slack workspace starts Slack-admin-side — no Salesforce API. **Hard gate: present
73
+ *only* Part 1 (request) verbatim, then HALT** and wait for the user to confirm ("ok" / "done"); make no API
74
+ call yet, and if unconfirmed, **Slack setup is not done**. Don't front-load Salesforce-side approval — you
75
+ try to confirm that yourself in Step 2.
76
+
77
+ ```text
78
+ Connecting the org to Slack starts with a Slack-admin-side request — there's no Salesforce API for
79
+ it, so I can't do it for you. Do Part 1 now; after that I'll check the Salesforce side myself.
80
+
81
+ ── PART 1 — Request a Salesforce connection in Slack (Slack desktop app) ──
82
+ 1. Click your workspace name in the sidebar.
83
+ 2. Hover over Tools & settings, then click Manage Salesforce organisations.
84
+ 3. Click on Connect Salesforce org in the top-right corner.
85
+ 4. Enter your Salesforce org URL.
86
+ 5. Choose whether to use Email or SAML NameID for the Account mapping field. If you like,
87
+ toggle Automatic account mapping off to manually map accounts.
88
+ 6. Click on Request connection, then click on OK. Your request will be sent to Salesforce for
89
+ approval.
90
+
91
+ Full walkthrough (all three parts — request, Salesforce approval, Slack activation):
92
+ https://slack.com/intl/en-in/help/articles/30754346665747-Connect-Salesforce-and-Slack
93
+
94
+ Once you've sent the "Request connection" (Part 1), reply "ok".
95
+ ```
96
+
97
+ ### Step 2 — Confirm the connection (try API first), then turn on Slack for Employee Service
98
+
99
+ Don't send the user to Salesforce right away — **try to confirm the connection yourself first**, and only
100
+ guide the Salesforce-side approve/activate if you can't. Then enable the Employee Service org preference.
101
+
102
+ **2a. TRY TO READ the connection via API** (headless users have no Setup UI, so read rather than send them
103
+ there blind):
104
+
105
+ ```text
106
+ mcp__headless-360__dispatch_readonly(
107
+ method: "GET",
108
+ url: "/services/data/v67.0/connect/slackbridge/connections"
109
+ )
110
+ ```
111
+
112
+ Returns `{team:{status, teamName, teamDomain, teamId}, currentUserMapping:{salesforceUserId, slackUserId}}`
113
+ (verified `200`). Branch on `team.status`:
114
+
115
+ - **`CONNECTED`** → already approved and live. Name the workspace by `teamName`; **skip Parts 2 & 3** and
116
+ go straight to 2c (enable the preference). (A `null` `currentUserMapping.salesforceUserId` means this
117
+ user isn't mapped to a Slack user yet — mention it; it doesn't block the connection.)
118
+ - **`team: null` / not-connected / errors → you CANNOT confirm it yet.** This endpoint is CONNECTED-only
119
+ and **blind to a pending/requested connection**, so a null does **not** mean the request is absent.
120
+ **Never** say it "didn't land" or "isn't on the Salesforce side". Say only that no activated connection
121
+ shows via API yet, then **2b**.
122
+
123
+ **2b. Only if you couldn't confirm (team:null / pending), PASTE Part 2 and Part 3, then HALT.** Part 2 is
124
+ the Salesforce-side approval + mapping field (default `Email`; ask if the org uses SAML) — genuinely
125
+ UI-only, so guide it, don't fake an approve API. Point the user at the pending view **Setup → Manage Slack Connection** (`/lightning/setup/SlackWorkspaces/home`). Wait for "ok"
126
+ (approved + activated) before 2c.
127
+
128
+ ```text
129
+ ── PART 2 — Approve the connection on the Salesforce side (guided) ──
130
+ 1. Go to Setup → Manage Slack Connection (/lightning/setup/SlackWorkspaces/home).
131
+ 2. Find the pending request and Approve it.
132
+ 3. Set the Account mapping field to Email (default) — or SAML NameID if your org uses SAML.
133
+
134
+ ── PART 3 — Activate the connection back in Slack (Slack desktop app) ──
135
+ Do this after the connection is approved on the Salesforce side. Owners / Salesforce-admin system
136
+ role in Slack can activate:
137
+ 1. Click your workspace name in the sidebar.
138
+ 2. Hover over Tools & settings, then click Manage Salesforce organisations.
139
+ 3. Select the pending connection.
140
+ 4. Review the connection details, then click Activate.
141
+
142
+ Reply "ok" once the connection is approved and activated, and I'll continue with the Salesforce setup.
143
+ ```
144
+
145
+ > **Read yes, approve no — do not fake it.** Reading status is real; approving the connection and setting
146
+ > the mapping field are genuinely UI-only. Don't invent a `/connect/slack…` approve call or claim it approved.
147
+ > Details / API evidence: `references/manage-slack-connection.md`.
148
+
149
+ **2c. Turn on Slack for Employee Service.** A direct org-preference toggle (reachable via `PATCH`). Enable
150
+ it yourself via API; don't ask the user to flip the Setup toggle. Read first (idempotent — skip the write
151
+ if already enabled):
152
+
153
+ ```text
154
+ mcp__headless-360__dispatch_readonly(
155
+ method: "GET",
156
+ url: "/services/data/v67.0/setup/org/preferences/EmployeeServiceSlackEnabled"
157
+ )
158
+ ```
159
+
160
+ Expect `200 {"isPreferenceEnabled": <bool>}`. If `false`, enable it:
161
+
162
+ ```text
163
+ mcp__headless-360__dispatch(
164
+ method: "PATCH",
165
+ url: "/services/data/v67.0/setup/org/preferences/EmployeeServiceSlackEnabled",
166
+ body: { "desiredState": true }
167
+ )
168
+ ```
169
+
170
+ Expect `200 {"isPreferenceEnabled": true}`. Re-run the GET to confirm. Tell the user it's enabled — don't
171
+ ask them to flip the toggle themselves.
172
+
173
+ > **Verified:** the REST preference name is **`EmployeeServiceSlackEnabled`** (not the Metadata-API name
174
+ > `enableEmployeeServiceSlack`; guessed variants `404`). See Gotchas for the write-access gate.
175
+
176
+ ### Step 3 — Enable / list the employee portal
177
+
178
+ Slack for Employee Service surfaces self-service through a Digital Experience portal. List the org's
179
+ sites and confirm an employee portal exists (this list feeds the Preferred Site selection in Step 5):
180
+
181
+ ```text
182
+ mcp__headless-360__dispatch_readonly(
183
+ method: "GET",
184
+ url: "/services/data/v67.0/connect/communities"
185
+ )
186
+ ```
187
+
188
+ Each entry carries `id` (the **Network** Id, `0DB...`), `name`, `status`, `templateName`, `siteUrl`.
189
+ Present the list and identify the employee portal (`templateName` "Employee Portal" / "Agentforce
190
+ Employee Center"). If **no** portal exists — or Digital Experiences isn't enabled (the call errors /
191
+ returns nothing) — hand off to **`experience-portal-create`** (covers org-level enablement too), then return.
192
+
193
+ ### Step 4 — Manage User Access (assign the employee permission sets)
194
+
195
+ The Go page's **"Manage User Access"** step assigns permission sets to each confirmed employee
196
+ user (**never all active users** — ask which user(s), then assign). **Always assign all three core
197
+ permsets** to each confirmed user — don't ask the user to choose a "notifications-only" vs "full"
198
+ scope; the three together are what makes Slack for Employee Service actually usable (notifications +
199
+ record visibility + API access), and under-assigning silently breaks record access:
200
+
201
+ - **`EmployeeSlackNotifications`** — Slack notifications on ticket updates (the core of the step).
202
+ - **`ItsmPortalUelUserPermset`** ("ITSM Portal Uel User") — read/create/edit on **Incident, Service
203
+ Request, Case** (self-service) — lets the employee see/work their own records.
204
+ - **API Enabled** — lets the Slack app call Connect APIs. **Reuse** any existing API-Enabled permset the
205
+ org already has; else **create** a Slack-named one (`PermissionSet`, `PermissionsApiEnabled = true`, e.g.
206
+ Name `Slack_ApiAccess` / label "Slack API Access"). See `references/manage-user-access.md`.
207
+
208
+ **Agent access** is separate and conditional — assign it **only if** the user opts into the Agentforce
209
+ agent in Slack (Step 6): the **per-agent** `Agent_Access` permset (the agent's `BotDefinition`
210
+ `SetupEntityAccess`); reverse-lookup, create if absent. **Never** `Access_Agents` (fails on an employee
211
+ license). Mechanics: `references/connect-agentforce-to-slack.md`.
212
+
213
+ > **Warn the user before assigning — their email must match their Slack user's email.** The permset grants
214
+ > only the *ability* to receive notifications; the Salesforce↔Slack link comes from the connection's
215
+ > account-mapping field (default **`Email`**): `User.Email` must equal the Slack-account email, or they map
216
+ > to no Slack user and notifications go nowhere. A `null` `currentUserMapping.salesforceUserId` from Step 2
217
+ > means unmapped. (SAML NameID: same rule, that identifier.) Surface this **before** you assign, so the user
218
+ > can pick users whose emails match.
219
+
220
+ Flow: query active users (page ≤10), classify with the helper script (don't eyeball — early pages are
221
+ full of system/integration accounts), ask which to grant, look up each permset Id fresh, POST one
222
+ `PermissionSetAssignment` per user per permset, classify each response with the script.
223
+
224
+ **→ `references/manage-user-access.md`** — query + POST bodies, the `classify-user-access.mjs` contracts,
225
+ the email-match + license gotchas, and the `ItsmPortalUelUserPermset` / API-Enabled / agent-access grants.
226
+
227
+ ### Step 5 — Select a Preferred Digital Experience Site to connect Slack with
228
+
229
+ Writes the org value `SLACK_PREFERRED_SITE` (shared, cross-feature — see Gotchas).
230
+
231
+ 1. Use the site list from Step 3. Ask which site to connect Slack with; **if they don't choose, pick one
232
+ yourself** (the only site, else the employee portal / most recent `Live` site) and tell them.
233
+ 2. Read `GET /services/data/v67.0/setup/org/values/SLACK_PREFERRED_SITE` first (`stringValue` = current
234
+ Network `Id` or `"None"`); skip the write if already the chosen site's Id.
235
+ 3. Write via `dispatch` `PATCH` to the same path with body `{ "orgValue": "<site Network Id>" }` — the
236
+ site's **Network `Id`** (`0DB...` from `connect/communities`, **not** `urlPathPrefix`); re-read to confirm.
237
+
238
+ ### Step 5b — Verify the site is active, published, and the user is a member (BLOCKING — do before any success)
239
+
240
+ `SLACK_PREFERRED_SITE` and the Step-4 permset writes all return `200/201` even when the site can't
241
+ serve the employee — a "success" summary is then wrong: IT Service lists come back empty /
242
+ access-denied. Activation, membership, and publication are **three distinct states** — verify each;
243
+ **a failure of any is blocking — do not report setup complete.** Remediation for any gap is
244
+ programmatic (hand to **`experience-portal-create`**, which owns the activate/add-member/publish
245
+ paths), UI as fallback — **not** UI-only:
246
+
247
+ 1. **Live (activation)** — `SELECT Status FROM Network WHERE Id = '<site Id>'`; if `!= 'Live'`, hand off.
248
+ 2. **Member** (per Step-4 user) — `SELECT Id FROM NetworkMember WHERE NetworkId = '<site Id>' AND
249
+ MemberId = '<user Id>'`; `0` rows → hand off (add the profile/permset to Members).
250
+ 3. **Published** — `Network.Status = 'Live'` does **not** prove the pages are published (a never-published
251
+ site 404s); if it was only activated, hand off to publish.
252
+
253
+ **→ `references/site-membership-verification.md`** — exact queries, remediation, and the silent-success failure mode.
254
+
255
+ ### Step 6 — Configure Agentforce for Slack (optional; ask the user first — this is the final step)
256
+
257
+ **First, have the user verify their records show in Slack — HALT before Agentforce.** Catch a visibility
258
+ failure here rather than blame it on the agent later:
259
+
260
+ ```text
261
+ Before we (optionally) add the Agentforce agent, verify records show in Slack:
262
+ 1. In Slack → Agents & tools → Apps → search "Salesforce" → Open app.
263
+ 2. Confirm your self-service records show — Incident, Service Request, Case lists.
264
+
265
+ Reply "ok" once you see them. If a list says "Nothing turned up", the self-service permset
266
+ (ItsmPortalUelUserPermset) or email mapping isn't right — tell me and we'll fix it first.
267
+ ```
268
+
269
+ Only after the user confirms records are visible, **ask whether they also want an Agentforce agent to
270
+ reply in Slack; if not, stop here** — setup is complete without it. If yes, the Go page's *Configure
271
+ Agentforce for Slack* group has two items that make an agent actually **reply in Slack**:
272
+
273
+ - **"Build and Manage Agent"** — the agent build; **IS automatable** (delegate).
274
+ - **"Connect Agentforce to Slack"** — connection + workspace install; **UI-only** (guide).
275
+
276
+ **Ensure the agent exists first** — the **IT Service Employee Agent**. Check the org (query below); if
277
+ missing, hand off to **`service-itsm-agentic-setup-employee-agent-configure`** (provisions templates,
278
+ creates, activates), then return. (Fulfiller: `service-itsm-agentic-setup-fulfiller-agent-configure`.)
279
+
280
+ ```text
281
+ mcp__headless-360__dispatch_readonly(
282
+ method: "GET", url: "/services/data/v67.0/query",
283
+ queryParams: { "q": "SELECT Id, DeveloperName, MasterLabel FROM BotDefinition WHERE DeveloperName = 'IT_Service_Employee_Agent'" }
284
+ )
285
+ ```
286
+
287
+ **The connection is UI-only for writes — read-check state first, guide, don't fake it.** No public API
288
+ adds the Slack connection or installs the agent into a workspace. Read-check before sending the user to
289
+ Setup: **workspace connection** via Step 2's `/connect/slackbridge/connections` (`CONNECTED` ⇒ live). The
290
+ agent↔Slack link has no read — eyeball the Builder's Connections node. Then guide whatever's missing.
291
+
292
+ > **If the "+" next to Connections isn't clickable, the version is Committed (locked)** — connections add
293
+ > only on a **Draft**. Click **New Version** first; the **+** enables (version-lock, not Active/Inactive —
294
+ > deactivating does **not** unlock). After **+ → Add connection → Slack → Add to agent**: **Save → Commit
295
+ > Version → Activate**.
296
+
297
+ **→ `references/connect-agentforce-to-slack.md`** — verbatim click-paths (both sides), manage-after-install
298
+ actions, prerequisites, and the no-API evidence. Display these to the user.
299
+
300
+ ---
301
+
302
+ ## Gotchas
303
+
304
+ | Issue | Detail |
305
+ |-------|--------|
306
+ | REST preference name is `EmployeeServiceSlackEnabled`, not the Metadata name | `/setup/org/preferences/{name}` uses **`EmployeeServiceSlackEnabled`** (Metadata field `enableEmployeeServiceSlack` differs). Write access is gated (`userCanManageEmployees`) — on a non-ITSM org the PATCH may be rejected; surface the error, don't retry. |
307
+ | `SLACK_PREFERRED_SITE` org value | `orgValue` = the site's Network `Id` (`0DB...`), not `urlPathPrefix`. Read it back after writing to confirm. |
308
+ | `slackbridge/connections` is CONNECTED-only — `team: null` ≠ no connection | `GET /connect/slackbridge/connections` populates `team` **only after activation**; a pending connection reads `{team: null}` yet exists and shows in **Setup → Manage Slack Connection** (Aura-only, no REST mirror). Never report a null as "request didn't land"; say "no activated connection visible via API yet" and cross-check Setup. No approve/activate endpoint. Details: `references/manage-slack-connection.md`. |
309
+ | Version prefix required | headless-360 `dispatch`/`dispatch_readonly` don't resolve API versions — pass the full `/services/data/vXX.0/...` prefix. |
310
+ | Step 4 permset — `EmployeeSlackNotifications`, not `SlackServiceUser`; may be license-gated | Assign the employee-side **`EmployeeSlackNotifications`** (+ `ItsmPortalUelUserPermset` for self-service record visibility — Incident/Service Request/Case, not Problem/Change); `SlackServiceUser` is a fulfiller-side one that does **not** satisfy this step. Some licenses can't hold the PSL (`400 FIELD_INTEGRITY_EXCEPTION`) — hard "wrong license" stop, not retryable. Details: `references/manage-user-access.md`. |
311
+ | Step 4 API-Enabled permset — reuse or create | The user needs a permset with **API Enabled** for the Slack app to call Connect APIs. Reuse any existing API-Enabled permset the org has; if none, create a minimal Slack-named `PermissionSet` (`PermissionsApiEnabled = true`, e.g. `Slack_ApiAccess`). Details: `references/manage-user-access.md`. |
312
+ | Writes succeed but Slack shows no records → site inactive/unpublished or user not a member | `SLACK_PREFERRED_SITE` and permset writes return `200/201` even when the site is `UnderConstruction`, its pages are unpublished, or the user has **no `NetworkMember`** row — so "success" is misleading. **Step 5b** verifies three distinct states (activation `Network.Status = 'Live'`; a `NetworkMember` per Step-4 user; publication — `Live` does **not** prove pages published) before any success. Remediation is **programmatic** — hand to `experience-portal-create` (owns activate/add-member/publish), UI as fallback, not UI-only. Details: `references/site-membership-verification.md`. |
313
+
314
+ ---
315
+
316
+ ## Verification Checklist
317
+
318
+ Before emitting any user-facing summary, confirm each of the following:
319
+
320
+ - [ ] Step 1 block displayed and the user **explicitly confirmed** Part 1 was sent **before any API call**;
321
+ if not, no step ran and the user was told setup isn't done.
322
+ - [ ] Step 2 read `/connect/slackbridge/connections` **first**; `CONNECTED` → Parts 2 & 3 skipped; a
323
+ `team: null` phrased as "no activated connection visible via API yet" (+ Setup → Manage Slack Connection),
324
+ **never** "request didn't land"; Parts 2 (approve, no fake approve-API) & 3 pasted only if unconfirmed.
325
+ - [ ] Output opens with the `(via service-itsm-slack-itservice-configure)` stamp; no tooling names, error
326
+ codes, endpoints, developer names, or record Ids — names are human-readable.
327
+ - [ ] Each write ran one at a time; idempotent reads (`EmployeeServiceSlackEnabled`, `SLACK_PREFERRED_SITE`)
328
+ checked first and the write skipped when already in the desired state.
329
+ - [ ] Step 4: rows + assignments classified by `scripts/classify-user-access.mjs` (not eyeballed); **all
330
+ three core permsets always assigned** to each confirmed user — `EmployeeSlackNotifications` (not
331
+ `SlackServiceUser`), `ItsmPortalUelUserPermset`, and an API-Enabled permset (reused else created) — no
332
+ "notifications-only" scope offered; `Agent_Access` (never `Access_Agents`) only if the user wants the
333
+ agent; assigned to confirmed user(s) only; `wrong-license` surfaced, not retried.
334
+ - [ ] Step 5b ran **before any success summary**: activation (`Network.Status = 'Live'`), publication (pages
335
+ published — not implied by Live), and a `NetworkMember` per Step-4 user all confirmed (else blocking, hand
336
+ remediation to `experience-portal-create`) — not skipped on `200/201`.
337
+ - [ ] Before any Step 6 guidance: the user **confirmed their records (Incident / Service Request / Case) show
338
+ in Slack**; a "Nothing turned up" reply was fixed first. (Problem/Change staying empty is expected.)
339
+ - [ ] If Step 6 ran: **Build and Manage Agent** delegated when the agent was missing; workspace connection
340
+ read-checked; **Connect Agentforce to Slack** guided as UI-only.
341
+ - [ ] Slack-admin-side parts (Step 1 Part 1; Step 2 Part 3; Step 6 workspace install) handed to the user.
342
+
343
+ ## Reference File Index
344
+
345
+ Each step's `→` pointer names its reference:
346
+
347
+ - `references/manage-slack-connection.md` (Step 2) ·
348
+ `references/manage-user-access.md` + `references/record-visibility.md` (Step 4) ·
349
+ `references/site-membership-verification.md` (Step 5b) ·
350
+ `references/connect-agentforce-to-slack.md` (Step 6).
351
+ - `scripts/classify-user-access.mjs` — `flag-users` tags User rows; `classify-assignment` classifies a
352
+ `PermissionSetAssignment` POST as `success`/`wrong-license`/`other-error`.
353
+
354
+ ---
355
+
356
+ ## Related Skills
357
+
358
+ | Skill | When to use instead / alongside |
359
+ |-------|---------------------------------|
360
+ | `service-itsm-agentic-setup-employee-agent-configure` | Builds/activates the IT Service **Employee** Agent connected in Step 6; delegated to. |
361
+ | `service-itsm-agentic-setup-fulfiller-agent-configure` | Builds/activates the **Fulfiller** Agent — alternative Step 6 agent. |
362
+ | `experience-portal-create` | Creates the employee Digital Experience portal this skill selects. |
363
+ | `service-itsm-channels-coordinate` | Top-level menu across ITSM channels — Slack, Swarming, Notifications, Portal. |
@@ -0,0 +1,159 @@
1
+ # Connect Agentforce to Slack — verbatim click-paths (Step 6)
2
+
3
+ The "Connect Agentforce to Slack" flow is **UI-only** — verified live against a real org: there is
4
+ **no public Salesforce API** to add a Slack connection to an agent or to install the agent into a Slack
5
+ workspace. Specifically:
6
+
7
+ - the Agentforce Studio *Connections* wizard exposes no `connect/.../connections` or `.../channels`
8
+ Connect route (probed live: `connect/bots/{id}/connections` `404`, and previously
9
+ `connect/bot-versions/{id}/channels`, `nextgen-authoring/bundles/{id}/connections`
10
+ `404`/`METHOD_NOT_ALLOWED`);
11
+ - the next-gen authoring SOR (`next-gen-authoring-connect-api`, bundle create/version/publish only)
12
+ has **no** connect-to-channel operation, and the bundle-version detail
13
+ (`GET /nextgen-authoring/bundle-versions/{id}`) carries **no** connections field;
14
+ - the `slackbridge-connect-api` SOR is runtime messaging + user-mapping reads only (no
15
+ agent-connection or workspace-install op), and `GET /connect/agentforce-agent-info?agentType=…`
16
+ returns only runtime routing (bot-runtime URL, region, tenant) — no channel wiring;
17
+ - the connection **link itself is not even API-readable**: its Slack-package backing entities
18
+ (`ConversationSlackApplication`, `SlackAppConversationEvent`, `ConversationDefinitionChannelProvider`)
19
+ are catalog-visible in `EntityDefinition` but `INVALID_TYPE` on both Data and Tooling query/describe.
20
+ Agent *internals* ARE readable — `BotDefinition`, `BotVersion` (Data API only; `INVALID_TYPE` on
21
+ Tooling), `GenAiPlannerDefinition` (unfiltered query, match `LinkedBotVersionId` client-side) — so a
22
+ headless caller can confirm the agent exists and is Active, but cannot see or set its Slack connection.
23
+
24
+ So the skill **guides** the user through the clicks below. (Building/activating the agent itself IS
25
+ automatable — that is delegated to `service-itsm-agentic-setup-employee-agent-configure`; only the
26
+ Slack connection + workspace install are manual.) Do **not** claim the skill performed any of these.
27
+
28
+ ## Salesforce side — create the agent↔Slack connection
29
+
30
+ Source: Slack Help, "Set up and manage Agentforce in Slack." Two paths depending on the builder.
31
+
32
+ ### A) New Agentforce Studio (recommended)
33
+
34
+ 1. Open the App Launcher and go to **Agentforce Studio → Agents**.
35
+ 2. Select your **IT Service Employee Agent** to open the Agentforce Builder.
36
+ 3. **Check the version state (top-left, next to the agent name).** You can only add a connection on
37
+ a **Draft** version — the **+** is **disabled on a Committed version** (a committed version is
38
+ read-only). If it reads **"Version N (Committed)"**, click **New Version** (top-right) first; the
39
+ builder switches to **"Version N+1 (Draft)"** and the **+** becomes clickable.
40
+ - This is version-lock, **not** an Active/Inactive issue — deactivating the agent does **not**
41
+ unlock the **+** (Active/Inactive = whether it serves live; Committed/Draft = whether it's
42
+ editable). Only creating a new Draft version unlocks it.
43
+ 4. In the **Explorer** sidebar, expand **Connections**, click the **+** (plus) button, then
44
+ **Add connection**.
45
+ 5. Choose **Slack**, then click **Add to agent** — the panel confirms *"This agent is now available
46
+ in Slack"* and a **Slack** node appears under Connections.
47
+ 6. **Save** (top-right), then **Commit Version**, then **Activate**. Activate both publishes the
48
+ connection and (re)brings the agent online — if you deactivated it earlier, this is what restores
49
+ it, now with Slack attached.
50
+
51
+ ### B) Legacy agent builder (only if not on new Studio)
52
+
53
+ 1. **Setup** → search **"Agents"** → open your agent → **Connections** tab → **Add**.
54
+ 2. Under **Connection**, select the **API** dropdown; enter a unique **integration name**.
55
+ 3. Under **Connected app**, select **Slack**, then **Save**.
56
+
57
+ ## Slack admin side — install the agent into the workspace
58
+
59
+ No Salesforce API — done in Slack.
60
+
61
+ - **Pro / Business+:** **Admin → Manage Agentforce** → next to the agent, **Review agent** → review
62
+ permissions → **Install agent**.
63
+ - **Enterprise:** **Home** → your org name → **Tools & settings → Organisation settings →
64
+ Salesforce → Agentforce** → **Review Agent** → **Install agent** → tick the workspace(s) →
65
+ **Add to workspaces**.
66
+
67
+ ## Grant a user access to use the agent (Salesforce API — automatable)
68
+
69
+ For an **Employee Agent**, Slack's *"Who can use this agent?"* shows **"Managed in Salesforce"** — so
70
+ member access is a **Salesforce permission-set grant**, not a Slack setting. It IS automatable, and the
71
+ gating permset is discoverable by reverse-lookup (verified live against a real org):
72
+
73
+ 1. **Find which permset gates THIS agent** — the grant is a `SetupEntityAccess` row keyed to the agent's
74
+ **BotDefinition** (channel-agnostic: one row covers every channel the agent is on). Query it on the
75
+ **Data API** (Tooling rejects `SetupEntityAccess` as `INVALID_TYPE`):
76
+ ```text
77
+ dispatch_readonly GET /services/data/v67.0/query
78
+ q: SELECT Id, ParentId, Parent.Name FROM SetupEntityAccess WHERE SetupEntityId = '<BotDefinition Id>'
79
+ ```
80
+ `Parent.Name` is the permset to assign (e.g. `Agent_Access` / "Agent Access"). Don't trust the permset
81
+ *name/description* — the grant covers Slack regardless of what earlier setup named it.
82
+ - **If this returns ZERO rows, no permset grants the agent yet** — expected when the agent hasn't had an
83
+ access permset provisioned. Create one, then grant it the BotDefinition access:
84
+ ```text
85
+ dispatch POST /services/data/v67.0/sobjects/PermissionSet
86
+ body: {"Name": "Agent_Access", "Label": "Agent Access"}
87
+ dispatch POST /services/data/v67.0/sobjects/SetupEntityAccess
88
+ body: {"ParentId": "<new permset Id>", "SetupEntityId": "<BotDefinition Id>"}
89
+ ```
90
+ `SetupEntityId` MUST be the **BotDefinition** id (`0Xx…`), NOT the GenAiPlannerDefinition (`16j…`).
91
+ Do **not** send `SetupEntityType` — it's not insertable; the platform auto-resolves it from the id prefix.
92
+ 2. **Check if the user already has it, then assign:**
93
+ ```text
94
+ dispatch POST /services/data/v67.0/sobjects/PermissionSetAssignment
95
+ body: {"AssigneeId": "<User Id>", "PermissionSetId": "<permset Id from step 1>"}
96
+ ```
97
+
98
+ > **Trap — do NOT assign the broad "Access Agents" (`Access_Agents`) permset to an employee end-user.**
99
+ > It fails: *"user license doesn't allow the permission: View Setup Audit Trail."* Assign the narrow
100
+ > per-agent **"Agent Access"** permset from step 1 instead — it carries the BotDefinition grant without
101
+ > dragging in setup-admin perms.
102
+
103
+ Access also requires the Slack member to be **mapped to a Salesforce user** (see Prerequisites) — the
104
+ permset grant + the Slack↔SF mapping together let that person invoke the agent in Slack.
105
+
106
+ ### Pre-flight: will the agent actually reply? (mapping read — headless, verified live)
107
+
108
+ The single most common "agent stays silent" cause is a **missing Slack↔Salesforce user mapping**. There is
109
+ **no Salesforce/headless write API** to set it (probed live: `slackbridge-connect-api` exposes only a *read*
110
+ `GET .../team/{teamId}/user-mappings`; `slack-connect-api` is reCAPTCHA + Web-to-Lead only; no POST route
111
+ anywhere) — the mapping is set **Slack-admin-side only**. But you CAN read whether the *current* Slack user
112
+ is mapped, and should do so before telling the user the agent is ready:
113
+
114
+ ```text
115
+ dispatch_readonly GET /services/data/v67.0/connect/slackbridge/connections
116
+ ```
117
+ - `currentUserMapping.salesforceUserId != null` ⇒ the session's Slack user is mapped — the agent can reply.
118
+ - `currentUserMapping.salesforceUserId == null` ⇒ **NOT mapped** — the agent will stay silent no matter how
119
+ the permset/connection are set. Send the user to do the Slack-side mapping (below), then re-read to confirm.
120
+ - `team.status` also confirms the workspace is `CONNECTED` and gives `teamId` + `teamDomain`.
121
+
122
+ > **Enterprise Grid vs single workspace — the mapping lives in a different Slack menu, and the SF-side
123
+ > mapping-table read can 404.** If `teamDomain` ends in `.enterprise.slack.com` (Enterprise Grid), the
124
+ > `connections` read returns the **grid-org id** (`E…` prefix), not a workspace `teamId` (`T…`). The bulk
125
+ > read `GET .../team/{teamId}/user-mappings` then **404s** with the grid-org id (no workspace teamId is
126
+ > surfaced), so fall back to the `currentUserMapping` read above for verification. Grid also changes WHERE
127
+ > the admin maps users: **Organisation settings**, not **Workspace settings** (see below).
128
+
129
+ ## Manage the agent after install (Slack admin)
130
+
131
+ No Salesforce API — done in Slack, after the agent is installed. Source: Slack Help,
132
+ "Set up and manage Agentforce in Slack."
133
+
134
+ - **Edit the agent profile:** **Agentforce → "Managed by you"** → the agent's **three dots (⋯)** →
135
+ **View agent profile → Edit** — update profile picture, suggested prompts, or agent managers.
136
+ - **Remove from a workspace:** **Manage agent → Manage → Remove from a workspace**.
137
+ - **Uninstall from the org:** **Manage agent → Manage → Uninstall from your organisation**.
138
+
139
+ These are teardown/maintenance actions — only walk the user through them if they explicitly ask to
140
+ change, remove, or uninstall an already-installed agent. They are not part of first-time setup.
141
+
142
+ ## Prerequisites (from the Slack Help doc)
143
+
144
+ - Salesforce org with an **Agentforce** license; Slack workspace on **Pro / Business+ / Enterprise**.
145
+ - Salesforce **admin** access for the setup steps.
146
+ - Slack members need Salesforce accounts or provisional licenses; map users on the **Slack side**
147
+ (no Salesforce write API exists for this — see the Pre-flight section above):
148
+ - **Single workspace (Pro / Business+):** Slack **Admin → Workspace settings → Salesforce → Users**
149
+ → **Add individually** / **Add by CSV**.
150
+ - **Enterprise Grid** (`teamDomain` ends `.enterprise.slack.com`): Slack **org name (top-left) →
151
+ Tools & settings → Organisation settings → Salesforce → Users** → **Add individually** /
152
+ **Add by CSV**. (The `connections` read returns the grid-org `E…` id here, so verify the mapping
153
+ via `currentUserMapping` rather than the bulk `team/{teamId}/user-mappings` read, which 404s.)
154
+
155
+ The base Salesforce↔Slack connection is Steps 1–2 of the main skill.
156
+ - The Slack Help doc recommends building the agent from a **Slack pre-made template** and adding the
157
+ **"General Slack actions"** subagent. The ITSM employee/fulfiller builder skills create the agent
158
+ from the **ITSM** template instead — if the user specifically wants the Slack-optimized template or
159
+ the General Slack actions subagent, that is authored in Agentforce Studio, outside these skills.
@@ -0,0 +1,88 @@
1
+ # Manage Slack Connection — status read (API) + approval (UI)
2
+
3
+ The Salesforce-side half of the Slack↔Salesforce connection. **Status is readable via API; approval
4
+ is not.** Headless users have no Setup UI, so always read status via API first rather than sending
5
+ them to Setup blind.
6
+
7
+ ## Read connection status (API — do this every run)
8
+
9
+ ```text
10
+ mcp__headless-360__dispatch_readonly(
11
+ method: "GET",
12
+ url: "/services/data/v67.0/connect/slackbridge/connections"
13
+ )
14
+ ```
15
+
16
+ Returns the live state (verified `200`):
17
+
18
+ ```json
19
+ {
20
+ "team": {
21
+ "status": "CONNECTED",
22
+ "teamName": "Slackfarm 1473",
23
+ "teamDomain": "https://slackfarm-1473.enterprise.slack.com",
24
+ "teamId": "E0…"
25
+ },
26
+ "currentUserMapping": { "salesforceUserId": "005…", "slackUserId": "U0…" }
27
+ }
28
+ ```
29
+
30
+ Translate `team.status` to plain language:
31
+
32
+ - **`CONNECTED`** → workspace already approved and live. Name it by `teamName`; **skip the approval
33
+ walkthrough** and move on. A `null` `currentUserMapping.salesforceUserId` means *this* user isn't
34
+ mapped to a Slack user yet — mention it, but it doesn't block the connection.
35
+ - **`team: null` / not-connected / call errors** → **no *activated* connection is visible via API yet.**
36
+ This endpoint populates `team` **only** once the connection reaches `CONNECTED` (activated, Slack Part
37
+ 3); during the requested/pending window it returns `{team: null}` **even though the connection exists**.
38
+ A null is therefore *indeterminate*, **not** proof the request is absent — **never** tell the user it
39
+ "didn't land" or "isn't on the Salesforce side". The pending/requested connection is visible only in
40
+ **Setup → Manage Slack Connection** (`/lightning/setup/SlackWorkspaces/home`), an Aura-backed page with
41
+ **no** public Connect/REST mirror (verified: `slackbridge/connections` is CONNECTED-only; the
42
+ `slack-connect-api` Connect surface is reCAPTCHA/Web-to-Lead only — neither lists pending connections).
43
+ Report "no activated connection visible via API yet", point the user at that Setup page to confirm the
44
+ pending state, then run the guided approval below.
45
+
46
+ **Limits of the API here:** `/connect/slackbridge/connections` only *reads*. There is **no**
47
+ approve/activate write endpoint. The sibling `/connect/slackbridge/team/{teamId}/user-mappings` route
48
+ `404`s in a verified org — rely on `/connections`. The `SlackTeam` / `SlackAppAuthorization` /
49
+ `SlackTeamUserAuthorization` entities show `IsQueryable:true` in `EntityDefinition` but return
50
+ `INVALID_TYPE "not supported"` on both the Data and Tooling `query`/`describe` (Slack-package internal
51
+ entities) — do **not** try to SOQL them. `/connect/slack*` (non-bridge) is only reCAPTCHA keys +
52
+ Web-to-Lead settings, not connection management.
53
+
54
+ ## Approve the connection (guided UI — no API)
55
+
56
+ Point the user to (substitute their My Domain host):
57
+
58
+ ```text
59
+ https://<myDomain>.salesforce-setup.com/lightning/setup/SlackWorkspaces/home
60
+ ```
61
+
62
+ or **Setup → Manage Slack Connection**. Then:
63
+
64
+ 1. Find the pending connection (Status *"Waiting for approval"* / similar).
65
+ 2. Under **User Account Mapping / User configuration**, select the **Salesforce Mapping Field**.
66
+ **Default to `Email`** (matches `User.Email` to the Slack user's email — simplest, most common)
67
+ unless the org authenticates via SAML SSO, in which case **`SAML NameID`** is the stable link. If
68
+ unsure for a SAML org, ask — do not guess.
69
+ 3. Tick terms-and-conditions, then **Approve**.
70
+
71
+ After approval the connection shows **Approved Connection** with the chosen mapping (e.g. *Email →
72
+ email*), then typically reads **"Waiting for activation by Slack admin"** — that's part 3, the final
73
+ Slack-side activation. Display this verbatim (Owners / Salesforce-admin system role in Slack can
74
+ activate):
75
+
76
+ ```text
77
+ Last part — activate the connection back in Slack (Slack desktop app):
78
+ 1. Click your workspace name in the sidebar.
79
+ 2. Hover over Tools & settings, then click Manage Salesforce organisations.
80
+ 3. Select the pending connection.
81
+ 4. Review the connection details, then click Activate.
82
+ ```
83
+
84
+ The Salesforce side is done once **Approved**; the Slack-side activation is the user's to perform.
85
+
86
+ > **No approve-API — do not fake it.** Reading status via `/connect/slackbridge/connections` is real;
87
+ > approving the connection and setting the org-wide mapping field are genuinely UI-only. Navigate the
88
+ > user there and hand them the exact clicks — don't invent a `/connect/slack…` approve call.