差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 后一修订版 两侧同时换到之后的修订记录 | ||
cs:400systemintegration:api-open-platform [2019/11/15 04:16] candywang [获取历史通话列表] |
cs:400systemintegration:api-open-platform [2019/12/31 10:48] candywang [获取历史会话列表] |
||
---|---|---|---|
行 631: | 行 631: | ||
|status| String |接口响应状态| | |status| String |接口响应状态| | ||
+ | ==== 修改坐席在线状态 ==== | ||
+ | |||
+ | 可修改坐席在线状态,状态列表:空闲、忙碌、离开、隐身、离线。 | ||
+ | |||
+ | * Path: http://kefu.easemob.com/api/platform/tenants/{tenantId}/agent/state | ||
+ | * HTTP Method: PUT | ||
+ | * Request Headers: Content-Type=application/json和Kefu-Token=${accessToken} | ||
+ | * 可能的错误码:详见:[[#错误码说明|错误码说明]] | ||
+ | |||
+ | Request body: | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "username":"32273591@qq.com", | ||
+ | "state":"Busy" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | **Curl示例:** | ||
+ | |||
+ | <code php> | ||
+ | curl -X PUT \ | ||
+ | http://kefu.easemob.com/api/tenants/1/agent/state \ | ||
+ | -H 'Content-Type: application/json' \ | ||
+ | -H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
+ | -d '{ | ||
+ | "username":"32273591@qq.com", | ||
+ | "state":"Busy" | ||
+ | }' | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |Kefu-Token| String |Y|调用接口的accessToken| | ||
+ | |tenantId|int|Y|租户ID| | ||
+ | |username| String |Y|账号(邮箱)| | ||
+ | |state| String |Y|在线状态:空闲(Online),忙碌(Busy),离开(Leave),隐身(Hidden),离线(Offline)| | ||
+ | |||
+ | **Response示例:** | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | |status| String |接口响应状态| | ||
===== 查询历史会话 ===== | ===== 查询历史会话 ===== | ||
行 749: | 行 798: | ||
"agentQueueSet": null, | "agentQueueSet": null, | ||
"enquiryTagNames": null, | "enquiryTagNames": null, | ||
- | "summarysDetail": "test summary name" | + | "summarysDetail": "test summary name", |
+ | "serviceSessionAttribute": { | ||
+ | "carrierOperator": "ssss", | ||
+ | "referer": "123", | ||
+ | "system": "sss", | ||
+ | "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36", | ||
+ | "version": "1" | ||
+ | } | ||
} | } | ||
] | ] | ||
行 807: | 行 863: | ||
| enquiryTagNames | String | 满意度评价标签的名字 | | | enquiryTagNames | String | 满意度评价标签的名字 | | ||
| summarysDetail | String | 会话小结文本内容 | | | summarysDetail | String | 会话小结文本内容 | | ||
+ | | (serviceSessionAttribute) carrierOperator | String | 运营商 | | ||
+ | | (serviceSessionAttribute)referer | String | 来源信息 | | ||
+ | | (serviceSessionAttribute)system | String | 操作系统 | | ||
+ | | (serviceSessionAttribute)userAgent | String | 软件环境 | | ||
+ | | (serviceSessionAttribute)version | String | 系统版本 | | ||
+ | | (serviceSessionAttribute)searchType | String | 推广来源 | | ||
+ | | (serviceSessionAttribute)accessUrl | String | 着陆页 | | ||
+ | | (serviceSessionAttribute)ip | String | IP | | ||
+ | | (serviceSessionAttribute)equipment | String | 设备 | | ||
+ | | (serviceSessionAttribute)region | String | 地区 | | ||
+ | | (serviceSessionAttribute)equipment | keyword | 搜索词 | | ||
==== 获取历史会话详情 ==== | ==== 获取历史会话详情 ==== | ||
行 1294: | 行 1360: | ||
<code php> | <code php> | ||
curl --request GET \ | curl --request GET \ | ||
- | --url 'http://kefu.easemob.com/api/platform/tenants/28994/calldetails?page=0&size=14&total_pages=1&total_entries=10&startTime=2019-11-10T00%3A00%3A00.000Z&stopTime=2019-11-16T23%3A59%3A59.000Z&contactType=Inbound&orderType=DESC&contactDisposition=ALL&phoneNumber=&kefuId=&useStop=fal&groupId=&satisfaction=&_=1573695779337' \ | + | --url 'http://kefu.easemob.com/api/platform/tenants/28994/calldetails?page=0&size=14&startTime=2019-11-10%2023:00:00&stopTime=2019-11-16%2023:00:00&contactType=Inbound&orderType=DESC&order=&contactDisposition=ALL&phoneNumber=&useStop=false&satisfaction=' \ |
--header 'Kefu-Token:a7f3d2bcb62721a3c67b8f567acfd553' \ | --header 'Kefu-Token:a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
</code> | </code> | ||
行 1306: | 行 1372: | ||
|startTime| String |N|通话时间(开始范围条件),时间格式 2018-06-16T23%3A59%3A59.000Z| | |startTime| String |N|通话时间(开始范围条件),时间格式 2018-06-16T23%3A59%3A59.000Z| | ||
|stopTime| String |N|通话时间(结束范围条件),时间格式 2018-06-16T23%3A59%3A59.000Z| | |stopTime| String |N|通话时间(结束范围条件),时间格式 2018-06-16T23%3A59%3A59.000Z| | ||
- | |contactType| String |N|通话类型(呼入或呼出)| | + | |contactType| String |N|通话类型,取值:Inbound(呼入),Outbound(呼出),Back2Back(双呼),Internal(内部通话),多个条件以英文逗号隔开| |
- | |orderType| String |N|| | + | |orderType| String |N|排序方式,取值:ASC/DESC,默认DESC| |
- | |contactDisposition| String |N|挂断原因| | + | |contactDisposition| String |N|挂断原因,取值:ALL(全部),Success(正常),NoAnswer(未接通),AbandonedInContactFlow(IVR中放弃),AbandonedInQueue(排队放弃),AbandonedRing(振铃放弃),QueueOverflow(排队超时),OneStepTransfer(转外线)| |
- | |phoneNumber| String |N|| | + | |phoneNumber| String |N|手机号码,同时检索主叫和被叫号码| |
- | |satisfaction| String |N|满意度评价,包括未发送、未评价、满意度、一般、不满意| | + | |satisfaction| String |N|满意度评价,取值:0(未发送),998(未评价),满意,一般,不满意| |
+ | |||
+ | **Response示例:** | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [ | ||
+ | { | ||
+ | "id": "10301193-7c1a-4b9a-9285-164040c189b8", | ||
+ | "ccId": "d00842df-e406-4f32-9929-80b02f26e07c", | ||
+ | "contactId": "2561536188", | ||
+ | "staffId": "83162635-be49-486e-9334-d358276feda0", | ||
+ | "groupId": "e155be22-05ca-4535-89aa-ad3c8d358d45", | ||
+ | "labelId": null, | ||
+ | "visitorId": "fd07207a-d2d5-4dab-8637-800a27c526f9", | ||
+ | "contactType": "Inbound", | ||
+ | "contactDisposition": "Success", | ||
+ | "callingNumber": "18612390240", | ||
+ | "calledNumber": "02160556504", | ||
+ | "recordFileName": "157372327914600080309018.wav", | ||
+ | "province": "北京", | ||
+ | "city": "北京", | ||
+ | "duration": 22, | ||
+ | "satisfaction": 0, | ||
+ | "satisfactionDesc": "未发送", | ||
+ | "startTime": 1573723266000, | ||
+ | "stopTime": 1573723288000, | ||
+ | "syncStartTime": 1573723266000, | ||
+ | "syncStopTime": 1573723288000, | ||
+ | "syncFlag": true, | ||
+ | "recordSyncFlag": 1, | ||
+ | "agentNames": "aliyun_cc_02", | ||
+ | "skillGroupNames": "沙箱技能组", | ||
+ | "visitor": { | ||
+ | "tenantId": 28994, | ||
+ | "userId": "fd07207a-d2d5-4dab-8637-800a27c526f9", | ||
+ | "createDateTime": 1543994461000, | ||
+ | "lastUpdateDateTime": 1563959840000, | ||
+ | "nickname": "18612390240", | ||
+ | "trueName": "大帅哥", | ||
+ | "sex": 0, | ||
+ | "qq": "260553619", | ||
+ | "weixin": "嘻嘻,喜闻乐见", | ||
+ | "email": "leoli@easemob.com", | ||
+ | "phone": "18612390240", | ||
+ | "companyName": "环信", | ||
+ | "description": "环信环信环信环信环信环信" | ||
+ | }, | ||
+ | "evaluateContent": null, | ||
+ | "recordingDataList": [ | ||
+ | { | ||
+ | "fileName": "157372327914600080309018.wav", | ||
+ | "fileUrl": null, | ||
+ | "startTime": 1573723279000 | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ], | ||
+ | "first": true, | ||
+ | "last": true, | ||
+ | "number": 0, | ||
+ | "numberOfElements": 4, | ||
+ | "totalPages": 1, | ||
+ | "totalElements": 4 | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | |status| String |接口响应状态| | ||
+ | |id| String |通话记录ID| | ||
+ | |ccid| String |呼叫中心实例ID| | ||
+ | |contactId| String |通话ID| | ||
+ | |staffId| String |客服ID| | ||
+ | |groupId| int |技能组ID| | ||
+ | |labelId| int |通话标签ID| | ||
+ | |visitorId| String |访客环信ID| | ||
+ | |contactType| String |通话类型| | ||
+ | |contactDisposition| String |挂断原因| | ||
+ | |callingNumber| String |主叫号码| | ||
+ | |calledNumber| String |被叫号码| | ||
+ | |recordFileName| String |通话录音文件名称| | ||
+ | |province| String |访客号码归属地-省| | ||
+ | |city| String |访客号码归属地-市| | ||
+ | |duration| String |客服响应时长| | ||
+ | |satisfaction| String |满意度值| | ||
+ | |satisfactionDesc| String |满意度评价信息| | ||
+ | |startTime| String |通话开始时间| | ||
+ | |stopTime| String |通话结束时间| | ||
+ | |agentNames| String |客服昵称,若存在转接,则为多个| | ||
+ | |skillGroupNames| String |技能组名称| | ||
+ | |tenantId| int |租户ID| | ||
+ | | | | ||
+ | |visitor访客信息| | ||
+ | |userId| String |访客ID| | ||
+ | |createDateTime| String |创建时间| | ||
+ | |lastUpdateDateTime| String |更新时间| | ||
+ | |nickname| String |昵称| | ||
+ | |trueName| String |姓名| | ||
+ | |sex| String |性别| | ||
+ | |qq| String |QQ| | ||
+ | |weixin| String |微信| | ||
+ | |email| String |邮箱| | ||
+ | |phone| String |电话| | ||
+ | |companyName| String |公司名称| | ||
+ | |description| String |备注| | ||
+ | | | | ||
+ | |evaluateContent| String |服务小结| | ||
+ | |fileName| String |录音文件名| | ||
+ | |fileUrl| String |录音文件路径| | ||
+ | |startTime| String |录音开始时间| | ||
+ | |first| boolean |是否是第一页| | ||
+ | |last| boolean |是否是最后一页| | ||
+ | |number| int |当前页码| | ||
+ | |numberOfElements| int |当前页数据量| | ||
+ | |totalPages| int |总页数| | ||
+ | |totalElements| int |总数据量| | ||
行 1333: | 行 1516: | ||
|API_111|page index must be more than 0.|分页索引必须大于0| | |API_111|page index must be more than 0.|分页索引必须大于0| | ||
|API_112|page size must be less than 50.|分页每页的容量不能大于50| | |API_112|page size must be less than 50.|分页每页的容量不能大于50| | ||
+ | |API_113|state must be Online or Busy or Leave or Other or Offline or Hidden or Logout.|请求状态不正确| | ||
|API_400|api request failed|服务间调用请求错误| | |API_400|api request failed|服务间调用请求错误| |