坐席接听和拨打 KPI 统计接口
::: tip 文档迁移说明 本文档已按主题拆分,以下内容请移步新页面:
使用场景
提供坐席接听电话的工作绩效统计接口。可使用分机进行统计,也可以通过 HTTP员工信息设置接口 的工号和上下班信息来进行统计。
接口描述
统计启动接口
| 参数名 | 参数定义 | 描述 |
|---|---|---|
| nums | string | 分机号,分组号 工号,参考 HTTP员工信息设置接口 注:多个号码用逗号隔开 |
| type | string | extnum: 使用分机统计,不填写默认使用分机 worknum: 使用工号进行统计 |
| session | string | 由于统计是个耗时的工作,需要3步获取统计结果,这3步需要一个唯一字符串来关联。 |
| begin | string | 统计的呼叫记录开始时间,请使用如下格式提交 2021-01-01T00:00:00 注:日期和时间之间使用T字符间隔 |
| end | string | 统计的呼叫记录结束时间,请使用如下格式提交 2021-03-01T00:00:00 注:日期和时间之间使用T字符间隔 |
| opt | string | 接听统计: KPI_IN_HOUR: 按小时时间段统计(时间段不能超过31天) KPI_IN_DAY: 按天时间段统计 KPI_IN_MONTH: 按月时间段统计 KPI_IN_YEAR: 按年时间段统计 拨打统计: KPI_OUT_HOUR: 按小时时间段统计(时间段不能超过31天) KPI_OUT_DAY: 按天时间段统计 KPI_OUT_MONTH: 按月时间段统计 KPI_OUT_YEAR: 按年时间段统计 |
| x.x.x.x | CTI服务器IP地址或域名 |
- 返回值:
- 200 : 开始进行统计,可调用进度接口查询统计进度
- 400 : 参数错误
统计进度查询接口
| 参数名 | 参数定义 | 描述 |
|---|---|---|
| session | string | 保证和《统计启动接口》中得session一致 |
| opt | PROGRESS | 固定设置请不要修改 |
- 返回值:1-100 当返回100时,说明统计完成,可获取统计数据了。
统计数据获取接口
| 参数名 | 参数定义 | 描述 |
|---|---|---|
| session | string | 保证和《统计启动接口》中得session一致 |
| opt | GETDATA | 固定设置请不要修改 |
- 返回值:json格式的数据对象列表
[{"aname":"研发","cdatetime":"2021-02-19 10:00:00","durationType":"hour","ownerType":0,"num":"801","total":1,"ringDuration":9,"pickupCount":0,"quickPickCount":0,"talkingTime":0,"standbyTime":150,"writeTime":0,"avgTalkingTime":0,"avgStandbyTime":150,"avgWriteTime":0,"holdCount":0,"forwardCount":0,"judgeOpenCount":0,"judgeOpenRate":"","judgeCount":0,"goodCount":0,"badCount":0,"missCount":1,"restTime":0,"redialCount":0},{"aname":"研发","cdatetime":"2021-02-19 14:00:00","durationType":"hour","ownerType":0,"num":"801","total":1,"ringDuration":12,"pickupCount":0,"quickPickCount":0,"talkingTime":0,"standbyTime":6792,"writeTime":0,"avgTalkingTime":0,"avgStandbyTime":6792,"avgWriteTime":0,"holdCount":0,"forwardCount":0,"judgeOpenCount":0,"judgeOpenRate":"","judgeCount":0,"goodCount":0,"badCount":0,"missCount":1,"restTime":0,"redialCount":0},{"aname":"研发","cdatetime":"2021-02-19 16:00:00","durationType":"hour","ownerType":0,"num":"801","total":1,"ringDuration":6,"pickupCount":1,"quickPickCount":1,"talkingTime":15,"standbyTime":0,"writeTime":0,"avgTalkingTime":15,"avgStandbyTime":0,"avgWriteTime":0,"holdCount":0,"forwardCount":0,"judgeOpenCount":1,"judgeOpenRate":"100","judgeCount":1,"goodCount":1,"goodRate":"100","badCount":0,"missCount":0,"restTime":0,"redialCount":0},{"aname":"研发","cdatetime":"2021-02-20 17:00:00","durationType":"hour","ownerType":0,"num":"801","total":1,"ringDuration":8,"pickupCount":1,"quickPickCount":1,"talkingTime":3,"standbyTime":27,"writeTime":0,"avgTalkingTime":3,"avgStandbyTime":27,"avgWriteTime":0,"holdCount":0,"forwardCount":0,"judgeOpenCount":0,"judgeOpenRate":"","judgeCount":0,"goodCount":0,"badCount":0,"missCount":0,"restTime":0,"redialCount":0},{"aname":"TOTAL","cdatetime":"-","durationType":"-","ownerType":0,"num":"801","total":4,"ringDuration":8,"pickupCount":2,"quickPickCount":2,"talkingTime":18,"standbyTime":6969,"writeTime":0,"avgTalkingTime":9,"avgStandbyTime":1742,"avgWriteTime":0,"holdCount":0,"forwardCount":0,"judgeOpenCount":1,"judgeOpenRate":"50","judgeCount":1,"goodCount":1,"goodRate":"50","badCount":0,"missCount":2,"restTime":0,"redialCount":0},{"aname":"SUM TOTAL","cdatetime":"-","durationType":"-","ownerType":0,"num":"-","total":4,"ringDuration":8,"pickupCount":2,"quickPickCount":2,"talkingTime":18,"standbyTime":6969,"writeTime":0,"avgTalkingTime":9,"avgStandbyTime":1742,"avgWriteTime":0,"holdCount":0,"forwardCount":0,"judgeOpenCount":1,"judgeOpenRate":"50","judgeCount":1,"goodCount":1,"goodRate":"50","badCount":0,"missCount":2,"restTime":0,"redialCount":0}]
注意
- aname:TOTAL 表示已分机或工号为分组的汇总
- aname: SUM TOTAL 表示全部汇总的数据
效果图

字段说明
| 字段名 | 定义 | 描述 |
|---|---|---|
| aname | string | 坐席姓名 |
| cdatetime | string | 统计时间段开始时间 |
| durationType | string | 时间段类型 hour: 按小时统计 day: 按天统计 month: 按月统计 year: 按年统计 |
| ownerType | Integer | 0:按分机统计 1: 按工号统计 |
| total | Integer | 总打入或拨打量 |
| ringDuration | Integer | 平均振铃时长(秒) |
| pickupCount | Integer | 接起量 |
| quickPickCount | Integer | 快速接起量,默认15秒接听,可配置 |
| talkingTime | Integer | 总通话时长(秒) |
| standbyTime | Integer | 总就绪时长(秒) |
| writeTime | Integer | 总案面时长(秒) |
| avgTalkingTime | Integer | 平均通话时长(秒) |
| avgStandbyTime | Integer | 平均就绪时长(秒) |
| avgWriteTime | Integer | 平均案面时长(秒) |
| holdCount | Integer | 保持次数(接听特性) |
| holdRate | String | 保持率(接听特性) |
| forwardCount | Integer | 转接次数(接听特性) |
| forwardRate | Sting | 转接率(接听特性) |
| judgeOpenCount | Integer | 转满意度量 |
| judgeOpenRate | Sting | 转满意度率 |
| judgeCount | Integer | 客户平价量 |
| goodCount | Integer | 好评量 |
| goodRate | Sting | 好评率 |
| badCount | Integer | 差评量 |
| badRate | Sting | 差评率 |
| missCount | Integer | 漏接量(接听特性) |
| restTime | Integer | 小休时长(按小时统计无效) |
| redialCount | Integer | 按天统计时,客户来电重播量(接听特性) |
| redialRate | Sting | 二次来电率(接听特性) |
统计数据导出Excel接口
| 参数名 | 参数定义 | 描述 |
|---|---|---|
| session | string | 保证和《统计启动接口》中得session一致 |
| opt | EXPORT | 固定设置请不要修改 |
- 注意:导出需要再需要在统计完成后才能操作。
附录:呼叫记录数据库字段(telcrm.calllog)
呼叫记录数据库字段说明,配合 呼叫记录查询接口 使用。
数据库表名:telcrm.calllog
| 字段名称 | 描述 | 备注 |
|---|---|---|
| id | 编号(主键) | |
| caller | 主叫号码 | |
| callee | 被叫号码 | |
| channel | 呼叫通道 | |
| beginTime | 开始时间 | |
| duration | 持续时间 | |
| state | 通话状态,参考呼叫记录查询接口的枚举定义 | |
| callType | 呼叫类型,参考呼叫记录查询接口的枚举定义 | |
| estimate | 服务评价 | |
| callid | 呼叫CallID | |
| calleruid | 过期删除 | |
| calleeuid | 过期删除 | |
| record | 助手相关:通话备注 | |
| recordVoice | 录音文件路径 | |
| cname | 助手相关:客户名称 | |
| servicetype | 助手相关:服务类型 | |
| manustate | 助手相关:服务类型子类 | |
| clickcallid | 点击呼叫的CallID | |
| fxonum | 使用的相关落地线路编号 | |
| question | 助手相关:客户问题 | |
| productid | 过期删除 | |
| dtmfkey | 主机打入IVR的按键信息 | |
| ivrpoint | IVR转接的语音菜单节点 | |
| callerworknum | 主叫工号 | |
| calleeworknum | 被叫工号 | |
| business | 通话相关业务 | |
| prerecord | 坐席外呼客户彩铃等录制 | |
| robotrecord | AI机器人和客户沟通的录音文件 | |
| ivrAnwerTime | 主叫进入语音菜单时间 | |
| ivrAnwerDuration | 语音菜单放音时长 | |
| queueTime | 主叫排队起始时间 | |
| queueDuration | 主叫排队时长 | |
| ringTime | 被叫振铃起始时间 | |
| ringDuration | 振铃时长 | |
| stttxt | 过期删除 | |
| hungupside | 挂机方 | |
| ivrvoicemail | 语音菜单录制的客户留言录音地址 | |
| accessnum | 客户打入系统使用的接入号 | |
| clicktoken | 点击呼叫接口传入的字符串 |
