Create and Enable a Unified Employee (UEL) User
Provision an employee under the Unified Employee License (UEL) by creating and linking a User
on the Unified Employee license/profile, a Person Account (with an auto-generated Contact), and
an Employee2 record, then assigning the required permission sets. Every operation runs through
the Salesforce-hosted headless-360 MCP server (server key headless-360) via its four
meta-tools (discover, describe, dispatch_readonly, dispatch). The org is derived from the
OAuth JWT bound to the current MCP session — the skill never handles an org id, alias, or
credentials — so the flow behaves identically against production and sandbox with no per-user
MCP install.
Scope
- In scope: Creating a new UEL User, Person Account, Employee2 record; assigning permission
sets; verifying the full chain.
- Out of scope: Standard user creation (non-UEL); cloning existing users; managing existing
user permissions only; deactivating users; license assignment changes.
Routes at a glance
Reads dispatch through mcp__headless-360__dispatch_readonly; writes through
mcp__headless-360__dispatch. Both take raw HTTP:
{"url": "<path>", "method": "GET|POST", "body"?: {...}, "queryParams"?: {...}}. Full URL paths and
request/response bodies for every row live in references/mcp-invocation.md; this table lists only
the operation and HTTP method.
| Concern |
Method + operation |
Notes |
| Unified Employee license |
GET /query (UserLicense) |
Zero rows → stop |
| Unified Employee profile |
GET /query (Profile) |
Zero rows → stop |
| Person Account record type |
GET /query (RecordType, IsPersonType) |
Zero rows → stop |
| Employee Hub perm set |
GET /query (PermissionSet) |
Mandatory; zero rows → stop |
| Employee2 accessible |
GET /sobjects/Employee2/describe |
200 = HR module enabled |
| Resolve manager |
GET /query (User by Username/Name) |
Active users only |
| Create user |
POST /sobjects/User |
Profile = Unified Employee |
| Assign Employee Hub set |
POST /sobjects/PermissionSetAssignment |
Mandatory |
| Create Person Account |
POST /sobjects/Account |
PersonEmail required |
| Read PersonContact |
GET /query (Account) |
Capture PersonContactId |
| Create Employee2 |
POST /sobjects/Employee2 |
Use UserId/ContactId field names |
| Verify chain |
GET /query |
User + Account + Employee2 + perm sets |
Response envelope: describe, /query, and /sobjects/… are all standard REST — the
dispatch* tool returns the HTTP status plus the parsed body: { "status_code": 200, "body": <REST response> }. Read body. A create returns body.id and body.success == true; a query returns
body.records[]. Status codes: 200/201 success; 400 bad body (re-check schema via describe);
401/auth error the MCP session needs re-auth; 404 the endpoint/impl is not present on this org;
500 a downstream dependency issue.
Required Inputs
Collect from the user (ask only what is not already in conversation context):
Identity (required)
| Field |
Description |
FirstName |
Employee first name |
LastName |
Employee last name |
Email |
Employee email address |
Credentials & Locale (required)
| Field |
Description |
Example |
Username |
Email-formatted, globally unique |
jane.doe@company.uel.com |
Alias |
Max 8 chars |
jdoe |
TimeZoneSidKey |
Timezone |
America/Los_Angeles |
LocaleSidKey |
Locale |
en_US |
LanguageLocaleKey |
Language |
en_US |
EmailEncodingKey |
Email encoding |
UTF-8 |
Manager (optional)
| Field |
Description |
ManagerName or ManagerUsername |
Resolve to ManagerId via SOQL |
HR Attributes for Employee2 (required)
| Field |
Description |
Department |
Employee department |
Location |
Employee location |
EmployeeNumber |
HR employee number |
Title |
Job title |
HireDate |
Date format: YYYY-MM-DD |
Permission Sets
Employee Hub Unified Employee User (EmployeeHubEmployeeUser) is always assigned — no other
permission sets belong on a UEL user. If the caller asks for extras (Incident Fulfiller, Case
Agent, or any other fulfiller/agent-role set), decline: those are for fulfillers on the Service
Cloud side, not for requesters who log into the Employee Hub. Point the caller at the
appropriate fulfiller user-create flow instead of extending this one.
Workflow
All steps are sequential. Always read before you write. Every call goes through
mcp__headless-360__* tools. Stop and report if any step fails.
Phase 1 — Preflight & discovery
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).
Discover the operations — mcp__headless-360__discover(query="create User Account Employee2 sObject")
and mcp__headless-360__describe(id=<operation_id>) for the POST /sobjects/User,
POST /sobjects/Account, and POST /sobjects/Employee2 operations to confirm they are indexed
and pull the input schema. A discover miss does not mean the route is absent — the
/sobjects/… REST endpoints are core Data API paths and can be invoked directly with
dispatch_readonly / dispatch against the exact URL (see references/mcp-invocation.md). If a
direct dispatch_readonly probe at the documented path also fails (404), direct the user to the
Setup UI.
Verify all five UEL prerequisites (all read-only /query or describe). If any fails,
stop and report exactly which prerequisite is missing:
- Unified Employee license exists → else "Unified Employee license not found in this org."
- Unified Employee profile exists → else "Unified Employee profile not found. Ensure UEL license is provisioned."
- Active Person Account record type exists → else "No active Person Account record type found. Enable Person Accounts in Setup."
- Employee Hub permission set exists → else "Employee Hub Unified Employee User permission set not found. This is required for UEL provisioning."
- Employee2 describe returns 200 → else "Employee2 sObject not accessible. Ensure the HR module is enabled."
Capture: UnifiedEmployeeProfileId, PersonAccountRecordTypeId, EmployeeHubPermSetId.
Phase 2 — Resolve references
- Resolve the manager — when the user supplied a manager, query by Username or Name (active
users only). On multiple matches, present options and ask the user to disambiguate. Capture
ManagerId. When no manager was supplied, skip this step.
- Check username uniqueness — query
User by Username; any record → stop, username taken.
Phase 3 — Confirm & create the chain
- Confirm the plan — present the full configuration (including HR attributes) and wait for
explicit confirmation before any mutation.
- Create the User —
POST /sobjects/User with identity, locale, ProfileId =
UnifiedEmployeeProfileId, and ManagerId (omit ManagerId when none). Capture NewUserId.
- Assign the Employee Hub permission set (mandatory) —
POST /sobjects/PermissionSetAssignment
with {AssigneeId: NewUserId, PermissionSetId: EmployeeHubPermSetId}. If this fails, stop and
report the exact error — the set exists (verified) but may be incompatible with the license.
- Create the Person Account —
POST /sobjects/Account with FirstName, LastName,
PersonEmail (required), and RecordTypeId = PersonAccountRecordTypeId. Capture
NewAccountId. PersonEmail must be set: the Employee2 validation hook rejects the record when
the linked PersonContact is missing Email or LastName.
- Verify the PersonContact — query the Account for
IsPersonAccount and PersonContactId.
Confirm IsPersonAccount = true and capture PersonContactId. If it is null, stop and
report failure to generate the PersonContact.
- Create the Employee2 record —
POST /sobjects/Employee2 with UserId = NewUserId,
ContactId = PersonContactId, and the HR attributes. Use the foreign-key field names
UserId/ContactId (not the relationship names User/Contact). Capture NewEmployee2Id.
Phase 4 — Verify & present
- Verify the full chain — query the Account (IsPersonAccount, PersonContactId), the User
(IsActive, ProfileId, ManagerId), the Employee2 (UserId, ContactId), and confirm the Employee
Hub permission set is the only PermissionSetAssignment (beyond the profile).
- Report using the output format below.
Rules / Constraints
| Constraint |
Rationale |
| Verify all five prerequisites before any mutation |
Prevents partial state when the org is not configured for UEL |
Always describe before a POST |
You need the exact input schema for each sObject |
| Confirm the plan with the user before creating records |
Prevents unintended record creation |
PersonEmail is required on Person Account create |
The Employee2 validation hook rejects a PersonContact with no Email |
Use UserId/ContactId field names on Employee2 |
The API rejects bare IDs under the relationship names |
Employee Hub Unified Employee User is the ONLY permset assigned |
UEL users are Employee Hub requesters, not fulfillers/agents — no other permsets are compatible |
| Omit null/empty foreign keys from create bodies |
The API rejects an explicit empty ManagerId |
Display the exact error from dispatch* on failure |
Helps diagnose issues |
| Never show Salesforce record IDs to the user |
Use human-readable names only |
Permissions Required
The executing admin user (the identity behind CORE_ORG_ALIAS) must have:
| Permission |
Purpose |
| Manage Internal Users |
Create User records |
| Manage Profiles and Permission Sets |
Assign permission sets |
| Customize Application |
Create Employee2 and Person Account records |
| Assign Permission Sets |
Create PermissionSetAssignment records |
Verification Checklist
Output Format
On failure, display the error from dispatch* exactly as returned.
On success:
UEL User Provisioning Complete (via service-itsm-agentic-setup-uel-user-create)
User:
Name: <FirstName> <LastName>
Username: <Username>
Email: <Email>
Profile: Unified Employee
Manager: <ManagerName> (or "not set")
Status: Active
Person Account:
Account Name: <FirstName> <LastName>
Person Contact: linked
Employee Record:
Department: <Department>
Title: <Title>
Location: <Location>
Employee No: <EmployeeNumber>
Hire Date: <HireDate>
Permission Set Assigned:
- Employee Hub Unified Employee User
Chain: User > Person Account > PersonContact > Employee2 > Employee Hub permset
No record IDs in user-facing output — use human-readable names only.
Reference File Index
| File |
When to read |
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 |
Related Skills
This skill provisions a Unified Employee License (UEL) user with the full entity chain. Two
adjacent flows are out of scope: creating a standard (non-UEL) user, and cloning an existing
user's full access configuration. Handle those requests separately — this skill does not cover them.
1---2name: service-itsm-agentic-setup-uel-user-create3description: 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---5
6# Create and Enable a Unified Employee (UEL) User
7
8Provision an employee under the Unified Employee License (UEL) by creating and linking a `User`
9on the Unified Employee license/profile, a Person `Account` (with an auto-generated `Contact`), and
10an `Employee2` record, then assigning the required permission sets. Every operation runs through
11the **Salesforce-hosted headless-360 MCP server** (server key `headless-360`) via its four
12meta-tools (`discover`, `describe`, `dispatch_readonly`, `dispatch`). The org is derived from the
13OAuth JWT bound to the current MCP session — the skill never handles an org id, alias, or
14credentials — so the flow behaves identically against **production** and sandbox with no per-user
15MCP install.
16
17## Scope
18
19- **In scope**: Creating a new UEL User, Person Account, Employee2 record; assigning permission
20 sets; verifying the full chain.
21- **Out of scope**: Standard user creation (non-UEL); cloning existing users; managing existing
22 user permissions only; deactivating users; license assignment changes.
23
24---
25
26## Routes at a glance
27
28Reads dispatch through `mcp__headless-360__dispatch_readonly`; writes through
29`mcp__headless-360__dispatch`. Both take raw HTTP:
30`{"url": "<path>", "method": "GET|POST", "body"?: {...}, "queryParams"?: {...}}`. Full URL paths and
31request/response bodies for every row live in `references/mcp-invocation.md`; this table lists only
32the operation and HTTP method.
33
34| Concern | Method + operation | Notes |
35|---------|--------------------|-------|
36| Unified Employee license | `GET /query` (UserLicense) | Zero rows → stop |
37| Unified Employee profile | `GET /query` (Profile) | Zero rows → stop |
38| Person Account record type | `GET /query` (RecordType, IsPersonType) | Zero rows → stop |
39| Employee Hub perm set | `GET /query` (PermissionSet) | Mandatory; zero rows → stop |
40| Employee2 accessible | `GET /sobjects/Employee2/describe` | 200 = HR module enabled |
41| Resolve manager | `GET /query` (User by Username/Name) | Active users only |
42| Create user | `POST /sobjects/User` | Profile = Unified Employee |
43| Assign Employee Hub set | `POST /sobjects/PermissionSetAssignment` | Mandatory |
44| Create Person Account | `POST /sobjects/Account` | `PersonEmail` required |
45| Read PersonContact | `GET /query` (Account) | Capture `PersonContactId` |
46| Create Employee2 | `POST /sobjects/Employee2` | Use `UserId`/`ContactId` field names |
47| Verify chain | `GET /query` | User + Account + Employee2 + perm sets |
48
49**Response envelope**: `describe`, `/query`, and `/sobjects/…` are all standard REST — the
50`dispatch*` tool returns the HTTP status plus the parsed body: `{ "status_code": 200, "body": <REST
51response> }`. Read `body`. A create returns `body.id` and `body.success == true`; a query returns
52`body.records[]`. Status codes: `200/201` success; `400` bad body (re-check schema via `describe`);
53`401`/auth error the MCP session needs re-auth; `404` the endpoint/impl is not present on this org;
54`500` a downstream dependency issue.
55
56---
57
58## Required Inputs
59
60Collect from the user (ask only what is not already in conversation context):
61
62### Identity (required)
63
64| Field | Description |
65|-------|-------------|
66| `FirstName` | Employee first name |
67| `LastName` | Employee last name |
68| `Email` | Employee email address |
69
70### Credentials & Locale (required)
71
72| Field | Description | Example |
73|-------|-------------|---------|
74| `Username` | Email-formatted, globally unique | `jane.doe@company.uel.com` |
75| `Alias` | Max 8 chars | `jdoe` |
76| `TimeZoneSidKey` | Timezone | `America/Los_Angeles` |
77| `LocaleSidKey` | Locale | `en_US` |
78| `LanguageLocaleKey` | Language | `en_US` |
79| `EmailEncodingKey` | Email encoding | `UTF-8` |
80
81### Manager (optional)
82
83| Field | Description |
84|-------|-------------|
85| `ManagerName` or `ManagerUsername` | Resolve to ManagerId via SOQL |
86
87### HR Attributes for Employee2 (required)
88
89| Field | Description |
90|-------|-------------|
91| `Department` | Employee department |
92| `Location` | Employee location |
93| `EmployeeNumber` | HR employee number |
94| `Title` | Job title |
95| `HireDate` | Date format: YYYY-MM-DD |
96
97### Permission Sets
98
99`Employee Hub Unified Employee User` (`EmployeeHubEmployeeUser`) is **always assigned** — no other
100permission sets belong on a UEL user. If the caller asks for extras (Incident Fulfiller, Case
101Agent, or any other fulfiller/agent-role set), decline: those are for **fulfillers** on the Service
102Cloud side, not for **requesters** who log into the Employee Hub. Point the caller at the
103appropriate fulfiller user-create flow instead of extending this one.
104
105---
106
107## Workflow
108
109All steps are sequential. **Always read before you write.** Every call goes through
110`mcp__headless-360__*` tools. Stop and report if any step fails.
111
112### Phase 1 — Preflight & discovery
113
114**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).
115
1161. **Discover the operations** — `mcp__headless-360__discover(query="create User Account Employee2 sObject")`
117 and `mcp__headless-360__describe(id=<operation_id>)` for the `POST /sobjects/User`,
118 `POST /sobjects/Account`, and `POST /sobjects/Employee2` operations to confirm they are indexed
119 and pull the input schema. A `discover` miss does **not** mean the route is absent — the
120 `/sobjects/…` REST endpoints are core Data API paths and can be invoked directly with
121 `dispatch_readonly` / `dispatch` against the exact URL (see `references/mcp-invocation.md`). If a
122 direct `dispatch_readonly` probe at the documented path also fails (404), direct the user to the
123 Setup UI.
1242. **Verify all five UEL prerequisites** (all read-only `/query` or describe). If any fails,
125 **stop** and report exactly which prerequisite is missing:
126 - Unified Employee **license** exists → else "Unified Employee license not found in this org."
127 - Unified Employee **profile** exists → else "Unified Employee profile not found. Ensure UEL license is provisioned."
128 - Active **Person Account record type** exists → else "No active Person Account record type found. Enable Person Accounts in Setup."
129 - **Employee Hub** permission set exists → else "Employee Hub Unified Employee User permission set not found. This is required for UEL provisioning."
130 - **Employee2** describe returns 200 → else "Employee2 sObject not accessible. Ensure the HR module is enabled."
131
132 Capture: `UnifiedEmployeeProfileId`, `PersonAccountRecordTypeId`, `EmployeeHubPermSetId`.
133
134### Phase 2 — Resolve references
135
1363. **Resolve the manager** — when the user supplied a manager, query by Username or Name (active
137 users only). On multiple matches, present options and ask the user to disambiguate. Capture
138 `ManagerId`. When no manager was supplied, skip this step.
1394. **Check username uniqueness** — query `User` by `Username`; any record → **stop**, username taken.
140
141### Phase 3 — Confirm & create the chain
142
1435. **Confirm the plan** — present the full configuration (including HR attributes) and wait for
144 explicit confirmation before any mutation.
1456. **Create the User** — `POST /sobjects/User` with identity, locale, `ProfileId` =
146 `UnifiedEmployeeProfileId`, and `ManagerId` (omit `ManagerId` when none). Capture `NewUserId`.
1477. **Assign the Employee Hub permission set (mandatory)** — `POST /sobjects/PermissionSetAssignment`
148 with `{AssigneeId: NewUserId, PermissionSetId: EmployeeHubPermSetId}`. If this fails, **stop** and
149 report the exact error — the set exists (verified) but may be incompatible with the license.
1508. **Create the Person Account** — `POST /sobjects/Account` with `FirstName`, `LastName`,
151 `PersonEmail` (**required**), and `RecordTypeId` = `PersonAccountRecordTypeId`. Capture
152 `NewAccountId`. `PersonEmail` must be set: the Employee2 validation hook rejects the record when
153 the linked PersonContact is missing `Email` or `LastName`.
1549. **Verify the PersonContact** — query the Account for `IsPersonAccount` and `PersonContactId`.
155 Confirm `IsPersonAccount = true` and capture `PersonContactId`. If it is null, **stop** and
156 report failure to generate the PersonContact.
15710. **Create the Employee2 record** — `POST /sobjects/Employee2` with `UserId` = `NewUserId`,
158 `ContactId` = `PersonContactId`, and the HR attributes. Use the foreign-key field names
159 `UserId`/`ContactId` (not the relationship names `User`/`Contact`). Capture `NewEmployee2Id`.
160
161### Phase 4 — Verify & present
162
16311. **Verify the full chain** — query the Account (IsPersonAccount, PersonContactId), the User
164 (IsActive, ProfileId, ManagerId), the Employee2 (UserId, ContactId), and confirm the Employee
165 Hub permission set is the only PermissionSetAssignment (beyond the profile).
16612. **Report** using the output format below.
167
168---
169
170## Rules / Constraints
171
172| Constraint | Rationale |
173|-----------|-----------|
174| Verify all five prerequisites before any mutation | Prevents partial state when the org is not configured for UEL |
175| Always `describe` before a `POST` | You need the exact input schema for each sObject |
176| Confirm the plan with the user before creating records | Prevents unintended record creation |
177| `PersonEmail` is required on Person Account create | The Employee2 validation hook rejects a PersonContact with no Email |
178| Use `UserId`/`ContactId` field names on Employee2 | The API rejects bare IDs under the relationship names |
179| `Employee Hub Unified Employee User` is the ONLY permset assigned | UEL users are Employee Hub requesters, not fulfillers/agents — no other permsets are compatible |
180| Omit null/empty foreign keys from create bodies | The API rejects an explicit empty `ManagerId` |
181| Display the exact error from `dispatch*` on failure | Helps diagnose issues |
182| Never show Salesforce record IDs to the user | Use human-readable names only |
183
184---
185
186## Permissions Required
187
188The executing admin user (the identity behind `CORE_ORG_ALIAS`) must have:
189
190| Permission | Purpose |
191|-----------|---------|
192| Manage Internal Users | Create User records |
193| Manage Profiles and Permission Sets | Assign permission sets |
194| Customize Application | Create Employee2 and Person Account records |
195| Assign Permission Sets | Create PermissionSetAssignment records |
196
197---
198
199## Verification Checklist
200
201- [ ] 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?
202- [ ] Did all five UEL prerequisites pass (license, profile, Person Account RT, Employee Hub set, Employee2)?
203- [ ] Did you confirm the username is unique and confirm the plan before any mutation?
204- [ ] Is `Account.IsPersonAccount = true` with a non-null `PersonContactId`?
205- [ ] Is `User.IsActive = true` on the Unified Employee profile (and manager, if provided)?
206- [ ] Does `Employee2` link `UserId` and `ContactId` correctly?
207- [ ] Is `Employee Hub Unified Employee User` the only permission set assigned (no fulfiller-side extras)?
208
209---
210
211## Output Format
212
213On **failure**, display the error from `dispatch*` exactly as returned.
214
215On **success**:
216
217```text
218UEL User Provisioning Complete (via service-itsm-agentic-setup-uel-user-create)
219
220User:
221 Name: <FirstName> <LastName>
222 Username: <Username>
223 Email: <Email>
224 Profile: Unified Employee
225 Manager: <ManagerName> (or "not set")
226 Status: Active
227
228Person Account:
229 Account Name: <FirstName> <LastName>
230 Person Contact: linked
231
232Employee Record:
233 Department: <Department>
234 Title: <Title>
235 Location: <Location>
236 Employee No: <EmployeeNumber>
237 Hire Date: <HireDate>
238
239Permission Set Assigned:
240 - Employee Hub Unified Employee User
241
242Chain: User > Person Account > PersonContact > Employee2 > Employee Hub permset
243```
244
245No record IDs in user-facing output — use human-readable names only.
246
247---
248
249## Reference File Index
250
251| File | When to read |
252|------|--------------|
253| `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 |
254
255---
256
257## Related Skills
258
259This skill provisions a **Unified Employee License (UEL)** user with the full entity chain. Two
260adjacent flows are out of scope: creating a **standard** (non-UEL) user, and **cloning** an existing
261user's full access configuration. Handle those requests separately — this skill does not cover them.