亚马逊 amazon connect(呼叫中心)
背景
公司为提高客服部门沟通效率对接电话呼叫中心,调研后选择了亚马逊的Amazon Connect服务,因为是国外业务没有选择用阿里云,怕有坑。
Amazon Connect后台
需要在后台创建“联系流”,也就是用户接通电话后我们提供的一系列功能选项,比如开始放一段欢迎语音,然后提示用户选择1,2,4,*,#等,每一个选项可能又对应了一条“联系流”,整体的功能就是围绕着“联系流”来进行的,用户输入的一些值可以通过 contact.getAttributes() 拿到。
前端对接
需要引入 amazon-connect-1.3.js, 这是一个开源项目(https://github.com/aws/amazon-connect-streams)所有前端接打电话的界面功能都是基于这个库来完成的。
connect.contact(): 主要获取联系人信息(姓名,电话等)还有联系人输入的一些值。
connect.agent(): 主要获取电话设备的一些状态信息。
HTML:
<!-- 电话图标,用来唤出电话界面 -->
<div id="amazonConnectContainer">
<img src="/Public/img/amazon_tel.jpg" alt="">
</div>
<!-- 生成iframe的地方,可以放在网页任意位置 -->
<div id="containerDiv" title="Amazon Connect">
<!--Amazon CCP is hiding in here-->
</div>
CSS:
<style>
.containerDiv iframe {
display: none;
}
</style>
JS:
<script type="text/javascript" src="/Public/lib/connect-streams.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#amazonConnectContainer").click(function(event) {
event.preventDefault();
$("#containerDiv iframe").remove();
if(typeof connect != "undefined" && !connect.core.initialized){
window.myCPP = window.myCPP || {};
//replace with the CCP URL for your Amazon Connect instance
var ccpUrl = "https://xxxxxx.awsapps.com/connect/ccp#/";
connect.core.initCCP(containerDiv, {
ccpUrl: ccpUrl,
loginPopup: false,
softphone: {
allowFramedSoftphone: true,
disableRingtone: true,
ringtoneUrl: true
}
});
connect.contact(subscribeToContactEvents);
connect.agent(subscribeToAgentEvents);
}
var awidth = 320; //窗口宽度
var aheight = 465; //窗口高度
var atop = (screen.availHeight - aheight) / 2; //窗口顶部位置
var aleft = (screen.availWidth - awidth) / 2; //窗口放中央 window.open (ccpUrl, 'newwindow', 'height=465, width=320, top='+atop+', left='+aleft+', toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
}); function subscribeToContactEvents(contact){
window.myCPP.contact = contact;
logInfoMsg("Subscribing to events for contact");
if (contact.getActiveInitialConnection()
&& contact.getActiveInitialConnection().getEndpoint()) {
logInfoMsg("New contact is from " + contact.getActiveInitialConnection().getEndpoint().phoneNumber); // 用户电话
} else {
logInfoMsg("This is an existing contact for this agent");
}
logInfoMsg("Contact is from queue " + contact.getQueue().name);
logInfoMsg("Contact attributes are " + JSON.stringify(contact.getAttributes())); // 用户属性
}
function subscribeToAgentEvents(agent) {
window.myCPP.agent = agent;
agentGreetingDiv.innerHTML = '<h3>Hi ' + agent.getName() + '!</h3>';
logInfoMsg("Subscribing to events for agent " + agent.getName());
logInfoMsg("Agent is currently in status of " + agent.getStatus().name);
// 获取电话状态名称
displayAgentStatus(agent.getStatus().name);
// agent.onRefresh(handleAgentRefresh);
// agent.onRoutable(handleAgentRoutable);
// agent.onNotRoutable(handleAgentNotRoutable);
// agent.onOffline(handleAgentOffline);
}
function logInfoMsg(msg) {
connect.getLog().info(msg);
}
});
</script>
亚马逊 amazon connect(呼叫中心)的更多相关文章
- 在亚马逊amazon的AWS上安装Node和MongoDB服务器
在亚马逊amazon的AWS上安装Node和MongoDB服务器 在建立AWS上账号.创建EC2 ,用putty链接上之后,就可以用下面的方法开始安装. !!! 如果不是是自己建立的EC2, 而是由B ...
- 通过SecureCRT访问亚马逊Amazon EC2主机
亚马逊推出了免费的云主机服务器 Amazon EC2,它是通过安全密钥来访问主机的. 问题是下载的密钥在SecureCRT 上无法直接使用,需要转换. 下面的方法可以在自己的linux主机上生成sec ...
- [2014亚马逊amazon] 在线笔试题 大于非负整数N的第一个回文数 Symmetric Number
1.题目 如标题,求大于整数N(N>=0)的第一个回文数的字符串表示形式. 这个题目也是当时笔试第一次见到,花了一个小时才做出了.慢慢总结还是挺简单的. 2.分析 分析如下: (1)一位数N(9 ...
- U盘版Windows 10已经在亚马逊Amazon開始接受预订啦
Windows 10定于下周7月29日正式公布. Windows 10家庭版119美元.专业版199美元,这个价格包含 Windows 10 授权.
- 亚马逊AWS业务副总裁:如何在基础设施上降成本
腾讯科技 林靖东 11月17日编译 亚马逊Amazon Web Services业务的副总裁.著名工程师詹姆斯汉密尔顿(James Hamilton)在AWS re:Invent大会上解释了公司是如何 ...
- 亚马逊与Twitter携手电子商务
亚马逊(Amazon)与Twitter开展了合作,允许用户以Twitter消息的形式将喜欢的商品发送到购物篮中.这些高科技企业正在想办法把社交媒体和电子商务融为一体. 这一功能旨在将Twitter转变 ...
- 亚马逊拟斥资15亿美元建航空货运中心 - Amazon to spend $1.49 bln on air cargo hub, fans talk of bigger ambitions - ReutersFebruary 1, 2017
2月1日消息,亚马逊本周二宣布将在肯塔基州开建其第一个航空货运中心,以应对高速增长的航空货运需求.亚马逊预计,该项目将带来2000个工作岗位. 据悉,该项计划总投入约为15亿美元,亚马逊或可从当地政府 ...
- Amazon EMR(Elastic MapReduce):亚马逊Hadoop托管服务运行架构&Hadoop云服务之战:微软vs.亚马逊
http://s3tools.org/s3cmd Amazon Elastic MapReduce (Amazon EMR)简介 Amazon Elastic MapReduce (Amazon EM ...
- [转]Amazon AWS亚马逊云服务免费一年VPS主机成功申请和使用方法
今天部落将再次为大家介绍如何成功申请到来自亚马逊的Amazon AWS免费一年的VPS主机服务.亚马逊公司这个就不用介绍了,是美国最大的一家网络电子商务公司,亚马逊弹性计算云Amazon EC2更是鼎 ...
随机推荐
- SpringBoot项目的创建流程(初步)
小伙伴们在学习的过程中大概也发现了这两个框架需要我们手动配置的地方非常多,不过做JavaEE开发的小伙伴们肯定也听说过“约定大于配置”这样一句话,就是说系统,类库,框架应该假定合理的默认值,而非要求提 ...
- Winsock编程基础1
1.加载和释放Winsoke库 //所有Winsock函数都是从WS2_32.DLL导出,包含相应库文件#include <winsock2.h>#pragma comment(lib, ...
- EF Core中避免贫血模型的三种行之有效的方法(翻译)
Paul Hiles: 3 ways to avoid an anemic domain model in EF Core 1.引言 在使用ORM中(比如Entity Framework)贫血领域模型 ...
- PHP 图片base64 互转
<?php /* http://tool.css-js.com/base64.html 透明图片 <img src="data:image/jpg;base64,iVBORw0K ...
- [Swift]LeetCode139. 单词拆分 | Word Break
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine ...
- [Swift]LeetCode347. 前K个高频元素 | Top K Frequent Elements
Given a non-empty array of integers, return the k most frequent elements. Example 1: Input: nums = [ ...
- [Swift]LeetCode876. 链表的中间结点 | Middle of the Linked List
Given a non-empty, singly linked list with head node head, return a middle node of linked list. If t ...
- [Swift]LeetCode988. 从叶结点开始的最小字符串 | Smallest String Starting From Leaf
Given the root of a binary tree, each node has a value from 0 to 25 representing the letters 'a' to ...
- BBS论坛(五)
5.1.cms后台修改密码功能完成 (1)新建app/forms.py # app/forms.py from wtforms import Form class BaseForm(Form): de ...
- BBS论坛(二)
2.1.cms后台登录界面完成 (1)templates/cms/cms_login.html <!DOCTYPE html> <html lang="zh-CN" ...