关于 persona-assistant
为 HR Agent 或虚拟 Agent 提供个性化员工服务指导的技能,根据员工角色、部门、地点、任职时间和交互记录调整回答与服务路由。它结合政策、可用服务和历史案例,支持定制化指导及必要时创建 HR 案例。
主要功能
- 01识别员工角色与多重画像
- 02检索地点相关政策和服务
- 03参考历史交互与未结案例
- 04按主题和画像确定 COE 路由
- 05创建带员工背景的 HR 案例
适用场景
- 01为新员工提供入职指导
- 02根据员工地点解释 HR 政策
- 03将员工咨询路由至合适的 COE
MCP 相关
说明使用 ServiceNow MCP 工具查询员工资料、部门、政策、服务、案例和 COE 配置,并在需要时创建 HR 案例。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ happy-technologies-llc/ happy-platform-skills --skill persona-assistant安装后在 Claude Code 中输入/persona-assistant确认已加载。
详细介绍
基于员工角色的 HR 助手
概述
此技能会根据员工的角色、部门、所在地、任职时间和交互历史调整回复和服务路由,从而提供个性化的 HR 协助。它可以帮助你:
- 识别员工角色(新员工、经理、高管、远程员工、承包商等)
- 展示符合特定角色的 HR 服务、政策和自助服务选项
- 根据员工角色和主题,将咨询转至正确的卓越中心(COE)
- 提供考虑所在地和部门因素的政策指导
- 利用案例历史预测需求,避免重复提供信息
- 提供个性化的入职、福利和职业发展指导
使用时机: HR Agent 或虚拟 Agent 需要结合员工的完整背景提供定制化 HR 协助时,或在设计由员工角色驱动的服务目录体验时。
先决条件
- 角色:
sn_hr_core.case_writer、sn_hr_core.agent或sn_hr_core.manager - 插件:
com.sn_hr_service_delivery(HR 服务交付)、com.sn_hr_service_portal(HR 服务门户,可选) - 访问权限: 对
sn_hr_core_profile、sn_hr_core_case、sn_hr_le_case_type、sn_hr_core_service、kb_knowledge和cmn_department的读取权限 - 知识: 熟悉组织的 HR 服务目录、COE 结构以及特定所在地的政策差异
操作步骤
步骤 1:识别员工并建立档案背景
检索完整的员工 HR 档案,以确定员工角色属性。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_core_profile
query: user=[employee_sys_id]
fields: sys_id,user,department,location,employment_type,hire_date,manager,job_title,cost_center,building,employee_type,benefits_eligible,pay_group,schedule,work_schedule,vip
limit: 1
使用 REST API:
GET /api/now/table/sn_hr_core_profile?sysparm_query=user=[employee_sys_id]&sysparm_fields=sys_id,user,department,location,employment_type,hire_date,manager,job_title,cost_center,building,employee_type,benefits_eligible,pay_group,schedule,work_schedule,vip&sysparm_display_value=true&sysparm_limit=1
步骤 2:检索用户详细信息和组织背景
从用户记录和部门层级中获取补充信息。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sys_user
query: sys_id=[employee_sys_id]
fields: sys_id,name,email,phone,title,department,location,manager,company,time_zone,preferred_language,roles
limit: 1
Tool: SN-Query-Table
Parameters:
table_name: cmn_department
query: sys_id=[department_sys_id]
fields: sys_id,name,parent,dept_head,company,description,business_unit
limit: 1
使用 REST API:
GET /api/now/table/sys_user/[employee_sys_id]?sysparm_fields=sys_id,name,email,phone,title,department,location,manager,company,time_zone,preferred_language,roles&sysparm_display_value=true
GET /api/now/table/cmn_department/[department_sys_id]?sysparm_fields=sys_id,name,parent,dept_head,company,business_unit&sysparm_display_value=true
步骤 3:确定员工角色
根据档案属性,将员工归为一个或多个角色类别:
=== PERSONA CLASSIFICATION ===
Employee: Jane Smith
Determined Persona(s): [Primary] Mid-Career Individual Contributor
[Secondary] Remote Worker
--- Persona Rules ---
| Attribute | Value | Persona Signal |
|------------------------|----------------------|--------------------------|
| Tenure | 4.8 years | Established employee |
| Employment Type | Full-time | Regular employee |
| Job Title | Senior Engineer | Individual contributor |
| Direct Reports | 0 | Non-manager |
| Location | Remote - US | Remote worker |
| Benefits Eligible | Yes | Full benefits access |
| VIP | No | Standard service tier |
--- Persona Categories ---
NEW_HIRE: hire_date within last 90 days
MANAGER: has direct reports or manager role
EXECUTIVE: C-level title or VIP flag
IC_EARLY: 0-2 years tenure, non-manager
IC_MID: 2-7 years tenure, non-manager
IC_SENIOR: 7+ years tenure, non-manager
CONTRACTOR: employment_type = Contractor
REMOTE_WORKER: location contains "Remote"
INTERNATIONAL: location outside primary country
PART_TIME: schedule indicates part-time
TRANSITIONING: active transfer or LOA case
步骤 4:检索所在地特定政策
获取与员工所在地相关的 HR 政策和知识文章。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: cmn_location
query: sys_id=[location_sys_id]
fields: sys_id,name,country,state,city,time_zone,parent,company
limit: 1
Tool: SN-Query-Table
Parameters:
table_name: kb_knowledge
query: workflow_state=published^kb_knowledge_base.titleLIKEHR^textLIKE[location_country]^ORshort_descriptionLIKE[location_state]
fields: sys_id,short_description,number,kb_category,valid_to,text
limit: 10
使用 REST API:
GET /api/now/table/kb_knowledge?sysparm_query=workflow_state=published^kb_knowledge_base.titleLIKEHR^short_descriptionLIKECalifornia&sysparm_fields=sys_id,short_description,number,kb_category,valid_to&sysparm_display_value=true&sysparm_limit=10
步骤 5:检索适用于员工角色的 HR 服务
获取适用于员工角色且符合其资格条件的 HR 服务。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_core_service
query: active=true^ORDERBYorder
fields: sys_id,name,description,category,hr_service_center,active,employee_visible,order
limit: 50
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_le_case_type
query: active=true^employee_visible=true
fields: sys_id,name,description,hr_service_center,category,fulfillment_group,sla,confidentiality
limit: 50
使用 REST API:
GET /api/now/table/sn_hr_core_service?sysparm_query=active=true^ORDERBYorder&sysparm_fields=sys_id,name,description,category,hr_service_center,employee_visible&sysparm_display_value=true&sysparm_limit=50
步骤 6:检查交互历史和未结案例
查看员工近期的 HR 交互记录,以便提供连贯的协助。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_core_case
query: subject_person=[employee_sys_id]^active=true^ORDERBYDESCopened_at
fields: sys_id,number,short_description,state,hr_service,assigned_to,assignment_group,opened_at,priority
limit: 10
使用 REST API:
GET /api/now/table/sn_hr_core_case?sysparm_query=subject_person=[employee_sys_id]^active=true^ORDERBYDESCopened_at&sysparm_fields=sys_id,number,short_description,state,hr_service,assigned_to,assignment_group,opened_at,priority&sysparm_display_value=true&sysparm_limit=10
步骤 7:确定正确的 COE 路由
根据员工角色和主题,确定应由哪个卓越中心处理咨询。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_le_center_of_excellence
query: active=true
fields: sys_id,name,description,assignment_group,location,supported_case_types,manager
limit: 20
使用 REST API:
GET /api/now/table/sn_hr_le_center_of_excellence?sysparm_query=active=true&sysparm_fields=sys_id,name,description,assignment_group,location,supported_case_types,manager&sysparm_display_value=true&sysparm_limit=20
步骤 8:生成个性化协助回复
撰写考虑员工角色并包含相关服务、政策和路由信息的回复:
=== PERSONALIZED HR ASSISTANCE ===
Employee: Jane Smith
Persona: Mid-Career IC | Remote Worker | California
Greeting: "Hi Jane, welcome back to HR Services."
--- Active Cases ---
You have 1 open case:
- HRC0012456: Benefits enrollment question (In Progress, assigned to Sarah Lee)
Status: Awaiting your response - please check your email
--- Contextual Services (Based on Your Persona) ---
For Remote Workers in California:
1. Home Office Equipment Request
-> Self-Service: Employee Portal > Workplace > Equipment
-> COE: Workplace Services
2. California-Specific Leave Policies
-> KB: KB0067891 - California Paid Family Leave Guide
-> KB: KB0067903 - CA Sick Leave Requirements
-> COE: Leave Administration - West Region
3. Remote Work Agreement Renewal
-> Self-Service: Employee Portal > Workplace > Remote Work
-> Note: Your agreement expires in 45 days
For Mid-Career Employees (4+ years):
4. Career Development & Internal Mobility
-> Self-Service: Employee Portal > Career > Job Board
-> COE: Talent Development
5. Sabbatical Eligibility (5-year tenure milestone approaching)
-> KB: KB0078234 - Sabbatical Program Guidelines
-> COE: Benefits Administration
6. Stock Vesting & Equity Questions
-> Self-Service: Employee Portal > Compensation > Equity
-> COE: Total Rewards
--- Quick Actions ---
- Update personal information: Portal > Profile > Personal Details
- View pay stubs: Portal > Pay > Pay History
- Request time off: Portal > Time Off > New Request
- Contact your HR partner: [HR_Partner_Name] ([email])
--- Routing Decision ---
Topic: [employee_inquiry]
Recommended COE: [matched_coe]
Assignment Group: [fulfillment_group]
Expected SLA: [sla_target]
步骤 9:必要时创建案例
如果咨询需要创建案例,请预先填入员工角色背景后再提交。
使用 MCP:
Tool: SN-Create-Record
Parameters:
table_name: sn_hr_core_case
data:
subject_person: [employee_sys_id]
short_description: [inquiry_summary]
hr_service: [matched_case_type_sys_id]
contact_type: chat
priority: 3
description: "Persona: Mid-Career IC, Remote Worker (CA). Inquiry: [details]. Employee tenure: 4.8 years. Open cases: 1."
使用 REST API:
POST /api/now/table/sn_hr_core_case
Content-Type: application/json
{
"subject_person": "[employee_sys_id]",
"short_description": "[inquiry_summary]",
"hr_service": "[matched_case_type_sys_id]",
"contact_type": "chat",
"priority": "3",
"description": "Persona: Mid-Career IC, Remote Worker (CA). Inquiry: [details]."
}
工具用法
MCP 工具参考
| 工具 | 使用时机 |
|---|---|
SN-Query-Table | 检索档案、服务、政策、案例和 COE 配置信息 |
SN-Natural-Language-Search | 使用自然语言查询查找相关知识库文章 |
SN-Get-Record | 获取特定查询所需的单条记录详情 |
SN-Create-Record | 创建预先填入员工角色背景的 HR 案例 |
SN-Add-Work-Notes | 记录员工角色分类和路由理由 |
REST API 参考
| 端点 | 方法 | 用途 |
|---|---|---|
/api/now/table/sn_hr_core_profile | GET | 员工 HR 资料和角色属性 |
/api/now/table/sys_user | GET | 用户账户详情 |
/api/now/table/cmn_department | GET | 部门层级上下文 |
/api/now/table/cmn_location | GET | 用于政策匹配的地点详情 |
/api/now/table/sn_hr_core_service | GET | 可用的 HR 服务 |
/api/now/table/sn_hr_le_case_type | GET | 案例类型和资格条件 |
/api/now/table/sn_hr_le_center_of_excellence | GET | COE 路由配置 |
/api/now/table/kb_knowledge | GET | HR 政策知识文章 |
/api/now/table/sn_hr_core_case | GET/POST | 员工案例历史记录和创建 |
最佳实践
- 缓存角色分类: 保存角色判定结果,这样在同一会话中无需每次交互都重新计算
- 叠加角色: 员工通常符合多个角色(例如,经理 + 远程办公者);组合所有适用角色的相关服务
- 优先处理未结案例: 始终优先显示未结案例,让员工在创建重复案例前查看状态
- 使用地点层级: 找不到特定地点的政策时,依次回退到州、国家/地区,再到全球政策
- 遵循 VIP 处理方式: 标记为 VIP 的员工应获得加急路由和贵宾服务选项
- 调整语言风格: 根据角色匹配沟通风格(高管偏好简洁摘要;新员工需要更多指导)
- 跟踪角色效果: 监控哪些由角色驱动的建议会促成案例创建,哪些会促成自助解决,以完善角色规则
- 谨慎处理承包商: 承包商的福利资格、政策访问权限和服务权益各不相同;务必检查
employment_type
故障排除
“未找到员工资料”
原因: 新员工或临时员工可能尚未创建 HR 资料
解决方案: 回退到 sys_user 获取基本详情。根据用户记录字段(部门、地点、职位)创建最简角色
“COE 路由返回多个匹配项”
原因: 某些咨询主题涉及多个 COE(例如,搬迁涉及福利 + 工作场所) 解决方案: 使用主要主题选择牵头 COE,并在案例描述中注明次要 COE,以便协作
“没有可用的特定地点政策”
原因: KB 文章可能未标记地点元数据
解决方案: 使用政策主题结合文章文本中的地点关键词进行搜索。检查 sn_hr_sp_content,查看可能经过地点筛选的门户内容
“服务目录显示了员工不符合资格的服务”
原因: 资格规则可能配置在目录项目级别,而非服务记录中
解决方案: 检查 sn_hr_le_case_type 中的 employee_visible,以及任何限制访问权限的关联用户条件记录
示例
示例 1:新员工入职协助
输入:“帮助入职 5 天的新员工”
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_core_profile
query: user=[new_hire_sys_id]
fields: sys_id,user,department,location,hire_date,manager,job_title,employment_type,benefits_eligible
limit: 1
角色: NEW_HIRE(任职时间 < 90 天)
个性化回复: “欢迎加入团队!以下是你优先处理的入职任务:
- 完成 I-9 验证(须在入职后 3 天内完成)
- 参加福利计划(30 天参保期限 — 截止日期:[date])
- 设置直接存款(Portal > Pay > Direct Deposit)
- 完成必修培训课程(Portal > Learning > My Assignments) 你的 HR 入职联系人是 Onboarding COE 的 [Name]。”
示例 2:经理请求团队支持
**输入:**经理询问团队休假政策
Tool: SN-Query-Table
Parameters:
table_name: sn_hr_core_profile
query: manager=[manager_sys_id]
fields: sys_id,user,department,location,employment_type,hire_date,job_title
limit: 50
角色: MANAGER(有直接下属)
个性化回复包括:
- 经理专用的休假审批工具
- 团队缺勤日历链接
- 团队休假安排管理政策指南
- 复杂休假情形(FMLA、ADA)的升级处理途径
示例 3:国际员工政策查询
**输入:**来自德国员工的问题:“我符合哪些福利条件?”
Tool: SN-Query-Table
Parameters:
table_name: kb_knowledge
query: workflow_state=published^kb_knowledge_base.titleLIKEHR^textLIKEGermany^ORshort_descriptionLIKEEMEA
fields: sys_id,short_description,number,kb_category
limit: 10
**用户画像:**国际(所在地:德国慕尼黑)
转至 EMEA 福利 COE,并提供德国特定的政策文章和当地 HR 合作伙伴联系方式。
相关技能
hrsd/case-summarization- 总结案例历史,为用户画像提供上下文hrsd/chat-reply-recommendation- 生成兼顾用户画像的聊天回复hrsd/sentiment-analysis- 将情绪分析纳入基于用户画像的路由hrsd/resume-skill-extraction- 支持内部流动用户画像需求catalog/item-creation- 创建特定用户画像的服务目录条目