service-itsm-agentic-setup-uel-user-create
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate and Enable a Unified Employee (UEL) User
创建并启用Unified Employee (UEL)用户
Provision an employee under the Unified Employee License (UEL) by creating and linking a
on the Unified Employee license/profile, a Person (with an auto-generated ), and
an record, then assigning the required permission sets. Every operation runs through
the Salesforce-hosted headless-360 MCP server (server key ) via its four
meta-tools (, , , ). 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.
UserAccountContactEmployee2headless-360discoverdescribedispatch_readonlydispatch通过创建并关联Unified Employee许可/配置文件下的、Person (含自动生成的)以及记录,然后分配所需权限集,为员工配置Unified Employee License (UEL)。所有操作均通过Salesforce托管的headless-360 MCP服务器(服务器密钥)及其四个元工具(、、、)执行。组织信息由绑定到当前MCP会话的OAuth JWT派生而来——本技能从不处理组织ID、别名或凭据——因此该流程在生产环境和沙箱中的表现完全一致,无需为每个用户安装MCP。
UserAccountContactEmployee2headless-360discoverdescribedispatch_readonlydispatchScope
适用范围
- 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.
- 包含场景:创建新的UEL User、Person Account、Employee2记录;分配权限集;验证完整实体链。
- 排除场景:创建标准用户(非UEL);克隆现有用户;仅管理现有用户权限;停用用户;更改许可分配。
Routes at a glance
路由概览
Reads dispatch through ; writes through
. Both take raw HTTP:
. Full URL paths and
request/response bodies for every row live in ; this table lists only
the operation and HTTP method.
mcp__headless-360__dispatch_readonlymcp__headless-360__dispatch{"url": "<path>", "method": "GET|POST", "body"?: {...}, "queryParams"?: {...}}references/mcp-invocation.md| Concern | Method + operation | Notes |
|---|---|---|
| Unified Employee license | | Zero rows → stop |
| Unified Employee profile | | Zero rows → stop |
| Person Account record type | | Zero rows → stop |
| Employee Hub perm set | | Mandatory; zero rows → stop |
| Employee2 accessible | | 200 = HR module enabled |
| Resolve manager | | Active users only |
| Create user | | Profile = Unified Employee |
| Assign Employee Hub set | | Mandatory |
| Create Person Account | | |
| Read PersonContact | | Capture |
| Create Employee2 | | Use |
| Verify chain | | User + Account + Employee2 + perm sets |
Response envelope: , , and are all standard REST — the
tool returns the HTTP status plus the parsed body: . Read . A create returns and ; a query returns
. Status codes: success; bad body (re-check schema via );
/auth error the MCP session needs re-auth; the endpoint/impl is not present on this org;
a downstream dependency issue.
describe/query/sobjects/…dispatch*{ "status_code": 200, "body": <REST response> }bodybody.idbody.success == truebody.records[]200/201400describe401404500读取操作通过执行;写入操作通过执行。两者均接受原始HTTP请求:。每行的完整URL路径以及请求/响应体均位于中;本表仅列出操作和HTTP方法。
mcp__headless-360__dispatch_readonlymcp__headless-360__dispatch{"url": "<path>", "method": "GET|POST", "body"?: {...}, "queryParams"?: {...}}references/mcp-invocation.md| 事项 | 方法 + 操作 | 说明 |
|---|---|---|
| Unified Employee许可 | | 无结果则终止 |
| Unified Employee配置文件 | | 无结果则终止 |
| Person Account记录类型 | | 无结果则终止 |
| Employee Hub权限集 | | 必填;无结果则终止 |
| Employee2可访问性 | | 返回200表示HR模块已启用 |
| 解析经理信息 | | 仅查询活跃用户 |
| 创建用户 | | Profile = Unified Employee |
| 分配Employee Hub权限集 | | 必填 |
| 创建Person Account | | |
| 读取PersonContact | | 捕获 |
| 创建Employee2 | | 使用 |
| 验证实体链 | | 验证User + Account + Employee2 + 权限集 |
响应包:、和均为标准REST接口——工具返回HTTP状态码及解析后的响应体:。读取字段即可。创建操作返回且;查询操作返回。状态码说明:表示成功;表示请求体无效(需通过重新检查 schema);/认证错误表示MCP会话需重新认证;表示该组织不存在此端点/实现;表示下游依赖出现问题。
describe/query/sobjects/…dispatch*{ "status_code": 200, "body": <REST响应> }bodybody.idbody.success == truebody.records[]200/201400describe401404500Required Inputs
必填输入项
Collect from the user (ask only what is not already in conversation context):
从用户处收集信息(仅询问对话上下文未包含的内容):
Identity (required)
身份信息(必填)
| Field | Description |
|---|---|
| Employee first name |
| Employee last name |
| Employee email address |
| 字段 | 描述 |
|---|---|
| 员工名 |
| 员工姓 |
| 员工邮箱地址 |
Credentials & Locale (required)
凭据与区域设置(必填)
| Field | Description | Example |
|---|---|---|
| Email-formatted, globally unique | |
| Max 8 chars | |
| Timezone | |
| Locale | |
| Language | |
| Email encoding | |
| 字段 | 描述 | 示例 |
|---|---|---|
| 邮箱格式,全局唯一 | |
| 最多8个字符 | |
| 时区 | |
| 区域设置 | |
| 语言 | |
| 邮箱编码 | |
Manager (optional)
经理信息(可选)
| Field | Description |
|---|---|
| Resolve to ManagerId via SOQL |
| 字段 | 描述 |
|---|---|
| 通过SOQL解析为ManagerId |
HR Attributes for Employee2 (required)
Employee2的HR属性(必填)
| Field | Description |
|---|---|
| Employee department |
| Employee location |
| HR employee number |
| Job title |
| Date format: YYYY-MM-DD |
| 字段 | 描述 |
|---|---|
| 员工部门 |
| 员工办公地点 |
| HR员工编号 |
| 职位名称 |
| 日期格式:YYYY-MM-DD |
Permission Sets
权限集
Employee Hub Unified Employee UserEmployeeHubEmployeeUserEmployee Hub Unified Employee UserEmployeeHubEmployeeUserWorkflow
工作流程
All steps are sequential. Always read before you write. Every call goes through
tools. Stop and report if any step fails.
mcp__headless-360__*所有步骤均按顺序执行。写入前务必先读取。所有调用均通过工具执行。若任何步骤失败,需立即终止并上报。
mcp__headless-360__*Phase 1 — Preflight & discovery
阶段1 — 预检与发现
On any / / from a / / / call below, halt and surface the raw error — the org or client is not configured correctly. → headless-360 MCP client not authenticated to (session expired). → executing user is missing one of the required perms (, , , ) OR the org lacks the Unified Employee License. → the target sObject / route is not available (HR module / UEL not provisioned — surfaces separately as the five prerequisite checks in step 2).
401403404discoverdescribedispatchdispatch_readonly401CORE_ORG_ALIAS403ManageUsersManageProfilesPermissionsetsCustomizeApplicationAssignPermissionSets404-
Discover the operations —and
mcp__headless-360__discover(query="create User Account Employee2 sObject")for themcp__headless-360__describe(id=<operation_id>),POST /sobjects/User, andPOST /sobjects/Accountoperations to confirm they are indexed and pull the input schema. APOST /sobjects/Employee2miss does not mean the route is absent — thediscoverREST endpoints are core Data API paths and can be invoked directly with/sobjects/…/dispatch_readonlyagainst the exact URL (seedispatch). If a directreferences/mcp-invocation.mdprobe at the documented path also fails (404), direct the user to the Setup UI.dispatch_readonly -
Verify all five UEL prerequisites (all read-onlyor describe). If any fails, stop and report exactly which prerequisite is missing:
/query- 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
若以下///调用返回//,需立即终止并显示原始错误——组织或客户端配置不正确。表示headless-360 MCP客户端未通过认证(会话已过期)。表示执行用户缺少必要权限(、、、),或组织未配置Unified Employee许可。表示目标sObject/路由不可用(HR模块/UEL未配置——会在步骤2的五项前置检查中单独提示)。
discoverdescribedispatchdispatch_readonly401403404401CORE_ORG_ALIAS403ManageUsersManageProfilesPermissionsetsCustomizeApplicationAssignPermissionSets404-
发现操作——调用,并针对
mcp__headless-360__discover(query="create User Account Employee2 sObject")、POST /sobjects/User和POST /sobjects/Account操作调用POST /sobjects/Employee2,确认操作已被索引并获取输入schema。mcp__headless-360__describe(id=<operation_id>)未找到结果不代表路由不存在——discoverREST端点是核心Data API路径,可直接使用/sobjects/…/dispatch_readonly调用精确URL(详见dispatch)。若直接调用文档路径的references/mcp-invocation.md也返回失败(404),请引导用户前往Setup UI进行配置。dispatch_readonly -
验证五项UEL前置条件(均为只读或describe操作)。若任何一项失败,立即终止并明确上报缺失的前置条件:
/query- 存在Unified Employee 许可 → 否则提示"此组织中未找到Unified Employee许可。"
- 存在Unified Employee 配置文件 → 否则提示"未找到Unified Employee配置文件,请确保已配置UEL许可。"
- 存在活跃的Person Account记录类型 → 否则提示"未找到活跃的Person Account记录类型,请在Setup中启用Person Accounts。"
- 存在Employee Hub权限集 → 否则提示"未找到Employee Hub Unified Employee User权限集,这是UEL配置的必填项。"
- Employee2 describe返回200 → 否则提示"无法访问Employee2 sObject,请确保HR模块已启用。"
捕获以下ID:、UnifiedEmployeeProfileId、PersonAccountRecordTypeId。EmployeeHubPermSetId
Phase 2 — Resolve references
阶段2 — 解析引用信息
- 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
. When no manager was supplied, skip this step.
ManagerId - Check username uniqueness — query by
User; any record → stop, username taken.Username
- 解析经理信息——若用户提供了经理信息,通过Username或Name查询(仅查询活跃用户)。若存在多个匹配结果,需提供选项并请用户明确选择。捕获。若未提供经理信息,跳过此步骤。
ManagerId - 检查用户名唯一性——通过查询
Username;若存在记录则立即终止,提示用户名已被占用。User
Phase 3 — Confirm & create the chain
阶段3 — 确认并创建实体链
- Confirm the plan — present the full configuration (including HR attributes) and wait for explicit confirmation before any mutation.
- Create the User — with identity, locale,
POST /sobjects/User=ProfileId, andUnifiedEmployeeProfileId(omitManagerIdwhen none). CaptureManagerId.NewUserId - Assign the Employee Hub permission set (mandatory) — with
POST /sobjects/PermissionSetAssignment. If this fails, stop and report the exact error — the set exists (verified) but may be incompatible with the license.{AssigneeId: NewUserId, PermissionSetId: EmployeeHubPermSetId} - Create the Person Account — with
POST /sobjects/Account,FirstName,LastName(required), andPersonEmail=RecordTypeId. CapturePersonAccountRecordTypeId.NewAccountIdmust be set: the Employee2 validation hook rejects the record when the linked PersonContact is missingPersonEmailorEmail.LastName - Verify the PersonContact — query the Account for and
IsPersonAccount. ConfirmPersonContactIdand captureIsPersonAccount = true. If it is null, stop and report failure to generate the PersonContact.PersonContactId - Create the Employee2 record — with
POST /sobjects/Employee2=UserId,NewUserId=ContactId, and the HR attributes. Use the foreign-key field namesPersonContactId/UserId(not the relationship namesContactId/User). CaptureContact.NewEmployee2Id
- 确认配置方案——向用户展示完整配置信息(含HR属性),等待用户明确确认后再执行任何修改操作。
- 创建User——调用,传入身份信息、区域设置、
POST /sobjects/User=ProfileId,以及UnifiedEmployeeProfileId(未提供则省略)。捕获ManagerId。NewUserId - 分配Employee Hub权限集(必填)——调用,传入
POST /sobjects/PermissionSetAssignment。若此步骤失败,立即终止并上报具体错误——权限集已存在(已验证),但可能与许可不兼容。{AssigneeId: NewUserId, PermissionSetId: EmployeeHubPermSetId} - 创建Person Account——调用,传入
POST /sobjects/Account、FirstName、LastName(必填),以及PersonEmail=RecordTypeId。捕获PersonAccountRecordTypeId。必须设置NewAccountId:当关联的PersonContact缺少PersonEmail或Email时,Employee2验证钩子会拒绝该记录。LastName - 验证PersonContact——查询Account的和
IsPersonAccount。确认PersonContactId并捕获IsPersonAccount = true。若PersonContactId为空,立即终止并上报生成PersonContact失败。PersonContactId - 创建Employee2记录——调用,传入
POST /sobjects/Employee2=UserId、NewUserId=ContactId,以及HR属性。使用外键字段名PersonContactId/UserId(而非关系名ContactId/User)。捕获Contact。NewEmployee2Id
Phase 4 — Verify & present
阶段4 — 验证并反馈
- 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.
- 验证完整实体链——查询Account(IsPersonAccount、PersonContactId)、User(IsActive、ProfileId、ManagerId)、Employee2(UserId、ContactId),并确认仅分配了Employee Hub权限集(配置文件自带权限除外)。
- 按以下格式反馈结果。
Rules / Constraints
规则/约束
| Constraint | Rationale |
|---|---|
| Verify all five prerequisites before any mutation | Prevents partial state when the org is not configured for UEL |
Always | You need the exact input schema for each sObject |
| Confirm the plan with the user before creating records | Prevents unintended record creation |
| The Employee2 validation hook rejects a PersonContact with no Email |
Use | The API rejects bare IDs under the relationship names |
| 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 |
Display the exact error from | Helps diagnose issues |
| Never show Salesforce record IDs to the user | Use human-readable names only |
| 约束 | 理由 |
|---|---|
| 执行任何修改前验证所有五项前置条件 | 避免组织未配置UEL时出现部分状态 |
执行 | 需要获取每个sObject的精确输入schema |
| 创建记录前需与用户确认配置方案 | 防止意外创建记录 |
创建Person Account时必须填写 | 当PersonContact无Email时,Employee2验证钩子会拒绝该记录 |
在Employee2中使用 | API会拒绝使用关系名传入裸ID |
仅分配 | UEL用户是Employee Hub请求者,而非执行者/代理——其他权限集均不兼容 |
| 创建请求体中省略空值/空外键 | API会拒绝显式传入空 |
失败时显示 | 便于排查问题 |
| 绝不向用户展示Salesforce记录ID | 仅使用易读的名称 |
Permissions Required
所需权限
The executing admin user (the identity behind ) must have:
CORE_ORG_ALIAS| 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 |
执行操作的管理员用户(对应的身份)必须拥有以下权限:
CORE_ORG_ALIAS| 权限 | 用途 |
|---|---|
| Manage Internal Users | 创建User记录 |
| Manage Profiles and Permission Sets | 分配权限集 |
| Customize Application | 创建Employee2和Person Account记录 |
| Assign Permission Sets | 创建PermissionSetAssignment记录 |
Verification Checklist
验证清单
- Did +
discover(or, on adescribe(id)miss, a directdiscoverprobe at the documenteddispatch_readonlypath) confirm the User / Account / Employee2 create operations?/sobjects/… - Did all five UEL prerequisites pass (license, profile, Person Account RT, Employee Hub set, Employee2)?
- Did you confirm the username is unique and confirm the plan before any mutation?
- Is with a non-null
Account.IsPersonAccount = true?PersonContactId - Is on the Unified Employee profile (and manager, if provided)?
User.IsActive = true - Does link
Employee2andUserIdcorrectly?ContactId - Is the only permission set assigned (no fulfiller-side extras)?
Employee Hub Unified Employee User
- 是否已通过+
discover(若describe(id)未找到结果,则直接调用文档中discover路径的/sobjects/…)确认User/Account/Employee2的创建操作可用?dispatch_readonly - 五项UEL前置条件是否全部通过(许可、配置文件、Person Account记录类型、Employee Hub权限集、Employee2)?
- 是否已确认用户名唯一,并在执行修改前与用户确认配置方案?
- 是否为
Account.IsPersonAccount且true非空?PersonContactId - 是否为
User.IsActive且使用Unified Employee配置文件(若提供了经理信息,经理用户也需满足此条件)?true - 是否正确关联了
Employee2和UserId?ContactId - 是否仅分配了权限集(无执行者侧额外权限集)?
Employee Hub Unified Employee User
Output Format
输出格式
On failure, display the error from exactly as returned.
dispatch*On success:
text
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 permsetNo record IDs in user-facing output — use human-readable names only.
失败时,直接显示返回的错误信息。
dispatch*成功时:
text
UEL用户配置完成(通过service-itsm-agentic-setup-uel-user-create)
用户信息:
姓名: <FirstName> <LastName>
用户名: <Username>
邮箱: <Email>
配置文件: Unified Employee
经理: <ManagerName>(或"未设置")
状态: 活跃
Person Account:
账户名称: <FirstName> <LastName>
联系人: 已关联
员工记录:
部门: <Department>
职位: <Title>
办公地点: <Location>
员工编号: <EmployeeNumber>
入职日期: <HireDate>
已分配权限集:
- Employee Hub Unified Employee User
实体链: User > Person Account > PersonContact > Employee2 > Employee Hub权限集用户可见的输出中不得包含记录ID——仅使用易读名称。
Reference File Index
参考文件索引
| File | When to read |
|---|---|
| Every phase — exact |
| 文件 | 阅读时机 |
|---|---|
| 所有阶段——精确的 |
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.
本技能用于配置带有完整实体链的Unified Employee License (UEL)用户。两个相邻流程不在本技能范围内:创建标准(非UEL)用户,以及克隆现有用户的完整权限配置。请单独处理这些请求——本技能不覆盖此类场景。