@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.
- package/package.json +1 -1
- package/skills/automation-flow-generate/SKILL.md +32 -43
- package/skills/experience-portal-create/SKILL.md +497 -0
- package/skills/experience-portal-create/assets/report-template.md +30 -0
- package/skills/experience-portal-create/references/mcp-invocation.md +288 -0
- package/skills/experience-portal-create/references/post-creation-activate-publish.md +165 -0
- package/skills/experience-portal-create/references/templates.md +253 -0
- package/skills/experience-ui-bundle-features-generate/SKILL.md +5 -1
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -0
- package/skills/experience-ui-bundle-frontend-generate/references/page.md +1 -0
- package/skills/platform-datamask-run/SKILL.md +345 -0
- package/skills/platform-datamask-run/references/api-surface.md +130 -0
- package/skills/platform-datamask-run/references/policy-authoring.md +185 -0
- package/skills/platform-datamask-run/references/run-and-abort.md +116 -0
- package/skills/platform-datamask-run/scripts/poll-job.sh +115 -0
- package/skills/platform-dataspace-access-configure/SKILL.md +51 -3
- package/skills/platform-dataspace-access-configure/scripts/inspect-dataspace-scopes.sh +56 -0
- package/skills/platform-lightning-type-widget-coordinate/references/build-plan-format.md +1 -0
- package/skills/platform-sandbox-configure/SKILL.md +17 -2
- package/skills/platform-trial-org-create/SKILL.md +175 -0
- package/skills/platform-trial-org-create/examples/create_request.json +9 -0
- package/skills/platform-trial-org-create/examples/error_response.json +41 -0
- package/skills/platform-trial-org-create/examples/success_response.json +27 -0
- package/skills/platform-trial-org-create/references/error_codes.md +42 -0
- package/skills/platform-trial-org-create/references/signup_request_fields.md +69 -0
- package/skills/platform-trial-org-create/scripts/create_signup_request.sh +175 -0
- package/skills/platform-trial-org-create/scripts/get_signup_request.sh +155 -0
- package/skills/platform-widget-generate/SKILL.md +47 -6
- package/skills/platform-widget-generate/examples/conditional.json +3 -3
- package/skills/platform-widget-generate/examples/list-with-foreach.json +2 -2
- package/skills/platform-widget-generate/examples/single-object.json +2 -2
- package/skills/platform-widget-generate/references/widget-bundle-layout.md +1 -1
- package/skills/service-agentforce-channel-configure/SKILL.md +271 -0
- package/skills/service-agentforce-channel-configure/references/agent-wiring.md +97 -0
- package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +145 -0
- package/skills/service-agentforce-channel-configure/references/channel-branch-voice.md +69 -0
- package/skills/service-agentforce-channel-configure/references/channel-types.md +61 -0
- package/skills/service-agentforce-channel-configure/references/live-traffic-gate.md +86 -0
- package/skills/service-agentforce-channel-configure/references/queue-resolution.md +135 -0
- package/skills/service-agentforce-channel-configure/references/routing-flow.md +384 -0
- package/skills/service-catalog-template-deploy/SKILL.md +310 -0
- package/skills/service-catalog-template-deploy/references/cli-invocation.md +258 -0
- package/skills/service-catalog-template-deploy/scripts/activate-verify.mjs +164 -0
- package/skills/service-catalog-template-deploy/scripts/build-deploy-payload.mjs +94 -0
- package/skills/service-catalog-template-deploy/scripts/resolve-template.mjs +331 -0
- package/skills/service-catalog-template-search/SKILL.md +212 -0
- package/skills/service-catalog-template-search/references/cli-invocation.md +128 -0
- package/skills/service-catalog-template-search/scripts/classify-catalog.mjs +205 -0
- package/skills/service-concierge-portal-generate/SKILL.md +126 -0
- package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1428 -0
- package/skills/service-digital-engagement-channel-configure/SKILL.md +46 -6
- package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +2 -1
- package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +4 -1
- package/skills/service-helpagent-coordinate/README.md +8 -2
- package/skills/service-helpagent-coordinate/SKILL.md +126 -130
- package/skills/service-helpagent-coordinate/assets/help-agent-spec.md +70 -53
- package/skills/service-helpagent-coordinate/references/agent-script.md +571 -457
- package/skills/service-helpagent-coordinate/references/channel-voice.md +38 -9
- package/skills/service-helpagent-coordinate/references/channel-web-chat.md +173 -49
- package/skills/service-helpagent-coordinate/references/output-report-format.md +126 -0
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +153 -0
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +79 -0
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +35 -0
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +271 -0
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/references/cli-invocation.md +265 -0
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/classify-enable-plan.mjs +220 -0
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/classify-final-report.mjs +102 -0
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/record-enable-result.mjs +73 -0
- package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +206 -0
- package/skills/service-itsm-agentic-setup-agentforce-studio-validate/references/cli-invocation.md +194 -0
- package/skills/service-itsm-agentic-setup-agentforce-studio-validate/scripts/classify-readiness.mjs +223 -0
- package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +45 -7
- package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +45 -5
- package/skills/service-itsm-agentic-setup-configure/SKILL.md +116 -0
- package/skills/service-itsm-agentic-setup-configure/examples/output-templates.md +64 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +158 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/cli-invocation.md +361 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/error-taxonomy.md +44 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/reactivation.md +66 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +66 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/specialized-templates.md +148 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +169 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/build-create-body.mjs +116 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-agent-existence.mjs +185 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-preflight.mjs +168 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/create-scratch-dir.mjs +58 -0
- package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +197 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +186 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/action-availability.md +51 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/cli-invocation.md +345 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/error-taxonomy.md +44 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/reactivation.md +63 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +44 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +149 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/build-create-body.mjs +110 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-action-availability.mjs +201 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-activate-result.mjs +135 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-agent-existence.mjs +194 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-preflight.mjs +158 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/create-scratch-dir.mjs +58 -0
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +191 -0
- package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +133 -0
- package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +71 -0
- package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +308 -0
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +23 -0
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +193 -0
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +57 -0
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +394 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +266 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/cli-invocation.md +106 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/helper-contracts.md +142 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/permset-topology.md +82 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-action-surface.mjs +137 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-assignment-state.mjs +99 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-permset-availability.mjs +120 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/resolve-target-user.mjs +86 -0
- package/skills/service-itsm-agentic-setup-uel-user-create/SKILL.md +284 -0
- package/skills/service-itsm-agentic-setup-uel-user-create/references/mcp-invocation.md +302 -0
- package/skills/service-itsm-channels-coordinate/SKILL.md +472 -0
- package/skills/service-itsm-incident-mgmt-configure/SKILL.md +212 -0
- package/skills/service-itsm-incident-mgmt-configure/references/mcp-invocation.md +225 -0
- package/skills/service-itsm-incident-priority-configure/SKILL.md +53 -12
- package/skills/service-itsm-swarming-configure/SKILL.md +212 -0
- package/skills/service-itsm-teams-configure/SKILL.md +395 -0
- package/skills/service-itsm-teams-configure/references/azure-credential-population.md +213 -0
- package/skills/service-itsm-teams-configure/references/gotchas.md +23 -0
- package/skills/service-itsm-teams-coordinate/SKILL.md +175 -0
- package/skills/service-itsm-teams-coordinate/examples/output-templates.md +85 -0
- package/skills/service-itsm-teams-debug/SKILL.md +144 -0
- package/skills/service-itsm-teams-debug/references/configuration-checklists.md +277 -0
- package/skills/service-itsm-teams-debug/references/report-generation.md +95 -0
- package/skills/service-itsm-teams-employee-agent-configure/SKILL.md +139 -0
- package/skills/service-itsm-teams-employee-agent-configure/assets/Teams_AgentForce.EmbeddedServiceConfig-meta.xml +43 -0
- package/skills/service-itsm-teams-employee-agent-configure/references/teams-embedded-employee-agent.md +480 -0
- package/skills/service-itsm-teams-itdesk-configure/SKILL.md +232 -0
- package/skills/service-itsm-teams-itservice-configure/SKILL.md +391 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# MCP Invocation Reference
|
|
2
|
+
|
|
3
|
+
Every operation in this skill dispatches through the **headless-360** MCP server. Do **not**
|
|
4
|
+
use the Salesforce CLI (its `api request`, `data query`, or `org open` subcommands), the
|
|
5
|
+
project-codey MCP server, raw `curl`, or any other HTTP client. headless-360 is the only
|
|
6
|
+
execution path.
|
|
7
|
+
|
|
8
|
+
## Tools
|
|
9
|
+
|
|
10
|
+
- `mcp__headless-360__discover` — search the indexed API/SOR corpus by natural language query (preflight/discovery). Optional `domain` and `resultType` (`endpoint` | `sor`) filters.
|
|
11
|
+
- `mcp__headless-360__describe` — pull full detail for a specific operation or Setup Operation Recipe (SOR) by id. The returned `path` (or a SOR step's `api`) is dispatch-ready — copy it verbatim.
|
|
12
|
+
- `mcp__headless-360__dispatch_readonly` — GET-only dispatcher. **Prefer this for all reads.**
|
|
13
|
+
- `mcp__headless-360__dispatch` — dispatcher for all methods (GET/POST/PUT/PATCH/DELETE). Use for writes.
|
|
14
|
+
|
|
15
|
+
`dispatch` / `dispatch_readonly` accept:
|
|
16
|
+
|
|
17
|
+
| Field | Notes |
|
|
18
|
+
|-------|-------|
|
|
19
|
+
| `method` | `"GET"`, `"POST"`, `"PATCH"`, … (`dispatch_readonly` only accepts `"GET"`) |
|
|
20
|
+
| `url` | The relative API path, **including** the `/services/data/vXX.0` prefix — e.g. `"/services/data/v67.0/connect/communities"`. Unlike some other dispatchers, headless-360 does **not** resolve or add the version — passing a bare `"/connect/communities"` returns `400 ROUTE_NOT_FOUND`. |
|
|
21
|
+
| `body` | JSON object for POST/PATCH |
|
|
22
|
+
| `queryParams` | map of key-value pairs for GET query strings |
|
|
23
|
+
| `headers` | optional HTTP headers |
|
|
24
|
+
|
|
25
|
+
Send the `url` exactly as returned by `discover`/`describe` when available — do not edit it or
|
|
26
|
+
prepend a host. When `discover`/`describe` don't surface the operation (common for standard
|
|
27
|
+
Connect API create/list calls on Experience Cloud — see "Discovery" below), dispatch the
|
|
28
|
+
well-known, versioned path documented in this skill directly.
|
|
29
|
+
|
|
30
|
+
Credentials are handled by whichever org the headless-360 MCP session is bound to at connection
|
|
31
|
+
time — **the skill never handles credentials, tokens, or login URLs.** If a call returns an auth
|
|
32
|
+
error, tell the user to re-authenticate the org the MCP session is pointed at — do not attempt to
|
|
33
|
+
fetch a token yourself.
|
|
34
|
+
|
|
35
|
+
## Response envelope
|
|
36
|
+
|
|
37
|
+
`dispatch` / `dispatch_readonly` return the org's raw Connect API response merged with a wrapper:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{ "status_code": 202, "body": { "jobId": "08P...", "message": "...", "name": "..." }, "url": "https://<org-host>/services/data/v67.0/connect/communities" }
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`body` is the controller payload. Status codes: `200`/`202` = success, `400` = bad body/route (re-check
|
|
44
|
+
the `url` version prefix and body shape), `404` = endpoint not in this org, `500` = downstream
|
|
45
|
+
dependency missing. Errors from the underlying org come back as
|
|
46
|
+
`{"error_code": "...", "message": "...", "status_code": 400/...}` (e.g. `ROUTE_NOT_FOUND`,
|
|
47
|
+
`INVALID_TYPE`, `INVALID_INPUT`) — read `error_code` and `message` to diagnose.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Discovery — run first each session (optional but recommended)
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
mcp__headless-360__discover(query="create self-service Experience Cloud site")
|
|
55
|
+
mcp__headless-360__discover(query="create Experience Cloud community site from template")
|
|
56
|
+
mcp__headless-360__discover(query="create partner PRM portal site")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Known limitation (verified):** the headless-360 corpus indexes many capabilities as multi-step
|
|
60
|
+
SORs (Setup Operation Recipes) covering *management* of an already-existing community (topics,
|
|
61
|
+
navigation menus, branding, sharing sets, etc.), not the base `POST /connect/communities` /
|
|
62
|
+
`GET /connect/communities/templates` create/list calls themselves. Those two operations are
|
|
63
|
+
**not** individually resolvable via `discover`/`describe` in this corpus at time of writing — a
|
|
64
|
+
`describe` call for ids like `chatter.connect.api.postCommunityCollection` or
|
|
65
|
+
`post-community-collection` returns `"No operation or SOR found for id: ..."`, even though the
|
|
66
|
+
*guidance text* inside the `chatter-connect-api` SOR describe output mentions
|
|
67
|
+
`post-community-collection` in a documentation string (not as an actual indexed step).
|
|
68
|
+
|
|
69
|
+
**Do not conclude the capability is missing from the org.** These are standard, long-lived
|
|
70
|
+
Connect API endpoints (available since API v46.0+/v48.0+ per Salesforce docs) — dispatch them
|
|
71
|
+
directly using the verified paths below rather than falling back to the `sf` CLI or declaring "no
|
|
72
|
+
tool connects to a live org."
|
|
73
|
+
|
|
74
|
+
The stable, **verified-working** paths at time of writing (confirmed live against a test org):
|
|
75
|
+
|
|
76
|
+
| Purpose | Method | Path (verified) |
|
|
77
|
+
|---------|--------|------------------|
|
|
78
|
+
| List valid community templates | GET | `/services/data/v67.0/connect/communities/templates` |
|
|
79
|
+
| List existing Experience Cloud sites | GET | `/services/data/v67.0/connect/communities` |
|
|
80
|
+
| Create a general community from a template | POST | `/services/data/v67.0/connect/communities` |
|
|
81
|
+
| Employee/self-service Aura (or LWR) site + MIAW | POST | `/services/data/v67.0/connect/self-service/site` |
|
|
82
|
+
| Poll self-service site job | GET | `/services/data/v67.0/connect/self-service/site/status/{jobId}` |
|
|
83
|
+
| Partner (PRM) portal — synchronous | POST | `/services/data/v67.0/connect/prm/setup/sites` |
|
|
84
|
+
| Poll a community-create `BackgroundOperation` job | GET | `/services/data/v67.0/query?q=SELECT+Id,+Status+FROM+BackgroundOperation+WHERE+Id='<jobId>'` |
|
|
85
|
+
| Create the Agentforce employee agent (optional) | PATCH | `/services/data/v67.0/headless/invoke/einstein/genai-agentbuilder/create-copilot-from-template` |
|
|
86
|
+
| List service-agent templates for the AI-portal editor | GET | `/services/data/v67.0/headless/invoke/platform/communities/unified-aiportal-setup/get-service-agent-templates` |
|
|
87
|
+
|
|
88
|
+
If `discover` surfaces a different/newer operation id for one of these, prefer the `path` it
|
|
89
|
+
returns (already dispatch-ready) over the hardcoded table above — the table is a fallback, not a
|
|
90
|
+
canonical override.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Routes
|
|
95
|
+
|
|
96
|
+
### Employee Service / Self-Service — `POST /connect/self-service/site`
|
|
97
|
+
|
|
98
|
+
Creates an **Aura** (or LWR) Experience Builder site and wires MIAW in at creation time. Requires a
|
|
99
|
+
**guest** Embedded Service Deployment config id.
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
method: "POST"
|
|
103
|
+
url: "/services/data/v67.0/connect/self-service/site"
|
|
104
|
+
body:
|
|
105
|
+
{
|
|
106
|
+
"siteName": "<portal name>",
|
|
107
|
+
"siteType": "AURA", // AURA (default) or LWR — never Visualforce
|
|
108
|
+
"guestEmbeddedServiceConfigId": "<guest ESD id>",// REQUIRED
|
|
109
|
+
"embeddedServiceConfigId": "<auth ESD id>", // optional
|
|
110
|
+
"enableForGuest": true
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Response: `{success, siteName, urlPathPrefix, siteUrl, error, jobId, status}`. Poll with the status
|
|
115
|
+
route below.
|
|
116
|
+
|
|
117
|
+
> No guest ESD yet? The self-service API **hard-requires** `guestEmbeddedServiceConfigId`. Either
|
|
118
|
+
> create an Embedded Service Deployment first (Setup → Embedded Service Deployments, or the
|
|
119
|
+
> MIAW/embedded-service setup skill), **or** use the general-community route with an Aura template
|
|
120
|
+
> (`Employee Portal`, `Customer Service`, or `Help Center`) — which needs no ESD.
|
|
121
|
+
|
|
122
|
+
Poll job:
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
method: "GET"
|
|
126
|
+
url: "/services/data/v67.0/connect/self-service/site/status/{jobId}" // substitute the jobId into the path
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### General Community — `POST /connect/communities`
|
|
130
|
+
|
|
131
|
+
No ESD dependency. Use an **Experience Builder** `templateName` (Aura or LWR), validated against the
|
|
132
|
+
live template list.
|
|
133
|
+
|
|
134
|
+
First, list templates:
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
method: "GET"
|
|
138
|
+
url: "/services/data/v67.0/connect/communities/templates"
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Verified response shape (from a live test org):
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"templates": [
|
|
145
|
+
{ "publisher": "Salesforce", "templateName": "Build Your Own" },
|
|
146
|
+
{ "publisher": "Salesforce", "templateName": "Help Center" },
|
|
147
|
+
{ "publisher": "Salesforce", "templateName": "Customer Account Portal" },
|
|
148
|
+
{ "publisher": "Salesforce", "templateName": "Customer Service" },
|
|
149
|
+
{ "publisher": "Salesforce", "templateName": "Agentforce Employee Center" },
|
|
150
|
+
{ "publisher": "Salesforce", "templateName": "Build Your Own (LWR)" },
|
|
151
|
+
{ "publisher": "Salesforce", "templateName": "Salesforce Tabs + Visualforce" }
|
|
152
|
+
],
|
|
153
|
+
"total": 11
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
Use a returned `templateName` **verbatim**. For an employee service portal prefer `Agentforce Employee Center`
|
|
157
|
+
(if present) — the richest employee experience (ticketing, catalog, knowledge, Agentforce-ready) —
|
|
158
|
+
else `Employee Portal`, else `Customer Service`; for a knowledge/help desk prefer `Help Center`. Never
|
|
159
|
+
use `Salesforce Tabs + Visualforce` — it is the legacy Visualforce site with no Builder.
|
|
160
|
+
|
|
161
|
+
Create (the body accepts only `name`, `description`, `templateName`, `templateParams`, `urlPathPrefix`):
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
method: "POST"
|
|
165
|
+
url: "/services/data/v67.0/connect/communities"
|
|
166
|
+
body:
|
|
167
|
+
{
|
|
168
|
+
"name": "<portal name>",
|
|
169
|
+
"urlPathPrefix": "<alphanumeric only, no spaces or hyphens>",
|
|
170
|
+
"templateName": "Agentforce Employee Center",
|
|
171
|
+
"description": "<optional>"
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Response (verified, `202`): `{jobId, message, name}`, e.g.:
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"jobId": "08PSB000023cP5t2AE",
|
|
179
|
+
"message": "Your site is almost ready. To track the site creation status, query the BackgroundOperation object and enter the jobId as the Id.",
|
|
180
|
+
"name": "GK Portal v2"
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
Poll `BackgroundOperation` (see below).
|
|
184
|
+
|
|
185
|
+
> Duplicate names return `400 INVALID_INPUT "Enter a different name. That one already exists."` —
|
|
186
|
+
> list existing sites with `GET /services/data/v67.0/connect/communities` and pick a non-colliding name/prefix.
|
|
187
|
+
|
|
188
|
+
#### Agentforce assistant for `Agentforce Employee Center` (optional, separate step)
|
|
189
|
+
|
|
190
|
+
The community-create call provisions the **site** only. To add the embedded **Agentforce**
|
|
191
|
+
conversational assistant, create the internal employee agent from its shipped template — this is a
|
|
192
|
+
distinct call and is not required to stand up the portal:
|
|
193
|
+
|
|
194
|
+
```text
|
|
195
|
+
method: "PATCH"
|
|
196
|
+
url: "/services/data/v67.0/headless/invoke/einstein/genai-agentbuilder/create-copilot-from-template"
|
|
197
|
+
body:
|
|
198
|
+
{
|
|
199
|
+
"templateNameOrId": "EmployeeCopilot__AgentforceEmployeeAgent",
|
|
200
|
+
"copilotContext": { "name": "<agent label>", "company": "<company name>", "newAgentUser": true }
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
- `copilotContext.company` is **required** — omitting it returns `500 CONTROLLER_ERROR "Company is Mandatory in Agents"` (`companyName` is a separate, non-substitute field).
|
|
205
|
+
- The agent is created **`Inactive`** (v1 version) and must be activated and wired to the site's channel afterward. `newAgentUser: true` auto-provisions a runtime user.
|
|
206
|
+
- Full Agentforce configuration (activation, channel wiring, permissions) is broad and out of scope for this skill — this skill provisions the site and points to the agent template above.
|
|
207
|
+
|
|
208
|
+
### Partner (PRM) — `POST /connect/prm/setup/sites`
|
|
209
|
+
|
|
210
|
+
Synchronous. Requires the `CommonPrmEnabled` feature.
|
|
211
|
+
|
|
212
|
+
```text
|
|
213
|
+
method: "POST"
|
|
214
|
+
url: "/services/data/v67.0/connect/prm/setup/sites"
|
|
215
|
+
body:
|
|
216
|
+
{
|
|
217
|
+
"siteName": "<name>",
|
|
218
|
+
"siteUrlPrefix": "<url prefix>",
|
|
219
|
+
"siteDesc": "<optional>",
|
|
220
|
+
"prmTemplate": "<org-specific PRM template>"
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Response: `{networkId}`. No job polling (synchronous).
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Background job monitoring (communities path)
|
|
229
|
+
|
|
230
|
+
The communities response says "query the BackgroundOperation object." Do this through
|
|
231
|
+
`mcp__headless-360__dispatch_readonly` against the **regular REST query endpoint** —
|
|
232
|
+
**not** `/tooling/query`, and **not** the Salesforce CLI `data query` subcommand.
|
|
233
|
+
|
|
234
|
+
```text
|
|
235
|
+
method: "GET"
|
|
236
|
+
url: "/services/data/v67.0/query"
|
|
237
|
+
queryParams: { "q": "SELECT Id, Status FROM BackgroundOperation WHERE Id = '<jobId>'" }
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
> **Verified gotcha — Tooling query fails on this object.** Calling
|
|
241
|
+
> `GET /services/data/vXX.0/tooling/query` with this SOQL returns:
|
|
242
|
+
> ```json
|
|
243
|
+
> { "error_code": "API_ERROR", "status_code": 400, "body": "[{\"message\":\"sObject type 'BackgroundOperation' is not supported.\",\"errorCode\":\"INVALID_TYPE\"}]" }
|
|
244
|
+
> ```
|
|
245
|
+
> Switching to the plain `/services/data/vXX.0/query` endpoint with the identical SOQL succeeds
|
|
246
|
+
> (`200`, `done: true`, `records: [{Id, Status}]`). Always use the non-Tooling query path for
|
|
247
|
+
> `BackgroundOperation`.
|
|
248
|
+
|
|
249
|
+
> **Column discipline:** on `BackgroundOperation`, only a few columns are queryable. `SELECT Id, Status`
|
|
250
|
+
> works. **Do NOT** select `JobType`, `CompletedDate`, or `NumErrors` — those columns do not exist on
|
|
251
|
+
> `BackgroundOperation` and return `INVALID_FIELD`. Use the SOQL string exactly as above; add fields
|
|
252
|
+
> only after confirming them via a describe.
|
|
253
|
+
|
|
254
|
+
`Status` values observed: `Scheduled` → `Queued` → `InProgress` (or `Running`) → `Complete` → `Error`.
|
|
255
|
+
For the self-service path, prefer the dedicated `GET /services/data/vXX.0/connect/self-service/site/status/{jobId}`
|
|
256
|
+
route instead of a `BackgroundOperation` query — it returns a typed `{status, siteUrl, error}` payload.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Verification
|
|
261
|
+
|
|
262
|
+
List all Experience Cloud sites and confirm the new one is present and Builder-based:
|
|
263
|
+
|
|
264
|
+
```text
|
|
265
|
+
method: "GET"
|
|
266
|
+
url: "/services/data/v67.0/connect/communities"
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Each entry includes `siteAsContainerEnabled` — `true` means an **Experience Builder** (Aura/LWR)
|
|
270
|
+
site, `false` means Salesforce Tabs + Visualforce. Confirm the new site shows `true` and a non-null
|
|
271
|
+
`builderUrl`, and that `templateName` is not `Salesforce Tabs + Visualforce`.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Gotchas
|
|
276
|
+
|
|
277
|
+
| Issue | Detail |
|
|
278
|
+
|-------|--------|
|
|
279
|
+
| Using `sf` CLI or project-codey | Not allowed. Every read/write goes through `mcp__headless-360__dispatch` / `dispatch_readonly`. |
|
|
280
|
+
| **Version prefix is required** | Pass `"/services/data/v67.0/connect/communities"`, **not** `"/connect/communities"`. Unlike project-codey, headless-360 does not resolve or add the version — a bare path returns `400 ROUTE_NOT_FOUND`. |
|
|
281
|
+
| `discover`/`describe` may not resolve create/list Connect API ops | `POST /connect/communities` and `GET /connect/communities/templates` are not individually indexed as describable operations in this corpus at time of writing. Dispatch the documented path directly instead of concluding the capability is missing. |
|
|
282
|
+
| `BackgroundOperation` via Tooling query | `GET /services/data/vXX.0/tooling/query` rejects `BackgroundOperation` with `400 INVALID_TYPE`. Use the plain `/services/data/vXX.0/query` endpoint instead. |
|
|
283
|
+
| `BackgroundOperation` columns | Only `Id`, `Status` are safe. `JobType`/`CompletedDate`/`NumErrors` → `INVALID_FIELD`. |
|
|
284
|
+
| Duplicate site name/prefix | `400 INVALID_INPUT "…already exists."` List `GET /services/data/vXX.0/connect/communities` and choose another. |
|
|
285
|
+
| Missing guest ESD | Self-service `POST` requires `guestEmbeddedServiceConfigId`; without one use the communities route with an Aura template. |
|
|
286
|
+
| URL prefix format | Alphanumeric only — no spaces or hyphens (`demosupportportal123`, not `demo-support-portal 123`). |
|
|
287
|
+
| `dispatch_readonly` is GET-only | Use `dispatch` for POST/PATCH/PUT/DELETE; `dispatch_readonly` rejects non-GET methods. |
|
|
288
|
+
| Credentials | Never fetch or print tokens / login URLs. The MCP session's bound org handles auth. |
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Post-Creation: Activate, Add Members, Publish (make the site reachable)
|
|
2
|
+
|
|
3
|
+
`POST /connect/communities` (and the self-service site API) only **provisions** the site — it comes
|
|
4
|
+
back `UnderConstruction` with **no members** and **unpublished pages**. In that state the site URL
|
|
5
|
+
is **not reachable** (a bare `https://<domain>.my.site.com/<prefix>` returns an error / "under
|
|
6
|
+
construction" page). Three post-creation steps make it actually work, in this order:
|
|
7
|
+
|
|
8
|
+
1. **Activate** the Network (`status` → `Live`)
|
|
9
|
+
2. **Add members** (profiles/permission sets that can access the site)
|
|
10
|
+
3. **Publish** the Experience Builder pages
|
|
11
|
+
|
|
12
|
+
> **Tooling note — this is the one place the skill steps outside headless-360.** There is **no
|
|
13
|
+
> Connect API** for activating or publishing an Experience Builder site, and
|
|
14
|
+
> `PATCH /connect/communities/<id>` returns **405 METHOD_NOT_ALLOWED** (the endpoint is GET/HEAD
|
|
15
|
+
> only). Activation and membership go through the **Metadata API** (deploy the `Network`), and
|
|
16
|
+
> publish goes through the **`sf community publish` CLI**. Use these here even though the rest of
|
|
17
|
+
> the skill is headless-360-only — they are the verified working paths (confirmed live against
|
|
18
|
+
> `orgfarm-825d2dfcc4`).
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Why the site looked "broken"
|
|
23
|
+
|
|
24
|
+
A freshly created Experience site:
|
|
25
|
+
|
|
26
|
+
- has `status: UnderConstruction` on its `Network` — not addressable until set `Live`;
|
|
27
|
+
- has only the admin profile as a member — no employee/customer profiles can reach it;
|
|
28
|
+
- has **unpublished** Builder pages — even once Live, the pages 404 / show "under construction"
|
|
29
|
+
until published.
|
|
30
|
+
|
|
31
|
+
Also note the **URL path**: Aura Employee/Customer sites serve at the `/s`-style path and login at
|
|
32
|
+
`.../<prefix>/login` (or `.../<prefix>/s/login`), **not** the bare `.../<prefix>`. Confirm the
|
|
33
|
+
exact `loginUrl` / `siteUrl` from `GET /connect/communities/<networkId>` before telling the user
|
|
34
|
+
the site is broken.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Step 1 — Activate the Network (status → Live)
|
|
39
|
+
|
|
40
|
+
Retrieve the Network metadata, flip `status`, redeploy. (Site name = the community `name`.)
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
sf project retrieve start --metadata "Network:<Site Name>" -o <org-alias>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Edit `force-app/main/default/networks/<Site Name>.network-meta.xml`:
|
|
47
|
+
|
|
48
|
+
```xml
|
|
49
|
+
<status>UnderConstruction</status> <!-- change to -->
|
|
50
|
+
<status>Live</status>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
sf project deploy start --metadata "Network:<Site Name>" -o <org-alias>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Verify via headless-360:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
mcp__headless-360__dispatch_readonly(
|
|
61
|
+
method: "GET",
|
|
62
|
+
url: "/services/data/v67.0/connect/communities/<networkId>"
|
|
63
|
+
)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`status` must now read `Live`.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Step 2 — Add members (profiles / permission sets)
|
|
71
|
+
|
|
72
|
+
Community membership is **group-based** — you add **profiles** (and/or permission sets), not
|
|
73
|
+
individual users. Users holding a member profile become members automatically. `networkMemberGroups`
|
|
74
|
+
in the same `Network` metadata holds these; add a `<profile>` (or `<permissionSet>`) child and
|
|
75
|
+
redeploy.
|
|
76
|
+
|
|
77
|
+
> **"Unified Employee" is a Profile, not a UserRole.** Verify the exact name first — a `UserRole`
|
|
78
|
+
> query for it returns 0 rows; it is a **Standard Profile** (`SELECT Id, Name, UserType FROM Profile
|
|
79
|
+
> WHERE Name = 'Unified Employee'`). Metadata uses the profile **Name** (`Unified Employee`), not
|
|
80
|
+
> the Id.
|
|
81
|
+
|
|
82
|
+
Edit the same `<Site Name>.network-meta.xml`:
|
|
83
|
+
|
|
84
|
+
```xml
|
|
85
|
+
<networkMemberGroups>
|
|
86
|
+
<profile>admin</profile>
|
|
87
|
+
<profile>Unified Employee</profile> <!-- added -->
|
|
88
|
+
</networkMemberGroups>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
sf project deploy start --metadata "Network:<Site Name>" -o <org-alias>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Verify via headless-360 (`ParentId` = the added profile's Id):
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
mcp__headless-360__dispatch_readonly(
|
|
99
|
+
method: "GET",
|
|
100
|
+
url: "/services/data/v67.0/query",
|
|
101
|
+
queryParams: { "q": "SELECT Id, NetworkId, ParentId FROM NetworkMemberGroup WHERE NetworkId = '<networkId>'" }
|
|
102
|
+
)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
> **`NetworkMemberGroup` column discipline:** it exposes `Id`, `NetworkId`, `ParentId` — **no**
|
|
106
|
+
> `MemberType`, and **no** `Parent.Name` relationship. Selecting those returns `INVALID_FIELD` /
|
|
107
|
+
> "Didn't understand relationship 'Parent'". Query `ParentId` and match it to a `Profile.Id` you
|
|
108
|
+
> looked up separately.
|
|
109
|
+
|
|
110
|
+
Steps 1 and 2 can be combined into a **single** `Network` deploy (flip `status` **and** add the
|
|
111
|
+
member group in one edit) to save a round-trip.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Step 3 — Publish the Experience Builder pages
|
|
116
|
+
|
|
117
|
+
No Connect API exists for this; use the CLI. It publishes all Builder pages and kicks off a
|
|
118
|
+
background job.
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
sf community publish --name "<Site Name>" -o <org-alias>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Returns `{ id, jobId, status, url, message }` — "We're publishing your changes now."
|
|
125
|
+
|
|
126
|
+
Poll the job to completion via headless-360 (regular `/query`, only `Id, Status`):
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
mcp__headless-360__dispatch_readonly(
|
|
130
|
+
method: "GET",
|
|
131
|
+
url: "/services/data/v67.0/query",
|
|
132
|
+
queryParams: { "q": "SELECT Id, Status FROM BackgroundOperation WHERE Id = '<jobId>'" }
|
|
133
|
+
)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Wait for `Status: Complete`.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Final verification
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
mcp__headless-360__dispatch_readonly(
|
|
144
|
+
method: "GET",
|
|
145
|
+
url: "/services/data/v67.0/connect/communities/<networkId>"
|
|
146
|
+
)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Confirm `status: Live`. Give the user the **login URL** (`.../<prefix>/login`), not the bare
|
|
150
|
+
prefix. Members on the added profile(s) can now sign in.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Gotchas index
|
|
155
|
+
|
|
156
|
+
| Issue | Fix |
|
|
157
|
+
|-------|-----|
|
|
158
|
+
| Bare site URL `.../<prefix>` not reachable | The site serves at `.../<prefix>/login` (and the app at `/s`). Read `loginUrl` from `GET /connect/communities/<id>` — don't assume the bare prefix works. |
|
|
159
|
+
| `PATCH /connect/communities/<id>` → 405 METHOD_NOT_ALLOWED | The communities endpoint is GET/HEAD only. Activate via `Network` **Metadata** deploy (`status: Live`), not a Connect PATCH. |
|
|
160
|
+
| Site stays `UnderConstruction` after create | Expected — creation only provisions. Deploy `Network` with `status: Live` to activate. |
|
|
161
|
+
| Members can't reach the site | Only admin is a member on create. Add the target profile(s) to `networkMemberGroups` and redeploy. |
|
|
162
|
+
| "Unified Employee" not found as a role | It's a **Profile**, not a `UserRole`. Use the profile Name in `networkMemberGroups`. |
|
|
163
|
+
| `NetworkMemberGroup` `MemberType` / `Parent.Name` → INVALID_FIELD | Select only `Id, NetworkId, ParentId`; resolve `ParentId` against `Profile.Id`. |
|
|
164
|
+
| Published pages still 404 after activation | Activation (Network → Live) and **publish** are separate. Run `sf community publish` and wait for the `BackgroundOperation` to reach `Complete`. |
|
|
165
|
+
| No Connect API for activate/publish | By design — use Metadata API (`Network`) for activate + members, and `sf community publish` for publish. These are the verified paths. |
|