差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
后一修订版 两侧同时换到之后的修订记录
cs:400systemintegration:api-open-platform [2019/11/15 04:47]
candywang [获取历史通话列表]
cs:400systemintegration:api-open-platform [2020/09/23 11:26]
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 |接口响应状态|
  
 ===== 查询历史会话 ===== ===== 查询历史会话 =====
行 675: 行 724:
 |createDateTo| String |N|会话创建时间(结束范围条件),​时间格式 2018-06-16T23%3A59%3A59.000Z| |createDateTo| String |N|会话创建时间(结束范围条件),​时间格式 2018-06-16T23%3A59%3A59.000Z|
 |agentIds|list|N|多个坐席的ID数组| |agentIds|list|N|多个坐席的ID数组|
 +|serviceSessionId|String|N|某个会话id,可用于查看某通会话信息,此参数与其他参数不可一同请求|
 |sortField| String |N|排序字段 stopDateTime startDateTime createDatetime| |sortField| String |N|排序字段 stopDateTime startDateTime createDatetime|
 |sortOrder| String |N|升降序asc desc| |sortOrder| String |N|升降序asc desc|
行 749: 行 799:
                 "​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: 行 864:
 | 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 | 搜索词 |
 ==== 获取历史会话详情 ==== ==== 获取历史会话详情 ====
  
行 821: 行 888:
 <code php> <code php>
 curl --request GET \ curl --request GET \
-  --url '​http://​kefu.easemob.com/​tenants/​8019/​servicesessions/​05303239-dd9e-4afe-bf69-92469da17612/​messages?​page=0&​size=10&​_=1561514960554'​ \+  --url '​http://​kefu.easemob.com/​api/​platform/​tenants/​8019/​servicesessions/​05303239-dd9e-4afe-bf69-92469da17612/​messages?​page=0&​size=10&​_=1561514960554'​ \
   --header '​Kefu-Token:​ a7f3d2bcb62721a3c67b8f567acfd553'​ \   --header '​Kefu-Token:​ a7f3d2bcb62721a3c67b8f567acfd553'​ \
 </​code>​ </​code>​
行 1306: 行 1373:
 |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示例:** **Response示例:**
行 1381: 行 1448:
 ^名称^类型^说明^ ^名称^类型^说明^
 |status| String |接口响应状态| |status| String |接口响应状态|
-|id| String |接口响应状态+|id| String |通话记录ID
-|ccid| String |接口响应状态+|ccid| String |呼叫中心实例ID
-|contactId| String |接口响应状态|+|contactId| String |通话ID|
 |staffId| String |客服ID| |staffId| String |客服ID|
 |groupId| int |技能组ID| |groupId| int |技能组ID|
 |labelId| int |通话标签ID| |labelId| int |通话标签ID|
 |visitorId| String |访客环信ID| |visitorId| String |访客环信ID|
-|contactType| String |通话类型,包括呼入和呼出|+|contactType| String |通话类型|
 |contactDisposition| String |挂断原因| |contactDisposition| String |挂断原因|
 |callingNumber| String |主叫号码| |callingNumber| String |主叫号码|
行 1403: 行 1470:
 |skillGroupNames| String |技能组名称| |skillGroupNames| String |技能组名称|
 |tenantId| int |租户ID| |tenantId| int |租户ID|
 +| |
 +|visitor访客信息|
 |userId| String |访客ID| |userId| String |访客ID|
-|createDateTime| String |访客创建时间|+|createDateTime| String |创建时间|
 |lastUpdateDateTime| String |更新时间| |lastUpdateDateTime| String |更新时间|
 |nickname| String |昵称| |nickname| String |昵称|
行 1415: 行 1484:
 |companyName| String |公司名称| |companyName| String |公司名称|
 |description| String |备注| |description| String |备注|
 +| |
 |evaluateContent| String |服务小结| |evaluateContent| String |服务小结|
 |fileName| String |录音文件名| |fileName| String |录音文件名|
 |fileUrl| String |录音文件路径| |fileUrl| String |录音文件路径|
 |startTime| String |录音开始时间| |startTime| String |录音开始时间|
-|first| boolean || +|first| boolean |是否是第一页
-|last| boolean || +|last| boolean |是否是最后一页
-|number| ​String ​|| +|number| ​int |当前页码
-|numberOfElements| ​String ​|| +|numberOfElements| ​int |当前页数据量
-|totalPages| ​String ​|总页数| +|totalPages| ​int |总页数| 
-|totalElements| ​String ​|总数据量|+|totalElements| ​int |总数据量|
  
  
行 1447: 行 1517:
 |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|服务间调用请求错误|