Webex Contact Center 与 ServiceNow 集成(版本 1 - 旧版)
当您 Webex 联系人中心与 ServiceNow CRM 控制台集成时,您可以从 ServiceNow 中启动 Webex 联系人中心桌面。
先决条件
目前该功能仅适用于代理。
在 Webex 联系人中心与 ServiceNow CRM 控制台集成之前,请确保您具有以下各项:
-
访问 Webex 联络中心。
-
对 Control Hub(位于 https://admin.webex.com 和 Webex 联系人中心管理门户)的管理员访问权限。 管理门户的 URL 特定于您所在的地区。
-
有权访问桌面的代理。 桌面的 URL 特定于您所在的地区。
-
代理访问添加到内容安全策略允许列表中的以下域:
-
*.service-now.com
有关如何定义允许列表的详细信息,请参阅 Webex 联系人中心 的安全设置文章。
-
-
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 联络中心支持的 ServiceNow 版本是温哥华,犹他州,托基亚,华盛顿和 Xanadu。 有关更多信息,请参阅 Webex 联系人中心与 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 联系人中心属性: |
3 |
单击“agentdesktop_url ” 以打开“ 系统属性 agentdesktop_url ”页。 |
4 |
在值 字段中 ,根据运营区域输入 Webex 联系人中心桌面的 URL。 |
5 |
单击 更新 保存更改。 |
6 |
(可选)要更改活动表名称,请根据需要编辑 webexccactivitytable 属性。 在 “系统属性 ”页上,单击 webexccactivitytable。 根据需要更改值 字段。 |
7 |
(可选)通过以下方式添加用户组:
|
1 |
从过滤器导航器 字段中,导航到 。 |
2 |
单击新建。 |
3 |
输入 URL 的以下属性:
|
4 |
在 URL 字段的右侧,单击锁定 按钮并 添加 agentdesktop.do |
5 |
(可选)选择要分配配置的用户/代理组。 |
6 |
单击提交。 URL 显示为链接。 |
7 |
在尝试使用 OpenFrame 电话之前,请确保将 ServiceNow 自定义桌面布局 JSON 文件上传到 Webex 联系人中心管理门户。 有关详细信息,请参阅 在联系人中心上设置 ServiceNow Webex 桌面布局。 |
1 |
从 https://github.com/CiscoDevNet/webex-contact-center-crm-integrations/tree/main/ServiceNow 下载 ServiceNow 的桌面布局。 |
2 |
如果需要,更新桌面布局文件中的属性。 |
3 |
转至 Webex 联系人中心管理门户。 |
4 |
在管理门户导航栏中,选择 。 |
5 |
单击 新布局 并输入桌面布局的详细信息。 |
6 |
上传 ServiceNow 桌面布局 JSON 文件。 |
7 |
单击 保存 以保存配置。 现在,您可以在 ServiceNow 控制台中启动 Webex 联系人中心桌面。 |
8 |
从筛选器导航器 字段中,导航到 。 |
以下部分介绍为许可的企业实例安装 ServiceNow 连接器的步骤。
1 |
登录您的 ServiceNow 开发人员门户帐户并打开 管理控制台 。 |
2 |
在帐户 菜单的 “ 我的实例 ”区域中,单击 开始构建。 |
3 |
在开发人员实例上,从 窗口左上角的筛选器导航器 字段中导航到 插件。 |
4 |
搜索标题 为 Openframe 的 Openframe 插件。 您可能需要滚动列表。 |
5 |
单击“安装 ” 以安装 Openframe 插件。 |
6 |
在“激活插件 ”对话框中,单击 “激活”。 |
7 |
插件激活完成后,单击 “插件激活 ”对话框中的 “关闭并重新加载表单 ”。 |
8 |
要验证插件激活,请从窗口左上角的过滤器 导航器 字段中导航到 OpenFrame。 |
9 |
单击 Configuration(配置 )并确保 OpenFrame 插件出现在 OpenFrame Configuration(OpenFrame 配置 )列表中 。 |
具有企业许可证的实例可以直接从 ServiceNow 商店安装 Webex 联系人中心应用程序。
从 ServiceNow 商店下载并安装 Webex 联系人中心软件包: https://store.servicenow.com/sn_appstore_store.do#!/store/application/6c8e2a4edbc73410e1c75e25ca961947。 |
1 |
在窗口左上角的筛选器 导航器 字段中,输入 |
2 |
在“ 系统属性 ”页上,按更新日期对属性进行排序。 确保您可以看到以下 Webex 联系人中心属性: |
3 |
单击“agentdesktop_url ” 以打开“ 系统属性 agentdesktop_url ”页。 |
4 |
在值 字段中 ,根据运营区域输入 Webex 联系人中心桌面的 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 联系人中心桌面的用户组从“可用 ”移动到 “已选择 ”。 |
9 |
在尝试使用 OpenFrame 电话之前,请确保将 ServiceNow 自定义桌面布局 JSON 文件上传到 Webex 联系人中心管理门户。 有关详细信息,请参阅 在联系人中心上设置 ServiceNow Webex 桌面布局。 |
1 |
从 https://github.com/CiscoDevNet/webex-contact-center-crm-integrations/tree/main/ServiceNow 下载 ServiceNow 的桌面布局。 |
2 |
如果需要,更新桌面布局文件中的属性。 |
3 |
转至 Webex 联系人中心管理门户。 |
4 |
在管理门户导航栏上,选择 。 |
5 |
单击 新布局 并输入桌面布局的详细信息。 |
6 |
上传 ServiceNow 桌面布局 JSON 文件。 |
7 |
单击 保存 以保存配置。 现在,您可以在 ServiceNow 控制台中启动 Webex 联系人中心桌面。 |
8 |
从筛选器导航器 字段中,导航到 。 |
1 |
在“ 筛选器导航器 ”字段中,导航到 “事件 >打开的事件”。 |
2 |
右键单击主叫方字段,然后单击 配置字典。 |
3 |
添加逗号分隔的属性 您现在可以开始使用 ServiceNow 控制台中的 Webex 联系人中心桌面。 |
4 |
从筛选器导航器 字段中,导航到 。 |
我们仅支持使用 WebRTC for Salesforce(SFDC)和 Microsoft Dynamics(MS Dynamics)连接器登录 Agent Desktop。
在 ServiceNow 控制台中 Agent Desktop
在进行外拨呼叫之前,请确保执行以下作:
-
创建外拨入口点并设置外拨入口点策略。
-
为代理档案启用外拨 ANI。
-
将外拨 ANI 设置为拨号号码到入口点的映射。
有关详细信息,请参阅《Cisco Webex Contact Center 设置和管理指南》的预配置一章。
从筛选器导航器 字段中,导航到 。
有关如何使用桌面版的信息,请参阅 Webex 联系人中心帮助中的代理 标签页。
概述
本文介绍了为 ServiceNow CRM 连接器自定义业务规则的几种方法。 它详细介绍了如何根据特定于 ServiceNow 的业务规则自定义用例。
客户必须在 ServiceNow 上自行管理这些用例。 该配置特定于 ServiceNow,而不是 Webex 联络中心软件或专业知识。
这是帮助修改业务规则的参考文档。 ServiceNow 开发人员将创建和管理业务规则,并提供支持。
Cisco 仅提供示例文档。
以下各节提供了有关如何为开发人员和企业实例设置、启用和管理作小组件的详细信息。
提交作小组件的更新集
对于获得许可的企业实例,请从 ServiceNow 商店 安装最新的 Webex 联系人中心应用程序。
要为开发人员实例设置作小组件,请下载最新的系统更新设置 XML 文件有空在 github 存储库上的此位置: 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='呼叫接收自 '+ 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 呼叫后活动日志中添加 CAD 变量,并将其保存到呼叫后活动表数据中。
这只是一个参考文档 - 并展示了如何对名为“客户名称”的示例 CAD 变量执行此作,该变量将客户名称存储在 IVR 内并将其发布到 ServiceNow。
预计合作伙伴 + 客户 ServiceNow 开发人员将配置和管理此配置,因为它是对现有连接器的自定义。
Cisco 仅提供有关如何自定义和扩展连接器的技术。
截至撰写本文时,Cisco 团队已使用以下所述的技术验证了对向活动日志和活动表添加 CAD 变量的支持:
向 WebexCC IMP 活动添加列
-
在 ServiceNow 的开发者版本中编辑该表。
-
转到过滤器导航器并搜索工作室。
选择
Webex Contact Center
或
-
选择
WebexCC IMP 活动
桌子 -
添加新列,例如,
客户名称
在电话日志中添加列
-
编辑电话日志表。
-
添加新列,例如,
客户名称
.
WebexCC 活动转换地图
添加新列,例如, 客户名称
字段映射。
个性化列表列
按照 Service Now 的建议,将选择操作从创建更改为忽略。
配置电话日志列表
转到脚本包含
仅添加一行 webexcc.u_customername=actInfo.客户名称
到 propUtils。
参见以下行: 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 opens_for; var user = new GlideRecord("sys_user"); user.addQuery(this.getParameter('field'),this.getParameter('value')); user.query(); if (user.next()) opens_for=user.sys_id;//返回 user.sys_id; // 否则 // 返回 null; var grInt = new GlideRecord('interaction'); grInt.initialize(); grInt.assigned_to= gs.getUserID(); grInt.type= 'phone'; grInt.opened_for= opens_for; var sysid=grInt.insert(); 返回 sysid; }, 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();如果(suser.next()){var inc = new GlideRecordSecure('incident'); inc.addQuery('caller_id',suser.sys_id); inc.orderByDesc('sys_created_on'); inc.query(); 如果(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”的一部分。
演示截图
在 WebexCC 活动表中查看新添加的 CAD 变量。
为 Flow Designer 创建 CAD 变量
事件紧急程度事件影响
立即服务脚本更新
脚本更新包括
-
转到过滤器导航器并搜索
脚本包含
选择 系统 UI 下的 脚本包含选项。
-
使用 propUtils 过滤
名称
。 -
改变方法
获取用户系统 ID
在 脚本 字段中。当前脚本:
UserGetSysId: function () { var closed_for; var user = new GlideRecord("sys_user"); user.addQuery(this.getParameter('field'),this.getParameter('value')); user.query(); if (user.next()) closed_for=user.sys_id; var grInt = new GlideRecord('interaction'); grInt.initialize(); grInt.assigned_to= gs.getUserID(); grInt.type= 'phone'; grInt.opened_for= closed_for; var sysid=grInt.insert(); return sysid; },
事件新增示例代码:
UserGetSysId:函数(){var opens_for; var sysidlist = {}; var user = new GlideRecordSecure(“sys_user”);user.addQuery(this.getParameter('field'),this.getParameter('value'));user.query();if(user.next()){ opens_for=user.sys_id;//返回 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= opens_for; var sysid=grInt.insert(); sysidlist.sysid=sysid; return JSON.stringify(sysidlist);//sysid; },
-
转到过滤器导航器并搜索
UI 页面
。选择 UI 页面 选择 系统界面。
-
过滤 UI 页面 和 姓名 并搜索
代理桌面
。 -
更改
屏幕弹出
脚本字段中的函数。当前功能:
// 屏幕弹出函数 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 }); }
事件示例代码:
// 屏幕弹出函数 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('现场','电话'); gaout.addParam('值',callerani); gaout.addParam('IncUrgency',IncUrgency); gaout.addParam('影响',影响); gaout.getXMLWait(); //var sysid = gaout.getAnswer(); var sysObj = JSON.parse(gaout.getAnswer()); 如果(sysObj.incsysid){ openFrameAPI.openServiceNowForm({实体:'事件',查询:'sys_id ='+sysObj.incsysid,'interaction_sys_id':sysObj.sysid }); }else{ openFrameAPI.openServiceNowForm({实体:'事件',查询:'sys_id = -1','interaction_sys_id':sysObj.sysid }); } 窗口.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 interactionsysid=actInfo.interaction_sys_id; var incnum=""; var intenum=""; 删除 actInfo['interaction_sys_id']; 删除 actInfo['incident_sys_id']; if( interactionsysid!= null && interactionsysid != undefined){ var inte = new GlideRecordSecure('interaction'); //inte.get('sys_id', interactionsysid ); inte.addQuery('sys_id', interactionsysid ); 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 连接器的每个新呼叫,都会创建一个新的事件记录。
在过滤器导航器上搜索业务规则
单击新建。
参考示例代码:
函数 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; 如果 (fQuery == null) fQuery = ''; var view = sysparm_view; 如果 (view == null || view == '') view = "itil"; var userID = null; 如果 (eid != null && eid != '') { userID = UserGetSysId("employee_number",eid); } 如果 (userID == null && name != null && name != '') { userID = UserGetSysId("name", name); } 如果 (userID == null && phone != null && phone != '') { userID = UserGetSysId("phone", phone); } 如果 (userID != null) { 如果 (fQuery.length > 0) fQuery += "ˆ"; fQuery += "caller_id=" + userID; } 如果 (url == null) { url = "incident.do?sys_id=-1"; 如果 (fQuery != null) url += "&sysparm_query=" + fQuery; } answer = url; 返回 url; } 函数 UserGetSysId(field, value) { var user = new GlideRecord("sys_user"); user.addQuery(field, value); user.query(); 如果 (user.next()) 返回 user.sys_id; 否则返回 null; }
业务规则的示例配置
启用客户端可调用
计算机电话集成 (CTI) 事件处理 被标记为 真的。
使用自定义 CTI 规则更新屏幕弹出 URL “ cti.do?sysparm_cti_rule=createIncident&sysparm_caller_phone=“
这 sysparm_cti_rule=名称 在哪里 '姓名' 是 功能 将被援引 CTI 处理 而不是使用默认脚本。
在中定义函数 系统脚本 入口标记 客户端可调用。
如果您必须在函数中插入、更新或删除任何 GlideRecords,请调用单独的非客户端可调用函数来执行更新。
要使脚本可由客户端调用,您必须选中在显示 sys_script 条目时显示的表单上的“客户端可调用”复选框。
客户端可调用复选框默认不会显示。 要查看,您必须使用齿轮图标和废料桶机制修改表单上显示的字段。
定制 # 2 - 在 Webex 联系中心活动表中添加 CAD 变量
概述本文详细介绍了向 ServiceNow 表添加附加列的过程 - webexcc_activity,该列是在安装 Webex CC for ServiceNow CRM Connector 时创建的。
默认情况下,该表包含开箱即用的系统字段和值。
您可以在 WebexCC Flow 设计器中创建更多业务特定变量(CAD 变量),并将这些 CAD 变量添加到 ServiceNow 中 通话后活动日志,并将其保存到 通话后活动表 数据。
-
这仅是参考文档 - 并展示了如何对名为“客户名称”的示例 CAD 变量执行此操作,该变量将客户名称存储在 IVR 中并将其发布到 ServiceNow。
-
合作伙伴 + 客户 ServiceNow 开发人员将配置和管理此配置,因为它是对现有连接器的定制。
-
思科将仅提供如何定制和扩展连接器的技术。
-
截至本文,思科团队已使用下面描述的技术验证了将 CAD 变量添加到活动日志和活动表的支持。
在 ServiceNow 的开发人员版本中编辑该表。
前往
。选择 WebexCC 活动 桌子。
例如, 客户名称。
选择列表布局 WebexCC 活动。
如果您使用更新集 XML,则不需要此步骤 - 只需添加一行“ webexcc.u_customername=actInfo.客户名称“到 propUtils。

示例脚本
查看以下行: webexcc.u_客户名称=actInfo.客户名称; 并附有支持性评论。
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(); } } } return sys_id; }, type: 'propUtils2' });
使用新脚本名称编辑 UI 页面
在流程设计器中创建 CAD 变量
将 CAD 变量添加到桌面布局
演示截图
在 WebexCC 活动表中查看新添加的 CAD 变量。
