关于 email-recommendation
面向 ServiceNow CSM Agent 的技能,可结合案例详情、邮件往来、知识文章、客户情绪和 SLA 状态撰写客户邮件草稿,并提供确认、更新、解决方案或升级等不同版本。
主要功能
- 01分析案例背景与邮件记录
- 02评估客户情绪和 SLA 状态
- 03搜索知识文章中的解决方案
- 04生成模板或自定义回复
- 05提供多种场景回复版本
适用场景
- 01回复新的客户咨询
- 02发送案例状态更新
- 03通过邮件分享解决方案
- 04通知客户案例已升级
MCP 相关
使用 SN-Get-Record、SN-Query-Table 和 SN-Natural-Language-Search 等 ServiceNow MCP 工具,检索案例、邮件、SLA 和知识数据。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ happy-technologies-llc/ happy-platform-skills --skill email-recommendation安装后在 Claude Code 中输入/email-recommendation确认已加载。
详细介绍
电子邮件建议
概述
此技能可为客户服务管理(CSM)案例生成专业且符合上下文的电子邮件回复草稿。它可以帮助你:
- 分析完整的案例上下文,包括问题描述、类别、优先级和当前状态
- 查看电子邮件沟通历史,确保对话连贯
- 搜索知识库,查找相关解决方案和参考资料
- 根据以往沟通评估客户情绪,调整语气
- 生成结构恰当、富有同理心且包含解决方案内容的模板式或自定义电子邮件草稿
- 针对不同场景提供多种回复版本(确认收到、进度更新、问题解决、升级处理)
适用场景: CSM Agent 需要撰写专业的电子邮件来回复客户咨询、提供状态更新、分享解决方案,或通过电子邮件处理升级事项时。
前提条件
- 角色:
sn_customerservice_agent、sn_customerservice_manager或csm_admin - 访问权限: 对
sn_customerservice_case、sys_email、kb_knowledge、sys_journal_field、customer_account、customer_contact和sn_customerservice_sla表具有读取权限 - 知识: 熟悉所在组织的电子邮件沟通规范、品牌标准和 CSM 工作流
- 配置: 应在 CSM 中配置电子邮件通知和模板,并启用外发电子邮件
流程
步骤 1:获取案例详情和当前状态
获取完整的案例记录,了解客户联系的原因。
使用 MCP(Claude Code/Desktop):
Tool: SN-Get-Record
Parameters:
table_name: sn_customerservice_case
sys_id: [case_sys_id]
fields: number,short_description,description,state,priority,urgency,impact,category,subcategory,contact,account,consumer,product,asset,assigned_to,assignment_group,opened_at,opened_by,resolved_at,resolution_code,resolution_notes,escalation,severity,sla_due,contact_type,reassignment_count,reopen_count
按案例编号搜索时:
Tool: SN-Query-Table
Parameters:
table_name: sn_customerservice_case
query: number=CS0012345
fields: sys_id,number,short_description,description,state,priority,category,subcategory,contact,account,consumer,product,assigned_to,assignment_group,opened_at,resolution_code,resolution_notes,escalation,sla_due
limit: 1
使用 REST API:
GET /api/now/table/sn_customerservice_case?sysparm_query=number=CS0012345&sysparm_fields=sys_id,number,short_description,description,state,priority,category,subcategory,contact,account,consumer,product,assigned_to,assignment_group,opened_at,resolution_code,resolution_notes,escalation,sla_due&sysparm_limit=1&sysparm_display_value=true
步骤 2:查看电子邮件沟通历史
获取此案例的所有历史电子邮件,以了解对话内容并避免重复提供信息。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sys_email
query: instance=<case_sys_id>^ORDERBYDESCsys_created_on
fields: sys_id,subject,type,recipients,sys_created_on,sys_created_by,body_text,direct,importance,content_type
limit: 20
使用 REST API:
GET /api/now/table/sys_email?sysparm_query=instance=<case_sys_id>^ORDERBYDESCsys_created_on&sysparm_fields=sys_id,subject,type,recipients,sys_created_on,sys_created_by,body_text,direct,importance&sysparm_limit=20&sysparm_display_value=true
步骤 3:获取客户和账户信息
获取联系人和账户详情,以便进行个性化回复并调整语气。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: customer_contact
query: sys_id=[contact_sys_id]
fields: sys_id,name,first_name,last_name,email,phone,title,account,preferred_contact_method,timezone
limit: 1
Tool: SN-Query-Table
Parameters:
table_name: customer_account
query: sys_id=[account_sys_id]
fields: sys_id,name,customer_tier,industry,account_code,notes
limit: 1
使用 REST API:
GET /api/now/table/customer_contact/{contact_sys_id}?sysparm_fields=name,first_name,last_name,email,phone,title,preferred_contact_method,timezone&sysparm_display_value=true
GET /api/now/table/customer_account/{account_sys_id}?sysparm_fields=name,customer_tier,industry,account_code&sysparm_display_value=true
步骤 4:检查 SLA 状态
确定 SLA 是否合规,以决定回复的紧急程度和语气。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_customerservice_sla
query: task=<case_sys_id>^stage!=cancelled
fields: sys_id,sla,stage,has_breached,planned_end_time,percentage,pause_duration,business_percentage
limit: 5
使用 REST API:
GET /api/now/table/sn_customerservice_sla?sysparm_query=task=<case_sys_id>^stage!=cancelled&sysparm_fields=sla,stage,has_breached,planned_end_time,percentage,business_percentage&sysparm_limit=5&sysparm_display_value=true
步骤 5:搜索知识库以查找解决方案
查找相关知识库文章,以便在电子邮件回复中引用或附上。
使用 MCP:
Tool: SN-Query-Table
Parameters:
query: workflow_state=published^short_descriptionLIKE[key_terms]^ORtextLIKE[key_terms]
table_name: kb_knowledge
limit: 5
Tool: SN-Query-Table
Parameters:
table_name: kb_knowledge
query: workflow_state=published^short_descriptionLIKE[key_terms]^ORtextLIKE[key_terms]
fields: sys_id,number,short_description,text,kb_category,author,sys_updated_on,rating
limit: 5
使用 REST API:
GET /api/now/table/kb_knowledge?sysparm_query=workflow_state=published^short_descriptionLIKE<key_terms>&sysparm_fields=number,short_description,text,kb_category,rating&sysparm_limit=5&sysparm_display_value=true
步骤 6:获取工作备注,了解内部上下文
提取内部工作备注,确保电子邮件回复反映最新的内部分析。
使用 MCP:
Tool: SN-Query-Table
Parameters:
table_name: sys_journal_field
query: element_id=<case_sys_id>^element=work_notes^ORDERBYDESCsys_created_on
fields: value,sys_created_on,sys_created_by
limit: 10
使用 REST API:
GET /api/now/table/sys_journal_field?sysparm_query=element_id=<case_sys_id>^element=work_notes^ORDERBYDESCsys_created_on&sysparm_fields=value,sys_created_on,sys_created_by&sysparm_limit=10
步骤 7:生成电子邮件回复建议
将收集到的信息整理成结构化的电子邮件草稿。根据案例状态提供多个版本。
=== EMAIL RESPONSE RECOMMENDATIONS ===
Case: [number] | Customer: [first_name] [last_name] | Tier: [tier]
Category: [category] / [subcategory] | State: [state]
SLA Status: [on_track/at_risk/breached]
Email Thread Length: [count] messages
--- OPTION A: ACKNOWLEDGMENT EMAIL ---
Subject: Re: [original_subject] - Case [number] Received
Dear [first_name],
Thank you for contacting [company_name] support. We have received
your request regarding [short_description] and created case [number]
for tracking purposes.
Our [assignment_group] team is reviewing your request and you can
expect an initial response within [sla_target]. In the meantime,
you may find the following resource helpful:
- [KB article title]: [portal_link]
If you need immediate assistance, please don't hesitate to call us
at [support_phone] or start a live chat session through the portal.
Best regards,
[agent_name]
[assignment_group]
--- OPTION B: STATUS UPDATE EMAIL ---
Subject: Re: [original_subject] - Case [number] Update
Dear [first_name],
I wanted to provide you with an update on your case [number]
regarding [short_description].
[Summary of investigation findings from work notes]
Our next steps are:
1. [next_action_1]
2. [next_action_2]
We expect to have [resolution/further update] by [date]. I will
keep you informed of any developments.
Please let me know if you have any questions or additional
information to share.
Best regards,
[agent_name]
--- OPTION C: RESOLUTION EMAIL ---
Subject: Re: [original_subject] - Case [number] Resolved
Dear [first_name],
I'm pleased to let you know that your case [number] regarding
[short_description] has been resolved.
Resolution Summary:
[resolution_notes]
Root Cause: [root_cause if applicable]
Steps Taken: [summary of actions]
For future reference, you can find detailed instructions in our
knowledge base article: [KB article number and title]
If this issue recurs or you have any other questions, please don't
hesitate to reach out. You can reopen this case by simply replying
to this email.
Thank you for your patience, and we appreciate your business.
Best regards,
[agent_name]
--- OPTION D: ESCALATION NOTIFICATION EMAIL ---
Subject: Re: [original_subject] - Case [number] Escalated
Dear [first_name],
I want to let you know that your case [number] has been escalated
to our [escalation_group] team for specialized attention.
Your case is being prioritized and [escalation_contact] will be
reaching out to you directly within [timeframe]. You can also reach
them at [escalation_email/phone].
We understand the urgency of this matter and are committed to
resolving it as quickly as possible.
Best regards,
[agent_name]
工具用法
MCP 工具参考
| 工具 | 使用场景 |
|---|---|
SN-Natural-Language-Search | 使用自然语言搜索与客户问题相关的知识库文章 |
SN-Query-Table | 查询电子邮件、案例历史记录和 SLA 状态 |
SN-Get-Record | 按 sys_id 获取单个案例或联系人记录 |
REST API 参考
| 端点 | 方法 | 用途 |
|---|---|---|
/api/now/table/sn_customerservice_case | GET | 查询案例详情 |
/api/now/table/sys_email | GET | 获取电子邮件沟通历史 |
/api/now/table/kb_knowledge | GET | 搜索知识库文章 |
/api/now/table/sys_journal_field | GET | 提取工作备注,了解内部上下文 |
/api/now/table/customer_account | GET | 获取账户级别和详情 |
/api/now/table/customer_contact | GET | 获取联系人姓名、电子邮件和偏好 |
/api/now/table/sn_customerservice_sla | GET | 获取 SLA 状态和违约信息 |
最佳实践
- 保持邮件往来连续: 始终使用“Re:”前缀,并在主题行中注明案例编号,以保持邮件线程完整
- 根据客户等级调整正式程度: 对 Gold/Platinum 级客户使用更正式、更个性化的措辞;标准级客户则使用专业但简洁的表达
- 承认延误: 如果 SLA 可能超时或已经超时,应在提供最新进展前主动说明延误并致歉
- 附上自助服务链接: 提供知识库文章和门户链接,方便客户今后自行查找答案
- 避免透露内部信息: 切勿在面向客户的邮件中透露内部工作备注、分配变更或系统详情
- 明确后续步骤: 每封邮件结尾都应清楚说明接下来会发生什么以及何时发生
- 检查以往邮件: 始终查看邮件线程,避免重复询问或重复提供已有信息
- 校对语气: 确保回复体现同理心并提供帮助,尤其是面对沮丧的客户或升级处理的案例时
- 考虑时区: 尽可能安排在客户的工作时间内发送邮件
故障排除
“未找到邮件历史记录”
原因: 邮件可能存储在其他目标记录中,或者案例是通过非邮件渠道创建的
解决方案: 尝试使用 target_table=sn_customerservice_case^instance=<case_sys_id> 查询。还可以检查原始邮件是否使用 sysparm_query=subject_LIKE[case_number] 创建了单独的记录。
“缺少客户联系人的电子邮件地址”
原因: 联系人记录中可能未填写电子邮件地址
解决方案: 检查 csm_consumer 记录中的电子邮件地址。如果联系人是内部用户,也要检查 sys_user。如果没有可用的联系人电子邮件地址,则使用 opened_by 的电子邮件地址。
“没有可用的 SLA 数据”
原因: 可能未针对此案例类型或类别配置 SLA 定义
解决方案: 查询 contract_sla 表,检查是否存在适用于该案例的分配组和优先级的 SLA。如果未定义 SLA,请在邮件中省略 SLA 相关内容,并使用一般时间范围。
“知识库文章不相关”
原因: 搜索词可能过于具体,或者知识库未涵盖此主题
解决方案: 逐步扩大搜索范围:先使用完整的 short_description,再尝试单个关键词,然后仅尝试类别名称。如果组织按产品使用多个知识库,请检查多个知识库。
示例
示例 1:软件许可证问题的初始回复
场景: 客户就软件许可证激活失败发送邮件。
步骤 1 - 获取案例:
Tool: SN-Query-Table
Parameters:
table_name: sn_customerservice_case
query: number=CS0081234
fields: sys_id,number,short_description,description,state,priority,category,subcategory,contact,account,product,assigned_to,assignment_group,sla_due
limit: 1
步骤 2 - 搜索知识库:
Tool: SN-Query-Table
Parameters:
query: workflow_state=published^123TEXTQUERY321=software license activation failure error code
table_name: kb_knowledge
limit: 3
生成的邮件:
Subject: Re: License Activation Error - Case CS0081234
Dear Sarah,
Thank you for contacting TechCorp Support regarding the license
activation issue with DataSync Pro. I've created case CS0081234
to track your request.
I found a knowledge base article that addresses the most common
activation errors:
- KB0023456: "Resolving DataSync Pro License Activation Errors"
Link: https://support.techcorp.com/kb/KB0023456
Could you try the steps in Section 3 of that article? If the issue
persists, please reply with:
1. The exact error message or error code displayed
2. Your license key (last 4 characters only)
3. The operating system version
I'm targeting to have this resolved for you by March 20th.
Best regards,
Alex Thompson
Software Support Team
示例 2:关键服务中断的升级邮件
场景: 客户的 P1 案例涉及服务中断,需要发送升级通知。
步骤 1 - 获取案例和 SLA:
Tool: SN-Get-Record
Parameters:
table_name: sn_customerservice_case
sys_id: [case_sys_id]
fields: number,short_description,state,priority,escalation,contact,account,assigned_to,sla_due,opened_at
Tool: SN-Query-Table
Parameters:
table_name: sn_customerservice_sla
query: task=<case_sys_id>^stage!=cancelled
fields: sla,stage,has_breached,planned_end_time,percentage
limit: 3
生成的邮件:
Subject: URGENT: Case CS0082001 Escalated - Service Outage
Dear Michael,
I want to personally update you on your critical case CS0082001
regarding the API gateway outage affecting your production systems.
Your case has been escalated to our Senior Engineering team and is
receiving immediate priority attention. Here is your escalation
contact information:
Escalation Lead: Jennifer Walsh, Senior Platform Engineer
Direct Line: +1 (555) 012-3456
Email: [email protected]
Current Status:
- Our team has identified the affected components
- A hotfix is being developed and tested
- Estimated resolution: within the next 2 hours
We will provide updates every 30 minutes until this is resolved.
You can also monitor real-time status at status.techcorp.com.
We sincerely apologize for the impact this is having on your
operations and are fully committed to restoring service as
quickly as possible.
Best regards,
David Martinez
Critical Incident Manager
相关技能
csm/case-summarization- 起草邮件前总结案例详情csm/chat-recommendation- 生成聊天回复,而非邮件csm/sentiment-analysis- 评估客户情绪,以调整邮件语气csm/resolution-notes- 为结案邮件生成解决方案文档knowledge/content-recommendation- 深入搜索知识库,为邮件提供参考内容