将 Webex Contact Center 与 ServiceNow 集成(版本 1 - 旧版)
先决条件
目前该功能仅适用于代理。
在将 Webex Contact Center 与 ServiceNow CRM 控制台集成之前,请确保您具有以下内容:
-
访问 Webex Contact Center。
-
对 https://admin.webex.com 上的 Control Hub 和 Webex Contact Center 管理门户的管理员访问权限。 管理门户的 URL 特定于您所在的地区。
-
有权访问桌面的代理。 桌面的 URL 特定于您所在的地区。
-
代理访问添加到内容安全策略允许列表中的以下域:
-
*.service-now.com
有关如何定义允许列表的详细信息,请参阅文章 Webex Contact Center 的安全设置。
-
-
ServiceNow 开发人员门户帐户。 要创建帐户,请转到 ServiceNow 开发人员门户 https://developer.servicenow.com/dev.do ,然后单击注册 并开始构建。
-
访问以下文件 ,网址为 https://github.com/CiscoDevNet/webex-contact-center-crm-integrations/tree/main/ServiceNow:
-
ServiceNow 更新集(XML)
-
ServiceNow 联系人中心桌面布局(JSON)
-
- Webex Contact Center 支持的 ServiceNow 版本是温哥华,犹他州,托基亚,华盛顿和 Xanadu。 有关更多信息,请参阅 Webex Contact Center 与 ServiceNow 集成。
请遵循以下两种方法之一:
对于开发者实例,我们建议按照开发者实例指南中的步骤作。
如果您拥有企业许可实例,请遵循企业许可实例的准则。
我们不建议将企业许可的应用与开发人员沙盒实例混合使用。
以下部分介绍为开发人员实例安装 ServiceNow 连接器的步骤。
1 |
登录您的 ServiceNow 开发人员门户帐户并打开 管理控制台 。 |
2 |
在帐户 菜单的 “ 我的实例 ”区域中,单击 开始构建。 |
3 |
在开发人员实例上,从 窗口左上角的筛选器导航器 字段中导航到 插件。 |
4 |
搜索标题 为 Openframe 的 Openframe 插件。 您可能需要滚动列表。 |
5 |
单击“安装 ” 以安装 Openframe 插件。 |
6 |
在“激活插件 ”对话框中,单击 “激活”。 |
7 |
插件激活完成后,单击 “插件激活 ”对话框中的 “关闭并重新加载表单 ”。 |
8 |
要验证插件激活,请从窗口左上角的过滤器 导航器 字段中导航到 OpenFrame。 |
9 |
单击 Configuration(配置 )并确保 OpenFrame 插件出现在 OpenFrame Configuration(OpenFrame 配置 )列表中 。 |
1 |
下载最新的系统更新集 XML 文件有空在 github 存储库 上的位置:https://github.com/CiscoDevNet/webex-contact-center-crm-integrations/tree/main/ServiceNow。 文件名:webexcc-servicenow-update-setV(X).XML |
2 |
在 ServiceNow 实例上,从 窗口左上角的筛选器导航器 字段中,导航到 要提交的更新集。 |
3 |
单击从 XML 导入更新集链接。 |
4 |
单击 选择文件,选择系统更新集 XML 文件,然后单击 上传。
更新集将显示在 “检索到的更新集 ”列表中,并且处于 “已加载” 状态。
|
5 |
从“ 检索到的更新集 ”列表中,单击“更新集文件名”(链接)以打开“更新集”。 |
6 |
在窗口的右上角,单击 预览更新集 以检查更新集是否存在问题。 |
7 |
预览完成后,单击 “更新集预览”对话框中的“关闭 ”。 |
8 |
单击 提交更新集。 |
9 |
更新集提交完成后,单击 “更新集提交 ”对话框中的 “关闭 ”。 |
1 |
在窗口左上角的筛选器 导航器 字段中,键入 |
2 |
在“ 系统属性 ”页上,按更新日期对属性进行排序。 确保您可以看到以下 Webex Contact Center 属性: |
3 |
单击“agentdesktop_url ” 以打开“ 系统属性 agentdesktop_url ”页。 |
4 |
在值 字段中 ,根据运营区域输入 Webex Contact Center 桌面的 URL。 |
5 |
单击 更新 保存更改。 |
6 |
(可选)要更改活动表名称,请根据需要编辑 webexccactivitytable 属性。 在 “系统属性 ”页上,单击 webexccactivitytable。 根据需要更改值 字段。 |
7 |
(可选)通过以下方式添加用户组:
|
1 |
从过滤器导航器 字段中,导航到 。 |
2 |
单击新建。 |
3 |
输入 URL 的以下属性:
|
4 |
在 URL 字段的右侧,单击锁定 按钮并 添加 agentdesktop.do |
5 |
(可选)选择要分配配置的用户/代理组。 |
6 |
单击提交。 URL 显示为链接。 |
7 |
在尝试使用 OpenFrame 电话之前,请确保将 ServiceNow 自定义桌面布局 JSON 文件上传到 Webex Contact Center 管理门户。 有关详细信息,请参阅 在 Webex Contact Center 上设置 ServiceNow 桌面布局。 |
1 |
从 https://github.com/CiscoDevNet/webex-contact-center-crm-integrations/tree/main/ServiceNow 下载 ServiceNow 的桌面布局。 |
2 |
如果需要,更新桌面布局文件中的属性。 |
3 |
转到 Webex Contact Center 管理门户。 |
4 |
在管理门户导航栏上,选择 。 |
5 |
单击 新布局 并输入桌面布局的详细信息。 |
6 |
上传 ServiceNow 桌面布局 JSON 文件。 |
7 |
单击 保存 以保存配置。 现在,您可以在 ServiceNow 控制台中启动 Webex Contact Center 桌面。 |
8 |
从筛选器导航器 字段中,导航到 。 |
以下部分介绍为许可的企业实例安装 ServiceNow 连接器的步骤。
1 |
登录您的 ServiceNow 开发人员门户帐户并打开 管理控制台 。 |
2 |
在帐户 菜单的 “ 我的实例 ”区域中,单击 开始构建。 |
3 |
在开发人员实例上,从 窗口左上角的筛选器导航器 字段中导航到 插件。 |
4 |
搜索标题 为 Openframe 的 Openframe 插件。 您可能需要滚动列表。 |
5 |
单击“安装 ” 以安装 Openframe 插件。 |
6 |
在“激活插件 ”对话框中,单击 “激活”。 |
7 |
插件激活完成后,单击 “插件激活 ”对话框中的 “关闭并重新加载表单 ”。 |
8 |
要验证插件激活,请从窗口左上角的过滤器 导航器 字段中导航到 OpenFrame。 |
9 |
单击 Configuration(配置 )并确保 OpenFrame 插件出现在 OpenFrame Configuration(OpenFrame 配置 )列表中 。 |
具有企业许可证的实例可以直接从 ServiceNow 商店安装 Webex Contact Center 应用程序。
从 ServiceNow 商店下载并安装 Webex Contact Center 软件包: https://store.servicenow.com/sn_appstore_store.do#!/store/application/6c8e2a4edbc73410e1c75e25ca961947。 |
1 |
在窗口左上角的筛选器 导航器 字段中,输入 |
2 |
在“ 系统属性 ”页上,按更新日期对属性进行排序。 确保您可以看到以下 Webex Contact Center 属性: |
3 |
单击“agentdesktop_url ” 以打开“ 系统属性 agentdesktop_url ”页。 |
4 |
在值 字段中 ,根据运营区域输入 Webex Contact Center 桌面的 URL。 |
5 |
单击 更新 保存更改。 |
6 |
(可选)要更改活动表名称,请根据需要编辑 x_caci_webexcc.webexccactivitytable 属性。
|
7 |
(可选)通过以下方式添加用户组:
|
1 |
从过滤器导航器 字段中,导航到 。 |
2 |
单击新建。 |
3 |
输入 URL 的以下属性:
|
4 |
在 URL 字段的右侧,单击“锁定 ”按钮并将 x_caci_webexcc_agentdesktop.do |
5 |
(可选)选择要分配配置的用户/代理组。 |
6 |
单击提交。 URL 显示为链接。 |
7 |
从筛选器导航器 字段中,导航到 。 |
8 |
(可选)在“ 用户组 ”列表中,将可以访问 Webex Contact Center 桌面的用户组从“可用 ”移动到 “已选择”。 |
9 |
在尝试使用 OpenFrame 电话之前,请确保将 ServiceNow 自定义桌面布局 JSON 文件上传到 Webex Contact Center 管理门户。 有关详细信息,请参阅 在 Webex Contact Center 上设置 ServiceNow 桌面布局。 |
1 |
从 https://github.com/CiscoDevNet/webex-contact-center-crm-integrations/tree/main/ServiceNow 下载 ServiceNow 的桌面布局。 |
2 |
如果需要,更新桌面布局文件中的属性。 |
3 |
转到 Webex Contact Center 管理门户。 |
4 |
在管理门户导航栏上,选择 。 |
5 |
单击 新布局 并输入桌面布局的详细信息。 |
6 |
上传 ServiceNow 桌面布局 JSON 文件。 |
7 |
单击 保存 以保存配置。 现在,您可以在 ServiceNow 控制台中启动 Webex Contact Center 桌面。 |
8 |
从筛选器导航器 字段中,导航到 。 |
1 |
在“ 筛选器导航器 ”字段中,导航到 “事件 >打开的事件”。 |
2 |
右键单击主叫方字段,然后单击 配置字典。 |
3 |
添加逗号分隔的属性 现在,您可以开始使用 ServiceNow 控制台中的 Webex Contact Center 桌面。 |
4 |
从筛选器导航器 字段中,导航到 。 |
我们仅支持使用 WebRTC for Salesforce(SFDC)和 Microsoft Dynamics(MS Dynamics)连接器登录到 Agent Desktop。
ServiceNow 控制台中的 Agent Desktop
在进行外拨呼叫之前,请确保执行以下作:
-
创建外拨入口点并设置外拨入口点策略。
-
为代理档案启用外拨 ANI。
-
将外拨 ANI 设置为拨号号码到入口点的映射。
有关详细信息,请参阅《Cisco Webex Contact Center 设置和管理指南》的预配置一章。
从筛选器导航器 字段中,导航到 。
有关如何使用 Desktop 的信息,请参阅 Webex Contact Center 帮助中的代理 Tab。
概述
本文介绍了为 ServiceNow CRM 连接器自定义业务规则的几种方法。 它详细介绍了如何根据特定于 ServiceNow 的业务规则自定义用例。
客户必须在 ServiceNow 上自行管理这些用例。 该配置特定于 ServiceNow,而不是 Webex Contact Center 软件或专业知识。
这是帮助修改业务规则的参考文档。 ServiceNow 开发人员将创建和管理业务规则,并提供支持。
Cisco 仅提供示例文档。
以下各节提供了有关如何为开发人员和企业实例设置、启用和管理作小组件的详细信息。
提交作小组件的更新集
对于获得许可的企业实例,请从 ServiceNow 商店 安装最新的 Webex Contact Center 应用程序。
要为开发人员实例设置作小组件,请在 github 存储库上下载最新的系统更新集 XML 文件有空,位置为: https://github.com/CiscoDevNet/webex-contact-center-crm-integrations/tree/main/ServiceNow/ActionsWidget。 文件名为 webexcc-servicenow-update-setv7-1-ActionsWidget.XML。 要提交作小组件的更新集,请参阅提交更新集中 的第2 到 9 步。
启用作小组件
使用 isWidgetDisplayEnabled 属性启用作 widget。 不得在自定义桌面布局的无外设部分中修改此属性的值。 该属性在自定义桌面布局的无外设部分中始终设置为 false。 应仅在自定义桌面布局的面板部分中更新属性的值。
在自定义桌面布局中启用作 Widget 后,您可以执行以下作:
- 管理活动记录 - 单击 查看/编辑活动记录 以查看与呼叫者关联的活动记录列表。
- 关联 CRM 对象 - 单击 关联到活动记录 以将 CRM 对象(如呼叫类型(入站或出站)、呼叫对象、呼叫注释等)添加到活动记录中。
- 管理事件 - 单击 创建事件。 将创建一个新事件,并预填充主叫方详细信息。 您可以对事件进行所需的更新。 您可以选择根据您的要求从事件到案例、HR 模块等修改记录类型。 要更改记录类型,请在“作”小组件配置中修改 typeOfRecord 属性的值 。 例如:
{“comp”:“md-tab-panel”,“attributes”:{“slot”:“panel”,“class”:“widget-pane”},“children”:[ {“comp”:“agentx-custom-desktop”,“script”:“https://cx-crmconnector.ciscoccservice.com/servicenow/v5/dist/index.js”,“properties”:{“isWidgetDisplayEnabled”:true,“typeOfRecord”:“Create Incident”},“wrapper”:{“title”:“SNOW Actions!”,“maximizeAreaName”:“app-maximize-area”} } ] }
- 添加实时通话备注 - 您可以在文本区域中捕获有关通话的其他信息并结束通话。 您可以在活动记录中看到这些注释添加为呼叫注释。
ServiceNow 上的代码更改
脚本包含更改-
转到筛选器导航器并搜索
脚本包括
.选择“系统 UI” 下的 脚本包含。
-
过滤“名称 ”并搜索
propUtils
. -
更改方法
UserGetSysId
在脚本中 。库伦特:
UserGetSysId:function(){ var opened_for; var user = new GlideRecord(“sys_user”); user.addQuery(this.getParameter('field'),this.getParameter('value')); user.query(); if(user.next())opened_for=user.sys_id; var grInt = new GlideRecord('interaction'); grInt.initialize(); grInt.assigned_to= gs.getUserID(); grInt.type= 'phone'; grInt.opened_for= opened_for; var sysid=grInt.Insert(); return sysid; },
事件的新示例代码:
UserGetSysId:function(){ var opened_for; //Incident related changes,var sysidlist = {}; var user = new GlideRecordSecure(“sys_user”); user.addQuery(this.getParameter('field'),this.getParameter('value')); user.query(); if(user.next()){ opened_for=user.sys_id;//return user.sys_id; var inc = new GlideRecordSecure('incident'); inc.addQuery('caller_id',opened_for); inc.addQuery('state','IN','1,2'); inc.orderByDesc('sys_created_on'); inc.query(); if(inc.next()){ sysidlist.incsysid=inc.getUniqueValue();}else{ inc.initialize(); inc.caller_id=opened_for; inc.contact_type='phone'; inc.short_description='Call Received from '+ this.getParameter('value'); sysidlist.incsysid=inc.Insert(); } }var grInt = new GlideRecordSecure('interaction');grInt.initialize();grInt.assigned_to= gs.getUserID();grInt.type= 'phone';grInt.opened_for= opened_for;var sysid=grInt.Insert();sysidlist.sysid=sysid;返回 JSON.stringify(sysidlist);},
-
转到筛选器导航器并搜索
UI 页面
。选择 “系统 UI” 下的 UI 页。
-
过滤“名称 ”并搜索
代理桌面
. -
更改
屏幕弹出
客户端脚本 中的函数。当前功能:
screen pop function screenpop(callerani,callSessionInfo){ if(callerani===callSessionInfo.phoneNumber){ callerani=stripPrefixes(callerani); } var gaout = new GlideAjax('propUtils'); gaout.addParam('sysparm_name','UserGetSysId'); gaout.addParam('field','phone'); gaout.addParam('value',callerani); gaout.getXMLWait(); var sysid = gaout.getAnswer(); openFrameAPI.openServiceNowForm({ entity:'interaction',query:'sys_id='+sysid });
事件的示例代码:
screen pop function screenpop(callerani,callSessionInfo){ if(callerani===callSessionInfo.phoneNumber){ callerani=stripPrefixes(callerani); } var gaout = new GlideAjax('propUtils'); gaout.addParam('sysparm_name','UserGetSysId'); gaout.addParam('field','phone'); gaout.addParam('value',callerani); gaout.getXMLWait(); // For Incident-related change var sysObj = JSON.parse(gaout.getAnswer()); if(sysObj.incsysid){ openFrameAPI.openServiceNowForm({ entity:'incident',query:'sys_id='+sysObj.incsysid,'interaction_sys_id':sysObj.sysid });}else{ openFrameAPI.openServiceNowForm({ entity:'incident',query:'sys_id=-1','interaction_sys_id':sysObj.sysid //'a2ba0ba62fd121106446cc96f699b6b8' }); } }
如果 CRM 中存在主叫方信息,并且已与此联系人一起打开一个新事件,应用程序将打开进行中的事件
如果 CRM 中不存在呼叫者信息,应用程序将打开一个新事件
如果 CRM 中存在呼叫者信息,应用程序将打开包含预填详细信息的新事件
概述
此用例详细介绍了向 ServiceNow 表添加额外列的过程 - 在安装 ServiceNow CRM 连接器的 Webex CC 时 webexcc_imp_activity 和创建 sn_openframe_phone_log。
默认情况下,该表包含某些现成的系统字段和值。
您可以在 WebexCC Flow 设计器中创建更多特定于业务的变量(CAD 变量),在 ServiceNow POST 呼叫活动日志中添加 CAD 变量,以及将其保存到 POST 呼叫活动表数据中。
这只是一个参考文档 - 并展示了如何为名为 Customer Name 的示例 CAD 变量执行此作,该变量将客户名称存储在 IVR 中并将其发布到 ServiceNow。
预计合作伙伴 + 客户 ServiceNow 开发人员将配置和管理此配置,因为它是对现有连接器的自定义。
Cisco 仅提供有关如何自定义和扩展连接器的技术。
截至本文发布,Cisco 团队已使用以下所述的技术验证了对向活动日志和活动表添加 CAD 变量的支持:
向 WebexCC IMP 活动添加列
-
在 ServiceNow 的开发者版本中编辑该表。
-
转到过滤器导航器并搜索工作室。
选择
Webex Contact Center
或
-
选择
WebexCC IMP 活动
桌子 -
添加新列,例如,
客户名称
在电话日志中添加列
-
编辑电话日志表。
-
添加新列,例如,
客户名称
.
WebexCC 活动转换地图
添加新列,例如, 客户名称
字段映射。
个性化列表列
按照“现在服务”的建议,将“选择”作从“创建”更改为“忽略”。
配置电话日志列表
转到脚本包含
仅添加一行 webexcc.u_customername=actInfo.CustomerName
到道具。
请参阅行: webexcc.u_customername=actInfo.CustomerName; 附有支持性评论。
var propUtils = Class.create();propUtils.prototype = Object.extendsObject(global.AbstractAjaxProcessor,{ getWebexccProp:function(){ var webexccprop = {}; webexccprop.instanceurl= 'https://'+gs.getProperty('instance_name')+'.service-now.com/'; webexccprop.url=gs.getProperty('x_caci_webexcc.agentdesktop_url'); // webexccprop.popupurl=gs.getProperty('x_caci_webexcc.screenpop_url'); return JSON.stringify(webexccprop); },UserGetSysId:function(){ var opened_for; var user = new GlideRecord(“sys_user”); user.addQuery(this.getParameter('field'),this.getParameter('value')); user.query(); if(user.next())opened_for=user.sys_id;//return user.sys_id;否则 // 返回空值;var grInt = new GlideRecord('interaction');grInt.initialize();grInt.assigned_to= gs.getUserID();grInt.type= 'phone';grInt.opened_for= opened_for;var sysid=grInt.Insert();返回系统标识;},setWebexcctable:function(){ var sys_id=0; var actInfo = JSON.parse(this.getParameter('actInfo')); var webexcc = new GlideRecordSecure(gs.getProperty('x_caci_webexcc.webexccactivitytable')); webexcc.addQuery(“callobject”,actInfo.CallObject); webexcc.query(); if(!webexcc.next()){ webexcc.ani = actInfo.ani; webexcc.dnis =actInfo.dnis; webexcc.queuename =actInfo.queuename; webexcc.wrapuptime =actInfo.wrapuptime; webexcc.callduration =actInfo.CallDurationInSeconds;webexcc.ringingtime =actInfo.ringingtime;webexcc.activitydate =actInfo.ActivityDate;webexcc.callobject =actInfo.CallObject;webexcc.calltype =actInfo.CallType;webexcc.calldisposition=actInfo.CallDisposition;已添加此行 - 以在活动日志中捕获它 webexcc.u_customername=actInfo.CustomerName;sys_id=webexcc.Insert();事件记录中的活动;var actInfoString =this.getParameter('actInfo');var suser = new GlideRecordSecure(“sys_user”);suser.addQuery(“phone”,this.getParameter('ani'));suser.query();if(suser.next()){ var inc = new GlideRecordSecure('incident'); inc.addQuery('caller_id',suser.sys_id); inc.orderByDesc('sys_created_on'); inc.query(); if(inc.next()){ var jsonPretty = JSON.stringify(JSON.parse(actInfoString),null,2); inc.comments =jsonPretty; inc.update(); } } }返回 sys_id;},类型:'propUtils' });
在流程设计器中创建 CAD 变量
将 CAD 变量添加到桌面布局
示例
“CadName1:SnowField1,CadName2:SnowField2”CadName1 是 CustomerName SnowField1 也用作 CustomerName,它是“actInfo.CustomerName”上方的示例 scirpt showen 的一部分。
演示截图
查看“WebexCC 活动”表中新添加的 CAD 变量。
为流设计器创建 CAD 变量
事件紧急程度事件影响
“立即服务”脚本更新
对脚本的更新包括
-
转到筛选器导航器并搜索
脚本包含
选择“系统 UI” 下的 “脚本包含”选项。
-
使用 propUtils 过滤
名称
。 -
更改方法
UserGetSysId
在脚本 字段中。当前脚本:
UserGetSysId:function(){ var opened_for; var user = new GlideRecord(“sys_user”); user.addQuery(this.getParameter('field'),this.getParameter('value')); user.query(); if(user.next())opened_for=user.sys_id; var grInt = new GlideRecord('interaction'); grInt.initialize(); grInt.assigned_to= gs.getUserID(); grInt.type= 'phone'; grInt.opened_for= opened_for; var sysid=grInt.Insert(); return sysid; },
事件的新示例代码:
UserGetSysId:function(){ var opened_for; var sysidlist = {}; var user = new GlideRecordSecure(“sys_user”); user.addQuery(this.getParameter('field'),this.getParameter('value')); user.query(); if(user.next()){ opened_for=user.sys_id;//return user.sys_id; var inc = new GlideRecordSecure('incident'); inc.addQuery('caller_id',opened_for); inc.addQuery('state','IN','1,2'); inc.orderByDesc('sys_created_on'); inc.query(); if(inc.next()){ sysidlist.incsysid=inc.getUniqueValue(); }else{ inc.initialize(); inc.caller_id=opened_for; inc.contact_type='phone'; inc.urgency=this.getParameter('IncUrgency'); inc.impact=this.getParameter('Impact'); inc.short_description='从 '+ this.getParameter('value')收到呼叫; sysidlist.incsysid=inc.Insert(); } }var grInt = new GlideRecordSecure('interaction');grInt.initialize();grInt.assigned_to= gs.getUserID();grInt.type= 'phone';grInt.opened_for= opened_for;var sysid=grInt.Insert();sysidlist.sysid=sysid;返回 JSON.stringify(sysidlist);//sysid;},
-
转到筛选器导航器并搜索
UI 页面
。选择“系统 UI”下的 “ UI 页面 ”选项。
-
使用名称 过滤 UI 页面 并搜索
代理桌面
。 -
更改
屏幕弹出
脚本字段中的函数。当前功能:
screen pop function screenpop(callerani,callSessionInfo){ if(callerani===callSessionInfo.phoneNumber){ callerani=stripPrefixes(callerani); } var gaout = new GlideAjax('propUtils'); gaout.addParam('sysparm_name','UserGetSysId'); gaout.addParam('field','phone'); gaout.addParam('value',callerani); gaout.getXMLWait(); var sysid = gaout.getAnswer(); openFrameAPI.openServiceNowForm({ entity:'interaction',query:'sys_id='+sysid }); }
事件的示例代码:
screen pop function screenpop(callerani,callSessionInfo){ var Impact=3; if(callSessionInfo.callAssociatedData.Impact!= null && callSessionInfo.callAssociatedData.Impact!= undefined){ Impact=callSessionInfo.callAssociatedData.Impact.value; } var IncUrgency=3; if(callSessionInfo.callAssociatedData.Urgency!= null && callSessionInfo.callAssociatedData.Urgency!= undefined){ IncUrgency=callSessionInfo.callAssociatedData.Urgency.value; } if(callerani===callSessionInfo.phoneNumber){ callerani=stripPrefixes(callerani); } var gaout = new GlideAjax('propUtils');gaout.addParam('sysparm_name','UserGetSysId');gaout.addParam('field','phone');gaout.addParam('value',callerani);gaout.addParam('IncUrgency',IncUrgency);gaout.addParam('Impact',Impact);gaout.getXMLWait();var sysid = gaout.getAnswer();var sysObj = JSON.parse(gaout.getAnswer());if(sysObj.incsysid){ openFrameAPI.openServiceNowForm({ entity:'incident',query:'sys_id='+sysObj.incsysid,'interaction_sys_id':sysObj.sysid }); }else{ openFrameAPI.openServiceNowForm({ entity:'incident',query:'sys_id=-1','interaction_sys_id':sysObj.sysid }); } window.localStorage.setItem(“screenpopinteraction”,JSON.stringify(sysObj));}
如果 CRM 中存在呼叫者信息,并且没有新的或正在进行的事件,则应用程序将打开一个新事件
更改 ServiceNow 上的代码
将新列添加到 WebexCC IMP 活动
桌子
打开 WebexCC IMP 活动桌子
点击 更新。
将新列添加到 电话记录
桌子
打开 电话记录
桌子
WebexCC 活动转换图
开放 变换图
从过滤器导航器
点击 WebexCC 活动转换图
单击更新。
脚本包含的更改
-
转到过滤器导航器并搜索“脚本包含”。
在 系统 UI 下选择 脚本包含 。
-
过滤 名称
propUtils
. -
改变方法
设置 Webexcctable
.事件的新示例代码:
setWebexcctable: function () { var sys_id=0; var actInfo = JSON.parse(this.getParameter('actInfo')); var webexcc = new GlideRecordSecure(gs.getProperty('webexccactivitytable')); webexcc.addQuery("u_callobject", actInfo.CallObject); webexcc.query(); if(!webexcc.next()) { //事件记录上的活动; //var actInfoString =this.getParameter('actInfo'); var incsysid=actInfo.incident_sys_id; var interactsysid=actInfo.interaction_sys_id; var incnum=""; var intenum=""; 删除 actInfo['interaction_sys_id']; 删除 actInfo['incident_sys_id']; if( interactsysid!= null && interactsysid!= undefined){ var inte = new GlideRecordSecure('interaction'); //inte.get('sys_id', interactsysid ); inte.addQuery('sys_id', interactsysid ); inte.query(); if (inte.next()) { intenum=inte.number; // inte.setValue('state','Closed Complete'); inte.work_notes='将状态更新为已关闭。'; inte.update(); } } if( incsysid!= null && incsysid!= undefined){ var inci = new GlideRecordSecure('incident'); inci.addQuery('sys_id', incsysid ); inci.query(); if (inci.next()) { incnum=inci.number; var jsonPretty = JSON.stringify(actInfo,null,2); //JSON.stringify(JSON.parse(actInfoString),null,2); inci.comments =jsonPretty; inci.update(); } }else{ var suser = new GlideRecordSecure("sys_user"); suser.addQuery("phone", this.getParameter('ani')); suser.query(); if(suser.next()) { var inc = new GlideRecordSecure('incident'); inc.addQuery('caller_id', suser.sys_id); inc.addQuery('state','IN','1,2'); inc.orderByDesc('sys_created_on'); inc.query(); if (inc.next()) { var jsonPretty = JSON.stringify(actInfo,null,2); inc.comments =jsonPretty; inc.update(); } } } webexcc.u_ani = actInfo.ani; webexcc.u_dnis =actInfo.dnis; webexcc.u_queuename =actInfo.queuename; webexcc.u_wrapuptime =actInfo.wrapuptime; webexcc.u_callduration =actInfo.CallDurationInSeconds; webexcc.u_ringingtime =actInfo.ringingtime; webexcc.u_activitydate =actInfo.ActivityDate; webexcc.u_callobject =actInfo.CallObject; webexcc.u_calltype =actInfo.CallType; webexcc.u_calldisposition=actInfo.CallDisposition; webexcc.u_incidentnumber=incnum; webexcc.u_interactionsnumber=intenum; sys_id=webexcc.Insert(); } 返回 sys_id; },
UI 页面上的方法更改
-
转到过滤器导航器并搜索
UI 页面
选择 UI 页面 选项下 系统界面。
-
使用以下方式过滤 UI 页面 姓名 并搜索
代理桌面
。 -
更改
nowActivities 和 screenpop
脚本中的函数。当前功能:
函数 nowActivities(actInfo,ani) { var gaout = new GlideAjax('propUtils'); gaout.addParam('sysparm_name','setWebexcctable'); gaout.addParam('actInfo',JSON.stringify(actInfo)); gaout.addParam('ani',stripPrefixes(ani)); gaout.getXML(SetCCsysId); }
事件示例代码:
函数 nowActivities(actInfo,ani) {var sysObjstr = window.localStorage.getItem("screenpopinteraction"); if(sysObjstr != null && sysObjstr != undefined) {var sysObjjson=JSON.parse(sysObjstr);actInfo.interaction_sys_id=sysObjjson.sysid;actInfo.incident_sys_id=sysObjjson.incsysid;}var gaout = new GlideAjax('propUtils');gaout.addParam('sysparm_name','setWebexcctable');gaout.addParam('actInfo',JSON.stringify(actInfo));gaout.addParam('ani',stripPrefixes(ani));gaout.getXML(SetCCsysId); } 函数 screenpop(callerani,callSessionInfo) { if(callerani===callSessionInfo.phoneNumber){ callerani=stripPrefixes(callerani); } var gaout = new GlideAjax('propUtils'); gaout.addParam('sysparm_name','UserGetSysId'); gaout.addParam('field','phone'); gaout.addParam('value',callerani); gaout.getXMLWait(); // var sysid = gaout.getAnswer(); var sysObj = JSON.parse(gaout.getAnswer()); if(sysObj.incsysid){ openFrameAPI.openServiceNowForm({ entity: 'incident', query: 'sys_id='+sysObj.incsysid, 'interaction_sys_id': sysObj.sysid }); }else{ openFrameAPI.openServiceNowForm({ 实体:'incident', 查询:'sys_id=-1', 'interaction_sys_id':sysObj.sysid }); } window.localStorage.setItem("screenpopinteraction",JSON.stringify(sysObj)); }
更新后的结果
以下自定义适用于 1.0.5 及以下版本。 对于较新版本 1.0.7 及以上版本的定制,请按照上述步骤操作。
定制 #1 - 为呼叫流程用例添加自定义业务规则
为每个呼叫创建新的事件记录对于 ServiceNow 中 WebexCC CRM 连接器的每个新呼叫,创建一个新的事件记录。
在过滤器导航器上搜索业务规则
单击新建。
参考示例代码:
function customcti(){ var url = null; var name = sysparm_caller_name; eid = sysparm_caller_id; var phone = sysparm_caller_phone; var taskID = sysparm_task_id; var fQuery = sysparm_query; if(fQuery == null)fQuery = ''; var view = sysparm_view; if(view == null || view == '')view =“itil”; var userID = null; if(eid!= null & eid!= ''){ userID = UserGetSysId(“employee_number”,eid); } if(userID == null & name!= null & name!= ''){ userID = UserGetSysId(“name”,name);} if(userID == null & phone!= null & phone!= ''){ userID = UserGetSysId(“phone”,phone); } if(userID!= null){ if(fQuery.length > 0)fQuery +=“^”; fQuery +=“caller_id=”+ userID; } if(url == null){ url =“incident.do?sys_id=-1”; if(fQuery!= null)url +=“&sysparm_query=”+ fQuery; } answer = url;返回 URL;} function UserGetSysId(field,value){ var user = new GlideRecord(“sys_user”); user.addQuery(field,value); user.query(); if(user.next())return user.sys_id; else return null; }
业务规则的示例配置
启用 Client callable
Computer Telephony Integration(CTI)Processing For Incident (事件的计算机电话集成(#)处理标记为 True。
使用自定义 CTI 规则 更新 screenpop url“ cti.do?sysparm_cti_rule=createIncident&sysparm_caller_phone=”
sysparm_cti_rule =name 其中 'name' 是函数 的名称 ,用于 CTI 处理 ,而不是使用默认脚本。
在标记为 client callable 的 sys_script 条目中定义函数。
如果您必须 Insert、更新或删除函数中的任何 GlideRecords,请调用单独的非客户端可调用函数来执行更新。
要使脚本可客户端调用,您必须选中显示 sys_script 条目时显示的表单上的 client-callable 复选框。
默认情况下,client-callable 复选框不显示。 要查看,您必须使用齿轮图标和 slush 存储桶机制修改表单上显示的字段。
自定义 # 2 - 在 Webex Contact Center 活动表中添加 CAD 变量
概述本文详细介绍了向 ServiceNow 表添加附加列的过程 - webexcc_activity 是在安装 Webex CC for ServiceNow CRM 连接器时创建的。
默认情况下,该表包含现成的系统字段和值。
您可以在 WebexCC 流设计器中创建更多业务特定变量(CAD 变量),并将这些 CAD 变量添加到 ServiceNow POST 呼叫活动日志中,并将其保存到 POST 呼叫活动表 数据中。
-
这只是参考文档 - 并展示了如何对名为 Customer Name 的示例 CAD 变量执行此作,该变量将客户名称存储在 IVR 中并将其发布到 ServiceNow。
-
合作伙伴 + 客户服务 ServiceNow 开发人员将配置和管理此配置,因为它是对现有连接器的自定义。
-
Cisco 将仅提供有关如何自定义和扩展连接器的技术。
-
截至本文,Cisco 团队已经验证了对使用下面描述的技术将 CAD 变量添加到 Activity Log 和 Activity Table 的支持。
在 ServiceNow 的开发人员版本中编辑表。
前往
.选择 WebexCC 活动 表。
例如, CustomerName。
选择 WebexCC 活动 的列表布局。
如果您使用的是更新集 XML 则不需要此步骤 - 只需将一行“webexcc.u_customername=actInfo.CustomerName”添加到 propUtils。

示例脚本
参见 with:webexcc.u_customername=actInfo.CustomerName; 并附有支持性评论。
var propUtils2 = Class.create();propUtils2.prototype = Object.extendsObject(global.AbstractAjaxProcessor,{ getWebexccProp:function(){ var webexccprop = {}; webexccprop.instanceurl= 'https://'+gs.getProperty('instance_name')+'.service-now.com/'; webexccprop.url=gs.getProperty('x_caci_webexcc.agentdesktop_url'); webexccprop.popupurl=gs.getProperty('x_caci_webexcc.screenpop_url'); return JSON.stringify(webexccprop); },setWebexcctable:function(){ var sys_id=0; var actInfo = JSON.parse(this.getParameter('actInfo')); var webexcc = new GlideRecordSecure(gs.getProperty('x_caci_webexcc.webexccactivitytable'));webexcc.addQuery(“callobject”,actInfo.CallObject);webexcc.query();if(!webexcc.next()){ webexcc.ani = actInfo.ani; webexcc.dnis =actInfo.dnis; webexcc.queuename =actInfo.queuename; webexcc.wrapuptime =actInfo.wrapuptime; webexcc.callduration =actInfo.CallDurationInSeconds; webexcc.ringingtime =actInfo.ringingtime; webexcc.activitydate =actInfo.ActivityDate; webexcc.callobject =actInfo.CallObject; webexcc.calltype =actInfo.CallType; webexcc.calldisposition=actInfo.CallDisposition; // 此行已添加 - 以在活动日志 webexcc 中捕获它。u_customername=actInfo.CustomerName;sys_id=webexcc.Insert();事件记录上的活动;var actInfoString =this.getParameter('actInfo');var suser = new GlideRecordSecure(“sys_user”);suser.addQuery(“phone”,this.getParameter('ani'));suser.query();if(suser.next()){ var inc = new GlideRecordSecure('incident'); inc.addQuery('caller_id',suser.sys_id); inc.orderByDesc('sys_created_on'); inc.query(); if(inc.next()){ var jsonPretty = JSON.stringify(JSON.parse(acting string),null,2); inc.comments =jsonPretty; inc.update(); } } }返回 sys_id;},输入:'propUtils2' });
使用新脚本名称编辑 UI 页面
在 Flow Designer 中创建 CAD 变量
将 CAD 变量添加到 Desktop Layout 中
Demo 屏幕截图
在 WebexCC 活动表中查看新添加的 CAD 变量。
