@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,284 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: service-itsm-agentic-setup-uel-user-create
|
|
3
|
+
description: "Provision and enable a Unified Employee License (UEL) user in Salesforce with the full entity chain — User, Person Account, PersonContact, and Employee2 — through the Salesforce-hosted headless-360 MCP server. Use when the user asks to create a UEL user, set up a Unified Employee user account, enable an employee under the Unified Employee license, provision an employee with Person Account and Employee2 record, or onboard a new employee onto the Unified Employee profile. Triggers on: create UEL user, set up unified employee, provision unified employee, enable UEL employee, onboard employee user, create person account for employee. DO NOT TRIGGER when: the user asks to create a standard user without UEL, clone an existing user, manage existing user permissions only, assign incident permissions only, reset passwords only, or look up existing users without creation intent."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "2.1"
|
|
6
|
+
domains: ["Service"]
|
|
7
|
+
minApiVersion: "67.0"
|
|
8
|
+
mcpTools:
|
|
9
|
+
headless-360:
|
|
10
|
+
tools: ["discover", "describe", "dispatch", "dispatch_readonly"]
|
|
11
|
+
semver: ">=1.0.0"
|
|
12
|
+
accessCheck:
|
|
13
|
+
- type: "userPerm"
|
|
14
|
+
value: "ManageUsers"
|
|
15
|
+
- type: "userPerm"
|
|
16
|
+
value: "ManageProfilesPermissionsets"
|
|
17
|
+
- type: "userPerm"
|
|
18
|
+
value: "CustomizeApplication"
|
|
19
|
+
- type: "userPerm"
|
|
20
|
+
value: "AssignPermissionSets"
|
|
21
|
+
allowed-tools: |
|
|
22
|
+
Read AskUserQuestion
|
|
23
|
+
mcp__headless-360__discover
|
|
24
|
+
mcp__headless-360__describe
|
|
25
|
+
mcp__headless-360__dispatch_readonly
|
|
26
|
+
mcp__headless-360__dispatch
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Create and Enable a Unified Employee (UEL) User
|
|
30
|
+
|
|
31
|
+
Provision an employee under the Unified Employee License (UEL) by creating and linking a `User`
|
|
32
|
+
on the Unified Employee license/profile, a Person `Account` (with an auto-generated `Contact`), and
|
|
33
|
+
an `Employee2` record, then assigning the required permission sets. Every operation runs through
|
|
34
|
+
the **Salesforce-hosted headless-360 MCP server** (server key `headless-360`) via its four
|
|
35
|
+
meta-tools (`discover`, `describe`, `dispatch_readonly`, `dispatch`). The org is derived from the
|
|
36
|
+
OAuth JWT bound to the current MCP session — the skill never handles an org id, alias, or
|
|
37
|
+
credentials — so the flow behaves identically against **production** and sandbox with no per-user
|
|
38
|
+
MCP install.
|
|
39
|
+
|
|
40
|
+
## Scope
|
|
41
|
+
|
|
42
|
+
- **In scope**: Creating a new UEL User, Person Account, Employee2 record; assigning permission
|
|
43
|
+
sets; verifying the full chain.
|
|
44
|
+
- **Out of scope**: Standard user creation (non-UEL); cloning existing users; managing existing
|
|
45
|
+
user permissions only; deactivating users; license assignment changes.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Routes at a glance
|
|
50
|
+
|
|
51
|
+
Reads dispatch through `mcp__headless-360__dispatch_readonly`; writes through
|
|
52
|
+
`mcp__headless-360__dispatch`. Both take raw HTTP:
|
|
53
|
+
`{"url": "<path>", "method": "GET|POST", "body"?: {...}, "queryParams"?: {...}}`. Full URL paths and
|
|
54
|
+
request/response bodies for every row live in `references/mcp-invocation.md`; this table lists only
|
|
55
|
+
the operation and HTTP method.
|
|
56
|
+
|
|
57
|
+
| Concern | Method + operation | Notes |
|
|
58
|
+
|---------|--------------------|-------|
|
|
59
|
+
| Unified Employee license | `GET /query` (UserLicense) | Zero rows → stop |
|
|
60
|
+
| Unified Employee profile | `GET /query` (Profile) | Zero rows → stop |
|
|
61
|
+
| Person Account record type | `GET /query` (RecordType, IsPersonType) | Zero rows → stop |
|
|
62
|
+
| Employee Hub perm set | `GET /query` (PermissionSet) | Mandatory; zero rows → stop |
|
|
63
|
+
| Employee2 accessible | `GET /sobjects/Employee2/describe` | 200 = HR module enabled |
|
|
64
|
+
| Resolve manager | `GET /query` (User by Username/Name) | Active users only |
|
|
65
|
+
| Create user | `POST /sobjects/User` | Profile = Unified Employee |
|
|
66
|
+
| Assign Employee Hub set | `POST /sobjects/PermissionSetAssignment` | Mandatory |
|
|
67
|
+
| Create Person Account | `POST /sobjects/Account` | `PersonEmail` required |
|
|
68
|
+
| Read PersonContact | `GET /query` (Account) | Capture `PersonContactId` |
|
|
69
|
+
| Create Employee2 | `POST /sobjects/Employee2` | Use `UserId`/`ContactId` field names |
|
|
70
|
+
| Verify chain | `GET /query` | User + Account + Employee2 + perm sets |
|
|
71
|
+
|
|
72
|
+
**Response envelope**: `describe`, `/query`, and `/sobjects/…` are all standard REST — the
|
|
73
|
+
`dispatch*` tool returns the HTTP status plus the parsed body: `{ "status_code": 200, "body": <REST
|
|
74
|
+
response> }`. Read `body`. A create returns `body.id` and `body.success == true`; a query returns
|
|
75
|
+
`body.records[]`. Status codes: `200/201` success; `400` bad body (re-check schema via `describe`);
|
|
76
|
+
`401`/auth error the MCP session needs re-auth; `404` the endpoint/impl is not present on this org;
|
|
77
|
+
`500` a downstream dependency issue.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Required Inputs
|
|
82
|
+
|
|
83
|
+
Collect from the user (ask only what is not already in conversation context):
|
|
84
|
+
|
|
85
|
+
### Identity (required)
|
|
86
|
+
|
|
87
|
+
| Field | Description |
|
|
88
|
+
|-------|-------------|
|
|
89
|
+
| `FirstName` | Employee first name |
|
|
90
|
+
| `LastName` | Employee last name |
|
|
91
|
+
| `Email` | Employee email address |
|
|
92
|
+
|
|
93
|
+
### Credentials & Locale (required)
|
|
94
|
+
|
|
95
|
+
| Field | Description | Example |
|
|
96
|
+
|-------|-------------|---------|
|
|
97
|
+
| `Username` | Email-formatted, globally unique | `jane.doe@company.uel.com` |
|
|
98
|
+
| `Alias` | Max 8 chars | `jdoe` |
|
|
99
|
+
| `TimeZoneSidKey` | Timezone | `America/Los_Angeles` |
|
|
100
|
+
| `LocaleSidKey` | Locale | `en_US` |
|
|
101
|
+
| `LanguageLocaleKey` | Language | `en_US` |
|
|
102
|
+
| `EmailEncodingKey` | Email encoding | `UTF-8` |
|
|
103
|
+
|
|
104
|
+
### Manager (optional)
|
|
105
|
+
|
|
106
|
+
| Field | Description |
|
|
107
|
+
|-------|-------------|
|
|
108
|
+
| `ManagerName` or `ManagerUsername` | Resolve to ManagerId via SOQL |
|
|
109
|
+
|
|
110
|
+
### HR Attributes for Employee2 (required)
|
|
111
|
+
|
|
112
|
+
| Field | Description |
|
|
113
|
+
|-------|-------------|
|
|
114
|
+
| `Department` | Employee department |
|
|
115
|
+
| `Location` | Employee location |
|
|
116
|
+
| `EmployeeNumber` | HR employee number |
|
|
117
|
+
| `Title` | Job title |
|
|
118
|
+
| `HireDate` | Date format: YYYY-MM-DD |
|
|
119
|
+
|
|
120
|
+
### Permission Sets
|
|
121
|
+
|
|
122
|
+
`Employee Hub Unified Employee User` (`EmployeeHubEmployeeUser`) is **always assigned** — no other
|
|
123
|
+
permission sets belong on a UEL user. If the caller asks for extras (Incident Fulfiller, Case
|
|
124
|
+
Agent, or any other fulfiller/agent-role set), decline: those are for **fulfillers** on the Service
|
|
125
|
+
Cloud side, not for **requesters** who log into the Employee Hub. Point the caller at the
|
|
126
|
+
appropriate fulfiller user-create flow instead of extending this one.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Workflow
|
|
131
|
+
|
|
132
|
+
All steps are sequential. **Always read before you write.** Every call goes through
|
|
133
|
+
`mcp__headless-360__*` tools. Stop and report if any step fails.
|
|
134
|
+
|
|
135
|
+
### Phase 1 — Preflight & discovery
|
|
136
|
+
|
|
137
|
+
**On any `401` / `403` / `404` from a `discover` / `describe` / `dispatch` / `dispatch_readonly` call below, halt and surface the raw error** — the org or client is not configured correctly. `401` → headless-360 MCP client not authenticated to `CORE_ORG_ALIAS` (session expired). `403` → executing user is missing one of the required perms (`ManageUsers`, `ManageProfilesPermissionsets`, `CustomizeApplication`, `AssignPermissionSets`) OR the org lacks the Unified Employee License. `404` → the target sObject / route is not available (HR module / UEL not provisioned — surfaces separately as the five prerequisite checks in step 2).
|
|
138
|
+
|
|
139
|
+
1. **Discover the operations** — `mcp__headless-360__discover(query="create User Account Employee2 sObject")`
|
|
140
|
+
and `mcp__headless-360__describe(id=<operation_id>)` for the `POST /sobjects/User`,
|
|
141
|
+
`POST /sobjects/Account`, and `POST /sobjects/Employee2` operations to confirm they are indexed
|
|
142
|
+
and pull the input schema. A `discover` miss does **not** mean the route is absent — the
|
|
143
|
+
`/sobjects/…` REST endpoints are core Data API paths and can be invoked directly with
|
|
144
|
+
`dispatch_readonly` / `dispatch` against the exact URL (see `references/mcp-invocation.md`). If a
|
|
145
|
+
direct `dispatch_readonly` probe at the documented path also fails (404), direct the user to the
|
|
146
|
+
Setup UI.
|
|
147
|
+
2. **Verify all five UEL prerequisites** (all read-only `/query` or describe). If any fails,
|
|
148
|
+
**stop** and report exactly which prerequisite is missing:
|
|
149
|
+
- Unified Employee **license** exists → else "Unified Employee license not found in this org."
|
|
150
|
+
- Unified Employee **profile** exists → else "Unified Employee profile not found. Ensure UEL license is provisioned."
|
|
151
|
+
- Active **Person Account record type** exists → else "No active Person Account record type found. Enable Person Accounts in Setup."
|
|
152
|
+
- **Employee Hub** permission set exists → else "Employee Hub Unified Employee User permission set not found. This is required for UEL provisioning."
|
|
153
|
+
- **Employee2** describe returns 200 → else "Employee2 sObject not accessible. Ensure the HR module is enabled."
|
|
154
|
+
|
|
155
|
+
Capture: `UnifiedEmployeeProfileId`, `PersonAccountRecordTypeId`, `EmployeeHubPermSetId`.
|
|
156
|
+
|
|
157
|
+
### Phase 2 — Resolve references
|
|
158
|
+
|
|
159
|
+
3. **Resolve the manager** — when the user supplied a manager, query by Username or Name (active
|
|
160
|
+
users only). On multiple matches, present options and ask the user to disambiguate. Capture
|
|
161
|
+
`ManagerId`. When no manager was supplied, skip this step.
|
|
162
|
+
4. **Check username uniqueness** — query `User` by `Username`; any record → **stop**, username taken.
|
|
163
|
+
|
|
164
|
+
### Phase 3 — Confirm & create the chain
|
|
165
|
+
|
|
166
|
+
5. **Confirm the plan** — present the full configuration (including HR attributes) and wait for
|
|
167
|
+
explicit confirmation before any mutation.
|
|
168
|
+
6. **Create the User** — `POST /sobjects/User` with identity, locale, `ProfileId` =
|
|
169
|
+
`UnifiedEmployeeProfileId`, and `ManagerId` (omit `ManagerId` when none). Capture `NewUserId`.
|
|
170
|
+
7. **Assign the Employee Hub permission set (mandatory)** — `POST /sobjects/PermissionSetAssignment`
|
|
171
|
+
with `{AssigneeId: NewUserId, PermissionSetId: EmployeeHubPermSetId}`. If this fails, **stop** and
|
|
172
|
+
report the exact error — the set exists (verified) but may be incompatible with the license.
|
|
173
|
+
8. **Create the Person Account** — `POST /sobjects/Account` with `FirstName`, `LastName`,
|
|
174
|
+
`PersonEmail` (**required**), and `RecordTypeId` = `PersonAccountRecordTypeId`. Capture
|
|
175
|
+
`NewAccountId`. `PersonEmail` must be set: the Employee2 validation hook rejects the record when
|
|
176
|
+
the linked PersonContact is missing `Email` or `LastName`.
|
|
177
|
+
9. **Verify the PersonContact** — query the Account for `IsPersonAccount` and `PersonContactId`.
|
|
178
|
+
Confirm `IsPersonAccount = true` and capture `PersonContactId`. If it is null, **stop** and
|
|
179
|
+
report failure to generate the PersonContact.
|
|
180
|
+
10. **Create the Employee2 record** — `POST /sobjects/Employee2` with `UserId` = `NewUserId`,
|
|
181
|
+
`ContactId` = `PersonContactId`, and the HR attributes. Use the foreign-key field names
|
|
182
|
+
`UserId`/`ContactId` (not the relationship names `User`/`Contact`). Capture `NewEmployee2Id`.
|
|
183
|
+
|
|
184
|
+
### Phase 4 — Verify & present
|
|
185
|
+
|
|
186
|
+
11. **Verify the full chain** — query the Account (IsPersonAccount, PersonContactId), the User
|
|
187
|
+
(IsActive, ProfileId, ManagerId), the Employee2 (UserId, ContactId), and confirm the Employee
|
|
188
|
+
Hub permission set is the only PermissionSetAssignment (beyond the profile).
|
|
189
|
+
12. **Report** using the output format below.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Rules / Constraints
|
|
194
|
+
|
|
195
|
+
| Constraint | Rationale |
|
|
196
|
+
|-----------|-----------|
|
|
197
|
+
| Verify all five prerequisites before any mutation | Prevents partial state when the org is not configured for UEL |
|
|
198
|
+
| Always `describe` before a `POST` | You need the exact input schema for each sObject |
|
|
199
|
+
| Confirm the plan with the user before creating records | Prevents unintended record creation |
|
|
200
|
+
| `PersonEmail` is required on Person Account create | The Employee2 validation hook rejects a PersonContact with no Email |
|
|
201
|
+
| Use `UserId`/`ContactId` field names on Employee2 | The API rejects bare IDs under the relationship names |
|
|
202
|
+
| `Employee Hub Unified Employee User` is the ONLY permset assigned | UEL users are Employee Hub requesters, not fulfillers/agents — no other permsets are compatible |
|
|
203
|
+
| Omit null/empty foreign keys from create bodies | The API rejects an explicit empty `ManagerId` |
|
|
204
|
+
| Display the exact error from `dispatch*` on failure | Helps diagnose issues |
|
|
205
|
+
| Never show Salesforce record IDs to the user | Use human-readable names only |
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Permissions Required
|
|
210
|
+
|
|
211
|
+
The executing admin user (the identity behind `CORE_ORG_ALIAS`) must have:
|
|
212
|
+
|
|
213
|
+
| Permission | Purpose |
|
|
214
|
+
|-----------|---------|
|
|
215
|
+
| Manage Internal Users | Create User records |
|
|
216
|
+
| Manage Profiles and Permission Sets | Assign permission sets |
|
|
217
|
+
| Customize Application | Create Employee2 and Person Account records |
|
|
218
|
+
| Assign Permission Sets | Create PermissionSetAssignment records |
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Verification Checklist
|
|
223
|
+
|
|
224
|
+
- [ ] Did `discover` + `describe(id)` (or, on a `discover` miss, a direct `dispatch_readonly` probe at the documented `/sobjects/…` path) confirm the User / Account / Employee2 create operations?
|
|
225
|
+
- [ ] Did all five UEL prerequisites pass (license, profile, Person Account RT, Employee Hub set, Employee2)?
|
|
226
|
+
- [ ] Did you confirm the username is unique and confirm the plan before any mutation?
|
|
227
|
+
- [ ] Is `Account.IsPersonAccount = true` with a non-null `PersonContactId`?
|
|
228
|
+
- [ ] Is `User.IsActive = true` on the Unified Employee profile (and manager, if provided)?
|
|
229
|
+
- [ ] Does `Employee2` link `UserId` and `ContactId` correctly?
|
|
230
|
+
- [ ] Is `Employee Hub Unified Employee User` the only permission set assigned (no fulfiller-side extras)?
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Output Format
|
|
235
|
+
|
|
236
|
+
On **failure**, display the error from `dispatch*` exactly as returned.
|
|
237
|
+
|
|
238
|
+
On **success**:
|
|
239
|
+
|
|
240
|
+
```text
|
|
241
|
+
UEL User Provisioning Complete (via service-itsm-agentic-setup-uel-user-create)
|
|
242
|
+
|
|
243
|
+
User:
|
|
244
|
+
Name: <FirstName> <LastName>
|
|
245
|
+
Username: <Username>
|
|
246
|
+
Email: <Email>
|
|
247
|
+
Profile: Unified Employee
|
|
248
|
+
Manager: <ManagerName> (or "not set")
|
|
249
|
+
Status: Active
|
|
250
|
+
|
|
251
|
+
Person Account:
|
|
252
|
+
Account Name: <FirstName> <LastName>
|
|
253
|
+
Person Contact: linked
|
|
254
|
+
|
|
255
|
+
Employee Record:
|
|
256
|
+
Department: <Department>
|
|
257
|
+
Title: <Title>
|
|
258
|
+
Location: <Location>
|
|
259
|
+
Employee No: <EmployeeNumber>
|
|
260
|
+
Hire Date: <HireDate>
|
|
261
|
+
|
|
262
|
+
Permission Set Assigned:
|
|
263
|
+
- Employee Hub Unified Employee User
|
|
264
|
+
|
|
265
|
+
Chain: User > Person Account > PersonContact > Employee2 > Employee Hub permset
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
No record IDs in user-facing output — use human-readable names only.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Reference File Index
|
|
273
|
+
|
|
274
|
+
| File | When to read |
|
|
275
|
+
|------|--------------|
|
|
276
|
+
| `references/mcp-invocation.md` | Every phase — exact `mcp__headless-360__*` call shapes, the five prerequisite queries, the create bodies for the full chain, response envelope, discovery, and gotchas |
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Related Skills
|
|
281
|
+
|
|
282
|
+
This skill provisions a **Unified Employee License (UEL)** user with the full entity chain. Two
|
|
283
|
+
adjacent flows are out of scope: creating a **standard** (non-UEL) user, and **cloning** an existing
|
|
284
|
+
user's full access configuration. Handle those requests separately — this skill does not cover them.
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# MCP Invocation Reference — UEL User Create
|
|
2
|
+
|
|
3
|
+
Every operation dispatches through the **Salesforce-hosted `headless-360`** MCP server, which
|
|
4
|
+
exposes four meta-tools:
|
|
5
|
+
|
|
6
|
+
- `mcp__headless-360__discover(query)` — semantic search over the indexed operation catalog
|
|
7
|
+
- `mcp__headless-360__describe(id)` — pull the schema and canonical route for one operation
|
|
8
|
+
- `mcp__headless-360__dispatch_readonly({url, method, queryParams?, body?})` — GET / read-only HTTP
|
|
9
|
+
- `mcp__headless-360__dispatch({url, method, body?, queryParams?})` — POST / PATCH / DELETE HTTP
|
|
10
|
+
|
|
11
|
+
**Dispatch takes raw HTTP**, not `{operation_id, arguments}`. Give it the full `url`
|
|
12
|
+
(`/services/data/v67.0/...`), `method`, optional `body`, and optional `queryParams` (camelCase — the
|
|
13
|
+
tool rejects `query_params`) — the server signs the request with the JWT bound to the current MCP
|
|
14
|
+
session and forwards it to the org. The skill never handles credentials or an org alias — everything
|
|
15
|
+
is derived from the session.
|
|
16
|
+
|
|
17
|
+
**A `discover` miss does NOT mean the route is absent.** The `/sobjects/…` REST endpoints and the
|
|
18
|
+
SOQL `/query` route this skill uses are documented core Data API paths and can be dispatched
|
|
19
|
+
directly. Only if the direct `describe`/`dispatch_readonly` at the exact path itself returns 404
|
|
20
|
+
should you treat the route as unavailable on this org.
|
|
21
|
+
|
|
22
|
+
## Response envelope
|
|
23
|
+
|
|
24
|
+
`describe`, `/query`, and `/sobjects/…` are all **standard REST**. The `dispatch*` tool returns the
|
|
25
|
+
HTTP status plus the parsed body:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{ "status_code": 200, "body": <REST response> }
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Read `body`. A create returns `{ "id": "...", "success": true, "errors": [] }`; a query returns
|
|
32
|
+
`{ "totalSize": N, "records": [...] }`. Status codes: `200/201` success; `400` bad body (re-check
|
|
33
|
+
schema via `describe`); `401`/auth error — the MCP session needs re-auth; `404` route not present
|
|
34
|
+
on this org; `500` a downstream dependency issue.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Routes
|
|
39
|
+
|
|
40
|
+
| Method + path | Purpose |
|
|
41
|
+
|---------------|---------|
|
|
42
|
+
| `GET /services/data/v67.0/query` | Prerequisites, manager, uniqueness, verify (`queryParams.q`) |
|
|
43
|
+
| `GET /services/data/v67.0/sobjects/Employee2/describe` | Prerequisite: HR module enabled |
|
|
44
|
+
| `POST /services/data/v67.0/sobjects/User` | Create the UEL user |
|
|
45
|
+
| `POST /services/data/v67.0/sobjects/Account` | Create the Person Account |
|
|
46
|
+
| `POST /services/data/v67.0/sobjects/Employee2` | Create the Employee2 record |
|
|
47
|
+
| `POST /services/data/v67.0/sobjects/PermissionSetAssignment` | Assign a permission set |
|
|
48
|
+
|
|
49
|
+
Minimum API version is **67.0**.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Discovery — always run first
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
mcp__headless-360__discover(query="create User Account Employee2 sObject")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Call `mcp__headless-360__describe(id=<operation_id>)` for the `POST /sobjects/User`,
|
|
60
|
+
`POST /sobjects/Account`, and `POST /sobjects/Employee2` operations to confirm they are indexed and
|
|
61
|
+
pull the exact input schema. A `discover` miss is not fatal — dispatch directly at the exact
|
|
62
|
+
`/sobjects/<Name>` path (these are core Data API routes). If a direct call at the documented path
|
|
63
|
+
also fails, direct the user to the Setup UI.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Phase 1 — Verify the five UEL prerequisites
|
|
68
|
+
|
|
69
|
+
Run all five before any mutation. If any fails, stop and report exactly which one. Read
|
|
70
|
+
`body.records[]` (or the describe status). Capture the Ids noted below.
|
|
71
|
+
|
|
72
|
+
**1. Unified Employee license** — zero rows → stop:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
dispatch_readonly({
|
|
76
|
+
"url": "/services/data/v67.0/query",
|
|
77
|
+
"method": "GET",
|
|
78
|
+
"queryParams": { "q": "SELECT Id, Name FROM UserLicense WHERE Name = 'Unified Employee' LIMIT 1" }
|
|
79
|
+
})
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**2. Unified Employee profile** — zero rows → stop. Capture `UnifiedEmployeeProfileId`:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
dispatch_readonly({
|
|
86
|
+
"url": "/services/data/v67.0/query",
|
|
87
|
+
"method": "GET",
|
|
88
|
+
"queryParams": { "q": "SELECT Id, Name FROM Profile WHERE Name = 'Unified Employee' LIMIT 1" }
|
|
89
|
+
})
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**3. Active Person Account record type** — zero rows → stop. Capture `PersonAccountRecordTypeId`:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
dispatch_readonly({
|
|
96
|
+
"url": "/services/data/v67.0/query",
|
|
97
|
+
"method": "GET",
|
|
98
|
+
"queryParams": { "q": "SELECT Id, Name FROM RecordType WHERE SObjectType = 'Account' AND IsPersonType = true AND IsActive = true LIMIT 1" }
|
|
99
|
+
})
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**4. Employee Hub permission set** — zero rows → stop. Capture `EmployeeHubPermSetId`:
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
dispatch_readonly({
|
|
106
|
+
"url": "/services/data/v67.0/query",
|
|
107
|
+
"method": "GET",
|
|
108
|
+
"queryParams": { "q": "SELECT Id, Name, Label FROM PermissionSet WHERE Name = 'Employee_Hub_Unified_Employee_User' OR Label = 'Employee Hub Unified Employee User' LIMIT 1" }
|
|
109
|
+
})
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**5. Employee2 accessible** — describe must return 200 (HR module enabled):
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
dispatch_readonly({
|
|
116
|
+
"url": "/services/data/v67.0/sobjects/Employee2/describe",
|
|
117
|
+
"method": "GET"
|
|
118
|
+
})
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Phase 2 — Resolve manager + uniqueness
|
|
124
|
+
|
|
125
|
+
**Resolve manager (if provided)** — by Username, or by Name (disambiguate on multiple):
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
dispatch_readonly({
|
|
129
|
+
"url": "/services/data/v67.0/query",
|
|
130
|
+
"method": "GET",
|
|
131
|
+
"queryParams": { "q": "SELECT Id, Name FROM User WHERE Username = '<ManagerUsername>' AND IsActive = true LIMIT 1" }
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
dispatch_readonly({
|
|
135
|
+
"url": "/services/data/v67.0/query",
|
|
136
|
+
"method": "GET",
|
|
137
|
+
"queryParams": { "q": "SELECT Id, Name, Username FROM User WHERE Name = '<ManagerName>' AND IsActive = true" }
|
|
138
|
+
})
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Check username uniqueness** — any record → stop, the username is taken:
|
|
142
|
+
|
|
143
|
+
```text
|
|
144
|
+
dispatch_readonly({
|
|
145
|
+
"url": "/services/data/v67.0/query",
|
|
146
|
+
"method": "GET",
|
|
147
|
+
"queryParams": { "q": "SELECT Id FROM User WHERE Username = '<Username>' LIMIT 1" }
|
|
148
|
+
})
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Phase 3 — Create the chain
|
|
154
|
+
|
|
155
|
+
### 1. Create the User
|
|
156
|
+
|
|
157
|
+
```text
|
|
158
|
+
dispatch({
|
|
159
|
+
"url": "/services/data/v67.0/sobjects/User",
|
|
160
|
+
"method": "POST",
|
|
161
|
+
"body": {
|
|
162
|
+
"FirstName": "<FirstName>",
|
|
163
|
+
"LastName": "<LastName>",
|
|
164
|
+
"Email": "<Email>",
|
|
165
|
+
"Username": "<Username>",
|
|
166
|
+
"Alias": "<Alias>",
|
|
167
|
+
"ProfileId": "<UnifiedEmployeeProfileId>",
|
|
168
|
+
"TimeZoneSidKey": "<TimeZoneSidKey>",
|
|
169
|
+
"LocaleSidKey": "<LocaleSidKey>",
|
|
170
|
+
"LanguageLocaleKey": "<LanguageLocaleKey>",
|
|
171
|
+
"EmailEncodingKey": "<EmailEncodingKey>",
|
|
172
|
+
"ManagerId": "<ManagerId>" // OMIT this key entirely when no manager
|
|
173
|
+
}
|
|
174
|
+
})
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Capture `body.id` as `NewUserId`.
|
|
178
|
+
|
|
179
|
+
### 2. Assign the Employee Hub permission set (mandatory)
|
|
180
|
+
|
|
181
|
+
```text
|
|
182
|
+
dispatch({
|
|
183
|
+
"url": "/services/data/v67.0/sobjects/PermissionSetAssignment",
|
|
184
|
+
"method": "POST",
|
|
185
|
+
"body": { "AssigneeId": "<NewUserId>", "PermissionSetId": "<EmployeeHubPermSetId>" }
|
|
186
|
+
})
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
If this fails, stop — the set exists but may be incompatible with the license.
|
|
190
|
+
|
|
191
|
+
### 3. Create the Person Account
|
|
192
|
+
|
|
193
|
+
```text
|
|
194
|
+
dispatch({
|
|
195
|
+
"url": "/services/data/v67.0/sobjects/Account",
|
|
196
|
+
"method": "POST",
|
|
197
|
+
"body": {
|
|
198
|
+
"FirstName": "<FirstName>",
|
|
199
|
+
"LastName": "<LastName>",
|
|
200
|
+
"PersonEmail": "<Email>", // REQUIRED
|
|
201
|
+
"RecordTypeId": "<PersonAccountRecordTypeId>"
|
|
202
|
+
}
|
|
203
|
+
})
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Capture `body.id` as `NewAccountId`. `PersonEmail` is required — the `UnifiedEmployeePersona`
|
|
207
|
+
validation hook rejects Employee2 creation when the linked PersonContact is missing `Email` or
|
|
208
|
+
`LastName`.
|
|
209
|
+
|
|
210
|
+
### 4. Verify the PersonContact
|
|
211
|
+
|
|
212
|
+
```text
|
|
213
|
+
dispatch_readonly({
|
|
214
|
+
"url": "/services/data/v67.0/query",
|
|
215
|
+
"method": "GET",
|
|
216
|
+
"queryParams": { "q": "SELECT Id, IsPersonAccount, PersonContactId FROM Account WHERE Id = '<NewAccountId>'" }
|
|
217
|
+
})
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Confirm `IsPersonAccount = true`; capture `PersonContactId`. If it is null, stop and report failure
|
|
221
|
+
to generate the PersonContact.
|
|
222
|
+
|
|
223
|
+
### 5. Create the Employee2 record
|
|
224
|
+
|
|
225
|
+
```text
|
|
226
|
+
dispatch({
|
|
227
|
+
"url": "/services/data/v67.0/sobjects/Employee2",
|
|
228
|
+
"method": "POST",
|
|
229
|
+
"body": {
|
|
230
|
+
"UserId": "<NewUserId>", // FK field name, not "User"
|
|
231
|
+
"ContactId": "<PersonContactId>", // FK field name, not "Contact"
|
|
232
|
+
"Department": "<Department>",
|
|
233
|
+
"Location": "<Location>",
|
|
234
|
+
"EmployeeNumber": "<EmployeeNumber>",
|
|
235
|
+
"Title": "<Title>",
|
|
236
|
+
"HireDate": "<YYYY-MM-DD>"
|
|
237
|
+
}
|
|
238
|
+
})
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Capture `body.id` as `NewEmployee2Id`. Use the foreign-key field names `UserId`/`ContactId`; the
|
|
242
|
+
API rejects bare IDs placed under the relationship names `User`/`Contact`.
|
|
243
|
+
|
|
244
|
+
### 6. Additional permission sets — not supported
|
|
245
|
+
|
|
246
|
+
The skill assigns exactly one permission set: `EmployeeHubEmployeeUser` (label
|
|
247
|
+
`Employee Hub Unified Employee User`). UEL / Employee Hub users are **requesters** — extras
|
|
248
|
+
belong on fulfillers (`Incident Fulfiller`, `Case Agent`, and similar are agent-role permsets on
|
|
249
|
+
the Service Cloud side, categorically incompatible with the Unified Employee profile). Do not add
|
|
250
|
+
any additional-permset assignment logic here.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Phase 4 — Verify the full chain
|
|
255
|
+
|
|
256
|
+
```text
|
|
257
|
+
dispatch_readonly({
|
|
258
|
+
"url": "/services/data/v67.0/query",
|
|
259
|
+
"method": "GET",
|
|
260
|
+
"queryParams": { "q": "SELECT Id, IsPersonAccount, PersonContactId FROM Account WHERE Id = '<NewAccountId>'" }
|
|
261
|
+
})
|
|
262
|
+
|
|
263
|
+
dispatch_readonly({
|
|
264
|
+
"url": "/services/data/v67.0/query",
|
|
265
|
+
"method": "GET",
|
|
266
|
+
"queryParams": { "q": "SELECT Id, IsActive, ProfileId, ManagerId FROM User WHERE Id = '<NewUserId>'" }
|
|
267
|
+
})
|
|
268
|
+
|
|
269
|
+
dispatch_readonly({
|
|
270
|
+
"url": "/services/data/v67.0/query",
|
|
271
|
+
"method": "GET",
|
|
272
|
+
"queryParams": { "q": "SELECT Id, UserId, ContactId FROM Employee2 WHERE Id = '<NewEmployee2Id>'" }
|
|
273
|
+
})
|
|
274
|
+
|
|
275
|
+
dispatch_readonly({
|
|
276
|
+
"url": "/services/data/v67.0/query",
|
|
277
|
+
"method": "GET",
|
|
278
|
+
"queryParams": { "q": "SELECT PermissionSet.Label FROM PermissionSetAssignment WHERE AssigneeId = '<NewUserId>' AND PermissionSet.IsOwnedByProfile = false" }
|
|
279
|
+
})
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Confirm: `Account.IsPersonAccount = true` and `PersonContactId` matches; `User.IsActive = true` and
|
|
283
|
+
`ProfileId = UnifiedEmployeeProfileId`; `User.ManagerId` matches (if provided);
|
|
284
|
+
`Employee2.UserId`/`ContactId` match; the Employee Hub set is the only non-profile
|
|
285
|
+
PermissionSetAssignment.
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Gotchas
|
|
290
|
+
|
|
291
|
+
| Issue | Resolution |
|
|
292
|
+
|-------|------------|
|
|
293
|
+
| Response wrapper | `describe`/`/query`/`/sobjects/*` come back as `{status_code, body}` — read `body`. |
|
|
294
|
+
| `queryParams` casing | The `dispatch*` tools require **camelCase** `queryParams` — `query_params` is rejected. |
|
|
295
|
+
| Employee2 create rejected by validation hook | The PersonContact is missing `Email`/`LastName` — set `PersonEmail` on the Account create. |
|
|
296
|
+
| Employee2 create rejects the IDs | Use `UserId`/`ContactId` (FK field names), not `User`/`Contact` (relationship names). |
|
|
297
|
+
| Create rejects empty `ManagerId` | Omit the key entirely when there is no manager — do not send `""`. |
|
|
298
|
+
| `PersonContactId` is null after Account create | Person Accounts may not be fully enabled — re-check the record type prerequisite. |
|
|
299
|
+
| Employee Hub set assignment fails | The set exists but may be license-incompatible — report the exact error and stop. |
|
|
300
|
+
| `Employee2` describe 404 / not accessible | The HR module is not enabled — stop and direct the user to enable it. |
|
|
301
|
+
| `discover` returns nothing for a `/sobjects/…` path | Not fatal — these are core Data API routes; dispatch directly at the exact `/services/data/v67.0/sobjects/<Name>` path. |
|
|
302
|
+
| Auth error on any `dispatch*` call | Tell the user to re-authenticate the headless-360 MCP connection and confirm the session points at the intended org. |
|