差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
cs:400systemintegration:api-open-platform [2019/06/27 03:35] tinychang [获取历史会话列表] |
cs:400systemintegration:api-open-platform [2024/04/07 06:12] 丁艺杰 [查询坐席信息] |
||
---|---|---|---|
行 72: | 行 72: | ||
|accessToken| String |token| | |accessToken| String |token| | ||
|expireTime|integer|过期时间(单位:秒)| | |expireTime|integer|过期时间(单位:秒)| | ||
+ | |||
+ | ===== 创建关联 ===== | ||
+ | |||
+ | 可调用接口创建关联,关联即im消息通道。 | ||
+ | |||
+ | * Path: http://kefu.easemob.com/api/platform/tenants/{tenantId}/autoCreateImAssociation | ||
+ | * HTTP Method: POST | ||
+ | * Request Headers: Kefu-Token=${accessToken} | ||
+ | * 可能的错误码:详见:[[#错误码说明|错误码说明]] | ||
+ | |||
+ | **Curl示例:** | ||
+ | |||
+ | <code php> | ||
+ | curl --location --request POST 'localhost:8016/api/platform/tenants/20016/autoCreateImAssociation' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data-raw '{ | ||
+ | "associationName":"6666" | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |Kefu-Token| String |Y|调用接口的accessToken| | ||
+ | |tenantId|int|Y|租户ID| | ||
+ | |associationName|String|N|关联名称| | ||
+ | |||
+ | **Response示例:** | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entity": { | ||
+ | "id": 23597, | ||
+ | "tenantId": 29748, | ||
+ | "name": "6666", | ||
+ | "description": null, | ||
+ | "orgName": "1428201012025562", | ||
+ | "appName": "kefuchannelapp29748", | ||
+ | "clientId": "YXA6W8LnQAxXEeuh8wWPzpsadg", | ||
+ | "clientSecret": "YXA6wc3HKZZvXVlSl2M5arIpqLqqV_A", | ||
+ | "serviceEaseMobIMNumber": "kefuchannelimid_600643", | ||
+ | "serviceEaseMobIMPassword": null, | ||
+ | "createDateTime": 1607959692553, | ||
+ | "ispass": true, | ||
+ | "isrun": true, | ||
+ | "dutyType": "None", | ||
+ | "agentQueueId": null, | ||
+ | "secondQueueId": null, | ||
+ | "robotId": null, | ||
+ | "secondRobotId": null, | ||
+ | "timeScheduleId": 0, | ||
+ | "usermail": "d938ebd9-86cb-4b89-8c12-54121b491c36@easemob.com", | ||
+ | "password": null, | ||
+ | "token": null, | ||
+ | "techChannelInfo": null, | ||
+ | "experience": false, | ||
+ | "appKey": "1428201012025562#kefuchannelapp29748" | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | | status | String | 接口响应状态 | | ||
+ | |id | int | 关联ID | | ||
+ | |tenantId | int | 租户ID | | ||
+ | |name | String | 关联名称 | | ||
+ | | description | String | 描述 | | ||
+ | | orgName | String | | | ||
+ | | appName | String | 应用名称 | | ||
+ | | clientId | String | | | ||
+ | | clientSecret | String | 秘钥 | | ||
+ | | serviceEaseMobIMNumber | String | 环信IM账号 | | ||
+ | | ServiceEaseMobIMpassword | String | 环信IM密码 | | ||
+ | | createDateTime | Data | 创建时间 | | ||
+ | | ispass | boolean | | | ||
+ | | isrun | boolean | | | ||
+ | | dutyType | DutyType | 绑定是全天还是分上下班(枚举:Allday(全天)、Onoff(上班时段和下班时段)、None(空)、NonWorkHours(下班时间)、WorkHours(上班时间)) | | ||
+ | | agentQueueId | long | 上班时间或全天绑定的技能组id | | ||
+ | | secondQueueId | long | 下班时间绑定的技能组id | | ||
+ | | robotId | long | 上班时间或全天绑定的机器人id | | ||
+ | | secondRobotId | long | 下班时间绑定的机器人id | | ||
+ | | timeScheduleId | int | 时间计划 | | ||
+ | | usermail | String | 邮箱(随机生成) | | ||
+ | | password | String | 密码(随机生成) | | ||
+ | | token | String | | | ||
+ | | techChannelInfo | String | | | ||
+ | | experience | | | ||
+ | | appKey | | | ||
+ | |||
===== 管理坐席 ===== | ===== 管理坐席 ===== | ||
行 88: | 行 177: | ||
<code php> | <code php> | ||
curl -X GET \ | curl -X GET \ | ||
- | 'http://kefu.easemob.com/api/tenants/1/agents?page=0&size=10&keyValue=32273591@qq.com' \ | + | 'http://kefu.easemob.com/api/platform/tenants/1/agents?&agentType=Message' \ |
-H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | -H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
</code> | </code> | ||
行 98: | 行 187: | ||
|page|int|Y|第几页,从0开始| | |page|int|Y|第几页,从0开始| | ||
|size|int|Y|每页显示的数据| | |size|int|Y|每页显示的数据| | ||
- | |keyValue|String|Y|模糊查询,username(邮箱),trueName(真实姓名),mobilePhone(手机号码),agentNumber(工号)| | + | |keyValue|String|Y|模糊查询,username(邮箱),trueName(真实姓名)| |
+ | |agentType|String|N|坐席类型:All 全渠道座席,Message 在线座席,Ticket 工单座席,CallCenter 呼叫中心座席, MVCombine 视频客服(VEC独立视频),默认为全部| | ||
**Response示例:** | **Response示例:** | ||
行 160: | 行 250: | ||
| lastUpdateDateTime | String | 更新时间 | | | lastUpdateDateTime | String | 更新时间 | | ||
| status | String | 启用状态 | | | status | String | 启用状态 | | ||
- | | state | String | 在线状态 | | + | | state | String | 在线与离线状态,在线状态Online包含有:Idle(空闲)、Busy(忙碌)、Hidden(隐身)、Leave(离开) ,离线状态Offline包含有:Offline(离线)、Logout(登出) | |
| maxServiceSessionCount | int |接待人数| | | maxServiceSessionCount | int |接待人数| | ||
| trueName | String |真实姓名| | | trueName | String |真实姓名| | ||
行 170: | 行 260: | ||
| scope | String | 所属范围 | | | scope | String | 所属范围 | | ||
| bizId | String | 所属业务ID | | | bizId | String | 所属业务ID | | ||
- | | onLineState | String | 在线状态 | | + | | onLineState | String | 在线状态,同State字段 | |
- | | currentOnLineState | String | 在线状态 | | + | | currentOnLineState | String | 在线状态,同State字段 | |
| first | Boolean | 是否为第一页 是:true 否:false | | | first | Boolean | 是否为第一页 是:true 否:false | | ||
| last | Boolean | 是否为最后一页 是:true 否:false | | | last | Boolean | 是否为最后一页 是:true 否:false | | ||
行 197: | 行 287: | ||
"password":"qwe12345", | "password":"qwe12345", | ||
"trueName":"321", | "trueName":"321", | ||
+ | "agentType":"All", | ||
"mobilePhone":"", | "mobilePhone":"", | ||
"agentNumber":"", | "agentNumber":"", | ||
行 208: | 行 299: | ||
<code php> | <code php> | ||
curl -X POST \ | curl -X POST \ | ||
- | http://kefu.easemob.com/api/tenants/1/agent \ | + | http://kefu.easemob.com/api/platform/tenants/1/agent \ |
-H 'Content-Type: application/json' \ | -H 'Content-Type: application/json' \ | ||
-H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | -H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
行 216: | 行 307: | ||
"password":"qwe12345", | "password":"qwe12345", | ||
"trueName":"321", | "trueName":"321", | ||
+ | "agentType":"All", | ||
"mobilePhone":"", | "mobilePhone":"", | ||
"agentNumber":"", | "agentNumber":"", | ||
行 231: | 行 323: | ||
|password| String |Y|密码| | |password| String |Y|密码| | ||
|trueName| String |Y|真实姓名| | |trueName| String |Y|真实姓名| | ||
+ | |agentType| String |N|坐席类型:All 全渠道座席,Message 在线座席,Ticket 工单座席,CallCenter 呼叫中心座席,, MVCombine 视频客服(VEC独立视频),默认为在线坐席| | ||
|mobilePhone|int|Y|电话号码| | |mobilePhone|int|Y|电话号码| | ||
|agentNumber|int|Y|工号| | |agentNumber|int|Y|工号| | ||
行 273: | 行 366: | ||
| tenantId | int | 租户ID | | | tenantId | int | 租户ID | | ||
| userId | String | 坐席ID | | | userId | String | 坐席ID | | ||
- | | userType | String | 坐席类型 | | + | | userType | String | 坐席类型:坐席/管理员 | |
| userScope | String | 所属范围 | | | userScope | String | 所属范围 | | ||
| nicename | String | 坐席的昵称 | | | nicename | String | 坐席的昵称 | | ||
行 312: | 行 405: | ||
"username":"32273591@qq.com", | "username":"32273591@qq.com", | ||
"trueName":"小环", | "trueName":"小环", | ||
+ | "agentType":"All", | ||
"mobilePhone":"", | "mobilePhone":"", | ||
"agentNumber":"", | "agentNumber":"", | ||
行 323: | 行 417: | ||
<code php> | <code php> | ||
curl -X PUT \ | curl -X PUT \ | ||
- | http://kefu.easemob.com/api/tenants/1/agent \ | + | http://kefu.easemob.com/api/platform/tenants/1/agent \ |
-H 'Content-Type: application/json' \ | -H 'Content-Type: application/json' \ | ||
-H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | -H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
行 330: | 行 424: | ||
"username":"32273591@qq.com", | "username":"32273591@qq.com", | ||
"trueName":"小环", | "trueName":"小环", | ||
+ | "agentType":"All", | ||
"mobilePhone":"", | "mobilePhone":"", | ||
"agentNumber":"", | "agentNumber":"", | ||
行 344: | 行 439: | ||
|username| String |Y|账号(邮箱)| | |username| String |Y|账号(邮箱)| | ||
|trueName| String |N|真实姓名| | |trueName| String |N|真实姓名| | ||
+ | |agentType| String |N|坐席类型:All 全渠道座席,Message 在线座席,Ticket 工单座席,CallCenter 呼叫中心座席, MVCombine 视频客服(VEC独立视频),默认为在线坐席| | ||
|mobilePhone|int|N|电话号码| | |mobilePhone|int|N|电话号码| | ||
|agentNumber|int|N|工号| | |agentNumber|int|N|工号| | ||
行 374: | 行 470: | ||
<code php> | <code php> | ||
curl --request GET \ | curl --request GET \ | ||
- | --url http://kefu.easemob.com/api/tenants/1/roles \ | + | --url http://kefu.easemob.com/api/platform/tenants/1/roles \ |
--header 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | --header 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
</code> | </code> | ||
行 463: | 行 559: | ||
<code php> | <code php> | ||
curl -X PUT \ | curl -X PUT \ | ||
- | http://kefu.easemob.com/api/tenants/1/agent/password \ | + | http://kefu.easemob.com/api/platform/tenants/1/agent/password \ |
-H 'Content-Type: application/json' \ | -H 'Content-Type: application/json' \ | ||
-H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | -H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
行 512: | 行 608: | ||
<code php> | <code php> | ||
curl -X DELETE \ | curl -X DELETE \ | ||
- | http://kefu.easemob.com/api/tenants/1/agent \ | + | http://kefu.easemob.com/api/platform/tenants/1/agent \ |
-H 'Content-Type: application/json' \ | -H 'Content-Type: application/json' \ | ||
-H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | -H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
行 558: | 行 654: | ||
<code php> | <code php> | ||
curl -X PUT \ | curl -X PUT \ | ||
- | http://kefu.easemob.com/api/tenants/1/agent/disable \ | + | http://kefu.easemob.com/api/platform/tenants/1/agent/disable \ |
-H 'Content-Type: application/json' \ | -H 'Content-Type: application/json' \ | ||
-H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | -H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
行 588: | 行 684: | ||
启用指定的坐席。处于启用状态的坐席可以登录环信客服云。 | 启用指定的坐席。处于启用状态的坐席可以登录环信客服云。 | ||
- | * Path: http://kefu.easemob.com/api/platform/tenants/{tenantId}/agent/enable | + | * Path: http://kefu.easemob.com/api/platform/platform/tenants/{tenantId}/agent/enable |
* HTTP Method: PUT | * HTTP Method: PUT | ||
* Request Headers: Content-Type=application/json和Kefu-Token=${accessToken} | * Request Headers: Content-Type=application/json和Kefu-Token=${accessToken} | ||
行 605: | 行 701: | ||
<code php> | <code php> | ||
curl -X PUT \ | curl -X PUT \ | ||
- | http://kefu.easemob.com/api/tenants/1/agent/enable \ | + | http://kefu.easemob.com/api/platform/tenants/1/agent/enable \ |
-H 'Content-Type: application/json' \ | -H 'Content-Type: application/json' \ | ||
-H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | -H 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
行 632: | 行 728: | ||
+ | |||
+ | |||
+ | ==== 修改坐席在线状态 ==== | ||
+ | |||
+ | 可修改坐席在线状态,状态列表:空闲、忙碌、离开、隐身、离线。 | ||
+ | |||
+ | * 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/platform/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 |接口响应状态| | ||
+ | |||
+ | ===== 管理技能组 ===== | ||
+ | |||
+ | ==== 获取在线技能组列表接口 ==== | ||
+ | |||
+ | **获取token** | ||
+ | |||
+ | *开放平台需要使用token进行身份验证 | ||
+ | *Kefu-Token有效期2小时,到期需重新获取。 | ||
+ | |||
+ | **登录地址** | ||
+ | |||
+ | ^名称^说明^ | ||
+ | |操作| 获取在线技能组列表的接口 | | ||
+ | |协议| HTTPS | | ||
+ | |方式| GET | | ||
+ | |URL| /api/platform/tenants/{tenantId}/skillgroups | | ||
+ | |||
+ | ^名称^说明^ | ||
+ | |操作| 获取指定技能组下坐席信息的接口| | ||
+ | |协议| HTTPS| | ||
+ | |方式| GET| | ||
+ | |URL| /api/platform/tenants/{tenantId}/skillgroups/{queueId}| | ||
+ | |||
+ | **请求参数** | ||
+ | |||
+ | 1./api/platform/tenants/{tenantId}/skillgroups | ||
+ | ^参数^是否必传^描述^参数类型^数据类型^ | ||
+ | |tenantId| 是| 租户Id| Path| integer| | ||
+ | |RequestParam|否|请求参数| Path| String| | ||
+ | |||
+ | RequestParam包括以下几个参数: | ||
+ | ^参数^是否必传^描述^参数类型^数据类型^ | ||
+ | |page| 否| 当前页,默认0| String | ||
+ | size| 否| 当前页长,默认50|String | ||
+ | |||
+ | 2./api/platform/tenants/{tenantId}/skillgroups/{queueId} | ||
+ | ^参数^是否必传^描述^参数类型^数据类型^ | ||
+ | |tenantId| 是| 租户Id| Path| integer | ||
+ | |queueId| 是| 技能组Id| Path| Long | ||
+ | |||
+ | **返回数据** | ||
+ | |||
+ | ^HTTP状态Code^含义^ | ||
+ | |200| OK| | ||
+ | |400| 参数不正确| | ||
+ | |||
+ | ^成功返回数据^含义^ | ||
+ | |Status| OK| | ||
+ | |entities| List<from>| | ||
+ | |||
+ | **Entities包含返回数据** | ||
+ | ^返回数据^含义^ | ||
+ | |tenantId| 租户Id| | ||
+ | |queueId| 技能组Id| | ||
+ | |queueName| 技能组名称| | ||
+ | |queueType| 普通队列,还是临时队列| | ||
+ | |createDateTime| 创建时间| | ||
+ | |lastUpdateDateTime| 上次修改时间| | ||
+ | |queueGroupType| 技能组是默认组还是用户自定义组| | ||
+ | |agentUsers| 坐席数据信息| | ||
+ | |||
+ | **AgentUsers数据信息** | ||
+ | ^返回数据^含义^ | ||
+ | |tenantId| 租户Id| | ||
+ | |userId| 用户Id| | ||
+ | |userType| 用户类型| | ||
+ | |userScope| 用户所属范围| | ||
+ | |nicename| 昵称| | ||
+ | |username| 用户名| | ||
+ | |roles| 坐席拥有的角色| | ||
+ | |createDateTime| 坐席创建时间| | ||
+ | |lastUpdateDateTime| 上一次修改时间| | ||
+ | |statu| 坐席是否启用| | ||
+ | |state| 坐席状态:在线,忙碌,离线等| | ||
+ | |maxServiceSessionCount| 坐席最大接待数| | ||
+ | |agentType| 坐席类型| | ||
+ | |scope| 所属范围| | ||
+ | |bizId| 所属的业务Id| | ||
+ | |onLineState| 在线状态| | ||
+ | |||
+ | **请求示例** | ||
+ | |||
+ | 请求数据格式都应该是application/json,编码形式为UTF-8 | ||
+ | |||
+ | 1.获取技能组列表数据信息请求方式 | ||
+ | /api/platform/tenants/29762/skillgroups?page=0&size=10或 | ||
+ | /api/platform/tenants/29762/skillgroups | ||
+ | |||
+ | 2.获取技能组下坐席信息请求方式 | ||
+ | /api/platform/tenants/29762/skillgroups/6160 | ||
+ | |||
+ | **成功返回示例** | ||
+ | |||
+ | 1.获取技能组列表数据信息 | ||
+ | http://localhost:8016/api/platform/tenants/29762/skillgroups?page=0&size=10 | ||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [ | ||
+ | { | ||
+ | "tenantId": 29762, | ||
+ | "queueId": 6158, | ||
+ | "queueName": "售后", | ||
+ | "queueType": "QueueNormal", | ||
+ | "priority": 0, | ||
+ | "createDateTime": 1635846909000, | ||
+ | "lastUpdateDateTime": 1635846911000, | ||
+ | "queueGroupType": "UserDefined", | ||
+ | "agentUsers": null | ||
+ | }, | ||
+ | { | ||
+ | "tenantId": 29762, | ||
+ | "queueId": 6159, | ||
+ | "queueName": "未分配", | ||
+ | "queueType": "QueueNormal", | ||
+ | "priority": 0, | ||
+ | "createDateTime": 1635846957000, | ||
+ | "lastUpdateDateTime": 1635846958000, | ||
+ | "queueGroupType": "SystemDefault", | ||
+ | "agentUsers": null | ||
+ | }, | ||
+ | { | ||
+ | "tenantId": 29762, | ||
+ | "queueId": 6160, | ||
+ | "queueName": "产品", | ||
+ | "queueType": "QueueNormal", | ||
+ | "priority": 0, | ||
+ | "createDateTime": 1635847007000, | ||
+ | "lastUpdateDateTime": 1635847008000, | ||
+ | "queueGroupType": "UserDefined", | ||
+ | "agentUsers": null | ||
+ | } | ||
+ | ], | ||
+ | "first": true, | ||
+ | "last": true, | ||
+ | "size": 10, | ||
+ | "number": 0, | ||
+ | "numberOfElements": 3, | ||
+ | "totalPages": 1, | ||
+ | "totalElements": 3 | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 2.获取技能组下坐席信息 | ||
+ | http://localhost:8016/api/platform/tenants/29762/skillgroups/6160 | ||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [ | ||
+ | { | ||
+ | "tenantId": 29762, | ||
+ | "queueId": 6160, | ||
+ | "queueName": "产品", | ||
+ | "queueType": "QueueNormal", | ||
+ | "priority": 0, | ||
+ | "createDateTime": 1635847007000, | ||
+ | "lastUpdateDateTime": 1635847008000, | ||
+ | "queueGroupType": "UserDefined", | ||
+ | "agentUsers": [ | ||
+ | { | ||
+ | "tenantId": 77278, | ||
+ | "userId": "f3d51aa9-16cb-4b18-bcf7-e9365765e02f", | ||
+ | "userType": "Agent", | ||
+ | "userScope": "Tenant", | ||
+ | "nicename": "Admin", | ||
+ | "password": "", | ||
+ | "username": "735017618@qq.com", | ||
+ | "roles": "admin,agent", | ||
+ | "createDateTime": "2016-10-13 15:51:14", | ||
+ | "lastUpdateDateTime": "2016-10-13 15:52:08", | ||
+ | "status": "Enable", | ||
+ | "state": "Online", | ||
+ | "maxServiceSessionCount": 10, | ||
+ | "trueName": "Admin", | ||
+ | "agentType": "Ticket", | ||
+ | "scope": "Tenant", | ||
+ | "bizId": "77278", | ||
+ | "onLineState": "Online", | ||
+ | "currentOnLineState": "Online" | ||
+ | }, | ||
+ | { | ||
+ | "tenantId": 29762, | ||
+ | "userId": "f3d51aa9-16cb-4b18-bcf7-e9365765e02d", | ||
+ | "userType": "Agent", | ||
+ | "userScope": "Tenant", | ||
+ | "nicename": "Admin", | ||
+ | "password": "", | ||
+ | "username": "29762@qq.com", | ||
+ | "roles": "admin,agent", | ||
+ | "createDateTime": "2021-11-03 10:52:05", | ||
+ | "lastUpdateDateTime": "2021-11-03 10:52:07", | ||
+ | "status": "Enable", | ||
+ | "state": "Online", | ||
+ | "maxServiceSessionCount": 15, | ||
+ | "agentType": "Message", | ||
+ | "scope": "Tenant", | ||
+ | "bizId": "29762", | ||
+ | "onLineState": "Online", | ||
+ | "currentOnLineState": "Online" | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ==== 添加技能组 ==== | ||
+ | |||
+ | 入参Kefu-Token和之前一样,示例中省略Kefu-Token | ||
+ | |||
+ | 请求 :POST /api/platform/tenants/{tenantId}/queues | ||
+ | |||
+ | 入参: | ||
+ | |||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | | tenantId |Integer| Y | 租户id | | ||
+ | |queueType|String | Y |云呼:CallCenter,在线:Message| | ||
+ | | name|String | Y|技能组名称 (不能超过20)| | ||
+ | |||
+ | 出参: | ||
+ | |||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |queueId|String | Y |技能组id| | ||
+ | |queueName|String | Y |技能组名称| | ||
+ | |queueGroupType|String | Y |技能组类型,在线用,UserDefined自定义 SystemDefault默认组| | ||
+ | | userCount|Integer| Y | 技能组内坐席数量| | ||
+ | |||
+ | **在线示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location 'localhost:8016/api/platform/tenants/77877/queues?queueType=Message' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data '{ | ||
+ | "name": "zaixian8" | ||
+ | }' | ||
+ | |||
+ | { | ||
+ | "status": "OK", | ||
+ | "entity": { | ||
+ | "queueId": "9", | ||
+ | "queueName": "zaixian8", | ||
+ | "queueGroupType": "UserDefined", | ||
+ | "userCount": 0 | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | **云呼示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location 'localhost:8016/api/platform/tenants/77877/queues?queueType=CallCenter' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data '{ | ||
+ | "name": "yunhu8" | ||
+ | }' | ||
+ | |||
+ | { | ||
+ | "status": "OK", | ||
+ | "entity": { | ||
+ | "queueId": "1343b9c0-9572-11ee-8fbc-f7237c60157d", | ||
+ | "queueName": "yunhu8", | ||
+ | "queueGroupType": null, | ||
+ | "userCount": 0 | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ==== 查询技能组 ==== | ||
+ | |||
+ | 入参Kefu-Token和之前一样,示例中省略Kefu-Token | ||
+ | |||
+ | GET /api/platform/tenants/{tenantId}/queues | ||
+ | |||
+ | 入参 | ||
+ | |||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |tenantId|Integer | Y|租户id| | ||
+ | |queueType|String | Y|云呼:CallCenter,在线:Message| | ||
+ | | queueName|String|N |技能组名称,非必传| | ||
+ | | page|Integer| Y|页码| | ||
+ | | size|Integer|Y |条数| | ||
+ | |||
+ | 出参 | ||
+ | |||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | | queueId|String|Y |技能组id| | ||
+ | |queueName|String |Y |技能组名称| | ||
+ | |queueGroupType|String |Y |技能组类型,在线用,UserDefined自定义 SystemDefault默认组| | ||
+ | |userCount|Integer|Y |技能组内坐席数量| | ||
+ | |||
+ | **在线示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location 'localhost:8016/api/platform/tenants/77877/queues?queueType=Message&queueName=2&page=0&size=2' | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [ | ||
+ | { | ||
+ | "queueId": "5", | ||
+ | "queueName": "在线技能组1207-1", | ||
+ | "queueGroupType": "UserDefined", | ||
+ | "userCount": 0 | ||
+ | } | ||
+ | ], | ||
+ | "first": false, | ||
+ | "last": true, | ||
+ | "size": 2, | ||
+ | "number": 1, | ||
+ | "numberOfElements": 1, | ||
+ | "totalPages": 2, | ||
+ | "totalElements": 3 | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | **云呼示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location 'localhost:8016/api/platform/tenants/77877/queues?queueType=CallCenter&queueName=yunhu&page=0&size=2' | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [ | ||
+ | { | ||
+ | "queueId": "96c24d60-94e2-11ee-a3a1-67aeafb58a22", | ||
+ | "queueName": "yunhu5", | ||
+ | "queueGroupType": null, | ||
+ | "userCount": 0 | ||
+ | }, | ||
+ | { | ||
+ | "queueId": "ba41de30-94e3-11ee-9f77-539178b4fcc1", | ||
+ | "queueName": "yunhu6", | ||
+ | "queueGroupType": null, | ||
+ | "userCount": 0 | ||
+ | } | ||
+ | ], | ||
+ | "first": true, | ||
+ | "last": false, | ||
+ | "number": 0, | ||
+ | "numberOfElements": 2, | ||
+ | "totalPages": 3, | ||
+ | "totalElements": 5 | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ==== 修改技能组 ==== | ||
+ | |||
+ | 入参Kefu-Token和之前一样,示例中省略Kefu-Token | ||
+ | |||
+ | 请求:PUT /api/platform/tenants/{tenantId}/queue/{queueId} | ||
+ | |||
+ | 入参 | ||
+ | |||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |tenantId|Integer |Y|租户id| | ||
+ | |queueType|String|Y |云呼:CallCenter,在线:Message| | ||
+ | |queueId|String | Y|技能组id| | ||
+ | |name|String | Y|技能组名称(不能超过20)| | ||
+ | |||
+ | **在线示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location --request PUT 'localhost:8016/api/platform/tenants/77877/queue/5?queueType=Message' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data '{ | ||
+ | "name":"在线2222" | ||
+ | }' | ||
+ | { | ||
+ | "status": "OK" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | **云呼示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location --request PUT 'localhost:8016/api/platform/tenants/77877/queue/96c24d60-94e2-11ee-a3a1-67aeafb58a22?queueType=CallCenter' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data '{ | ||
+ | "name":"云呼5555" | ||
+ | }' | ||
+ | { | ||
+ | "status": "OK" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ==== 删除技能组 ==== | ||
+ | |||
+ | 入参Kefu-Token和之前一样,示例中省略Kefu-Token | ||
+ | |||
+ | 请求:DELETE /api/platform/tenants/{tenantId}/queue/{queueId} | ||
+ | |||
+ | 入参 | ||
+ | |||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |tenantId|Integer | Y|租户id| | ||
+ | |queueType|String | Y|云呼:CallCenter,在线:Message| | ||
+ | |queueId|String |Y |技能组id| | ||
+ | |userId|String | Y|坐席id(是指记录操作坐席)| | ||
+ | |||
+ | **在线示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location --request DELETE 'localhost:8016/api/platform/tenants/77877/queue/9?queueType=Message&userId=5e0de11f-dfa5-43f4-acc1-38ad878d6a08' | ||
+ | { | ||
+ | "status": "OK" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | **云呼示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location --request DELETE 'localhost:8016/api/platform/tenants/77877/queue/96c24d60-94e2-11ee-a3a1-67aeafb58a22?queueType=CallCenter&userId=5e0de11f-dfa5-43f4-acc1-38ad878d6a08' | ||
+ | { | ||
+ | "status": "OK" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ==== 添加技能组成员 ==== | ||
+ | |||
+ | 入参Kefu-Token和之前一样,示例中省略Kefu-Token | ||
+ | |||
+ | 请求:POST /api/platform/tenants/{tenantId}/queue/{queueId}/agent | ||
+ | |||
+ | 入参 | ||
+ | |||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |tenantId|Integer |Y |租户id| | ||
+ | |queueType|String | Y|云呼:CallCenter,在线:Message| | ||
+ | |queueId|String |Y |技能组id| | ||
+ | | userIds|String| Y|坐席id| | ||
+ | |||
+ | **在线示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location 'localhost:8016/api/platform/tenants/77877/queue/3/agent?queueType=Message' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data '[ | ||
+ | "5e0de11f-dfa5-43f4-acc1-38ad878d6a08" | ||
+ | ]' | ||
+ | { | ||
+ | "status": "OK" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | **云呼示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location 'localhost:8016/api/platform/tenants/77877/queue/e78a3de0-94cc-11ee-b500-2ba045a0f55e/agent?queueType=CallCenter' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data '[ | ||
+ | "5e0de11f-dfa5-43f4-acc1-38ad878d6a08" | ||
+ | ]' | ||
+ | { | ||
+ | "status": "OK" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ==== 删除技能组成员 ==== | ||
+ | |||
+ | 入参Kefu-Token和之前一样,示例中省略Kefu-Token | ||
+ | |||
+ | 请求:DELETE /api/platform/tenants/{tenantId}/queue/{queueId}/agent | ||
+ | |||
+ | 入参: | ||
+ | |名称|类型|是否非空(Y:是;N:否)|说明| | ||
+ | |tenantId|Integer |Y |租户id| | ||
+ | |queueType|String | Y|云呼:CallCenter,在线:Message| | ||
+ | |queueId|String |Y|技能组id| | ||
+ | |userIds|String|Y |坐席id| | ||
+ | |||
+ | **在线示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location --request DELETE 'localhost:8016/api/platform/tenants/77877/queue/8/agent?queueType=Message' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data '[ | ||
+ | "5e0de11f-dfa5-43f4-acc1-38ad878d6a08" | ||
+ | ]' | ||
+ | { | ||
+ | "status": "OK" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | **云呼示例** | ||
+ | |||
+ | <code json> | ||
+ | |||
+ | curl --location --request DELETE 'localhost:8016/api/platform/tenants/77877/queue/1343b9c0-9572-11ee-8fbc-f7237c60157d/agent?queueType=CallCenter' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data '[ | ||
+ | "5e0de11f-dfa5-43f4-acc1-38ad878d6a08" | ||
+ | ]' | ||
+ | { | ||
+ | "status": "OK" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ==== 查询技能组成员 ==== | ||
+ | |||
+ | 入参Kefu-Token和之前一样,示例中省略Kefu-Token | ||
+ | |||
+ | 请求:GET /api/platform/tenants/{tenantId}/queue/{queueId}/agent | ||
+ | |||
+ | 入参 | ||
+ | |名称|类型|是否非空(Y:是;N:否)|说明| | ||
+ | |tenantId|Integer |Y |租户id| | ||
+ | |queueType|String | Y |云呼:CallCenter,在线:Message| | ||
+ | |queueId|String |Y |技能组id| | ||
+ | |page|Integer |Y |页码| | ||
+ | | size|Integer|Y |条数| | ||
+ | |||
+ | 出参 | ||
+ | |名称|类型|是否非空(Y:是;N:否)|说明| | ||
+ | |agentUser|Agentuser | Y|坐席信息| | ||
+ | | level|String| Y|等级值,云呼技能组用| | ||
+ | |||
+ | **在线示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location 'localhost:8016/api/platform/tenants/77877/queue/8/agent?queueType=Message' | ||
+ | |||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [ | ||
+ | { | ||
+ | "agentUser": { | ||
+ | "tenantId": 77877, | ||
+ | "userId": "5e0de11f-dfa5-43f4-acc1-38ad878d6a08", | ||
+ | "userType": "Agent", | ||
+ | "userScope": "Tenant", | ||
+ | "nicename": "123", | ||
+ | "password": "", | ||
+ | "username": "qu120711", | ||
+ | "roles": "admin,agent", | ||
+ | "createDateTime": "2023-12-07 14:39:32", | ||
+ | "lastUpdateDateTime": "2023-12-07 14:39:32", | ||
+ | "status": "Enable", | ||
+ | "state": "Offline", | ||
+ | "maxServiceSessionCount": 10, | ||
+ | "trueName": "321", | ||
+ | "mobilePhone": "", | ||
+ | "agentNumber": 120711, | ||
+ | "agentType": "All", | ||
+ | "scope": "Tenant", | ||
+ | "bizId": "77877", | ||
+ | "currentOnLineState": "Offline", | ||
+ | "onLineState": "Offline" | ||
+ | }, | ||
+ | "level": null | ||
+ | } | ||
+ | ], | ||
+ | "first": true, | ||
+ | "last": true, | ||
+ | "size": 10, | ||
+ | "number": 0, | ||
+ | "numberOfElements": 1, | ||
+ | "totalPages": 1, | ||
+ | "totalElements": 1 | ||
+ | } | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [], | ||
+ | "first": true, | ||
+ | "last": true, | ||
+ | "size": 10, | ||
+ | "number": 0, | ||
+ | "numberOfElements": 0, | ||
+ | "totalPages": 0, | ||
+ | "totalElements": 0 | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | **云呼示例** | ||
+ | |||
+ | <code json> | ||
+ | curl --location 'localhost:8016/api/platform/tenants/77877/queue/1343b9c0-9572-11ee-8fbc-f7237c60157d/agent?queueType=CallCenter' | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [ | ||
+ | { | ||
+ | "agentUser": { | ||
+ | "tenantId": 77877, | ||
+ | "userId": "5e0de11f-dfa5-43f4-acc1-38ad878d6a08", | ||
+ | "userType": "Agent", | ||
+ | "userScope": "Tenant", | ||
+ | "nicename": "123", | ||
+ | "password": "", | ||
+ | "username": "qu120711", | ||
+ | "roles": "admin,agent", | ||
+ | "createDateTime": "2023-12-07 14:39:32", | ||
+ | "lastUpdateDateTime": "2023-12-07 14:39:32", | ||
+ | "status": "Enable", | ||
+ | "state": "Offline", | ||
+ | "maxServiceSessionCount": 10, | ||
+ | "trueName": "321", | ||
+ | "mobilePhone": "", | ||
+ | "agentNumber": 120711, | ||
+ | "agentType": "All", | ||
+ | "scope": "Tenant", | ||
+ | "bizId": "77877", | ||
+ | "currentOnLineState": "Offline", | ||
+ | "onLineState": "Offline" | ||
+ | }, | ||
+ | "level": "5" | ||
+ | } | ||
+ | ], | ||
+ | "first": true, | ||
+ | "last": true, | ||
+ | "number": 0, | ||
+ | "numberOfElements": 1, | ||
+ | "totalPages": 1, | ||
+ | "totalElements": 1 | ||
+ | } | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [], | ||
+ | "first": true, | ||
+ | "last": true, | ||
+ | "number": 0, | ||
+ | "numberOfElements": 0, | ||
+ | "totalPages": 0, | ||
+ | "totalElements": 0 | ||
+ | } | ||
+ | </code> | ||
+ | ===== 批量查询客户信息接口 ===== | ||
+ | |||
+ | **Request body::** | ||
+ | |||
+ | <code json> | ||
+ | |||
+ | { | ||
+ | "page": 0, | ||
+ | "size": 9, | ||
+ | "conditions": [ | ||
+ | { | ||
+ | "field_name": "createDateTime", | ||
+ | "value": "time1,time2", | ||
+ | "operation": "RANGE" | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | |page | int | 页数 | | ||
+ | |size | int | 每页条数| | ||
+ | |conditions| | 查询条件| | ||
+ | |field_name| |查询字段名称,访客创建时间,固定无需修改| | ||
+ | |value String tim1||开始时间戳,time2结束时间戳| | ||
+ | |operation ||操作类型,排序,固定无需修改| | ||
+ | |||
+ | **Curl示例:** | ||
+ | |||
+ | <code php> | ||
+ | curl --location 'http://kefu.easemob.com/api/platform/tenants/29676/customer/search' \ | ||
+ | --header 'Kefu-Token: 739170a565e79d97e6fd25d0aa522d4f' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data '{ | ||
+ | "page": 0, | ||
+ | "size": 9, | ||
+ | "conditions": [ | ||
+ | { | ||
+ | "field_name": "createDateTime", | ||
+ | "value": "1677340800000,1677945599000", | ||
+ | "operation": "RANGE" | ||
+ | } | ||
+ | ] | ||
+ | }' | ||
+ | </code> | ||
+ | |||
+ | <code php> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entity": { | ||
+ | "content": [ | ||
+ | { | ||
+ | "customer_id": "3ece3c0f-0c98-40b2-bf66-b7f6d0a5ed14", | ||
+ | "bind_visitors": [ | ||
+ | "52dbf2dd-0129-403a-af4f-253f2a0ab27a" | ||
+ | ], | ||
+ | "created_at": 1677726847333, | ||
+ | "updated_at": 1680159446359, | ||
+ | "visitor_id": "52dbf2dd-0129-403a-af4f-253f2a0ab27a", | ||
+ | "vip": null, | ||
+ | "type": null, | ||
+ | "level": null, | ||
+ | "email": [ | ||
+ | "1@1.com" | ||
+ | ], | ||
+ | "nickname": "12", | ||
+ | "phone": [ | ||
+ | "15011111111" | ||
+ | ], | ||
+ | "username": [ | ||
+ | "1@1.com" | ||
+ | ] | ||
+ | } | ||
+ | ], | ||
+ | "totalElements": 3, | ||
+ | "last": false, | ||
+ | "totalPages": 3, | ||
+ | "sort": null, | ||
+ | "first": true, | ||
+ | "numberOfElements": 1, | ||
+ | "size": 1, | ||
+ | "number": 0 | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | |customer_id |String |crm客户id| | ||
+ | |bind_visitors| List |绑定的访客visitor_id| | ||
+ | |visitor_id |string | 访客visitor_id| | ||
+ | |vip |boolean| 是否vip,敦煌定制| | ||
+ | |type |String| 访客类型,敦煌定制| | ||
+ | |level |String |访客级别,敦煌定制| | ||
+ | |email| list| 访客邮箱,为空则不返回| | ||
+ | |nickname |list| 访客邮箱,为空则不返回| | ||
+ | |username |list| 访客ID,为空则不返回| | ||
===== 查询历史会话 ===== | ===== 查询历史会话 ===== | ||
行 647: | 行 1515: | ||
<code php> | <code php> | ||
curl --request GET \ | curl --request GET \ | ||
- | --url 'http://kefu.easemob.com/api/tenants/1/serviceSessionHistorys?page=1&per_page=1&state=Terminal%2CAbort& | + | --url 'http://kefu.easemob.com/api/platform/tenants/1/serviceSessionHistorys?stopDateFrom=2021-05-10T00%3A00%3A00.000Z&stopDateTo=2021-05-20T23%3A59%3A00.000Z' \ |
- | isAgent=false&originType=&techChannelId=&techChannelType=&customerName=&agentIds=& | + | |
- | enquiryTagIds=&orderType=&summaryIds=&enquirySummary= | + | |
- | &sortOrder=desc&transfered=&queueIds=&stopDateFrom=2018-04-16T00%3A00%3A00.000Z | + | |
- | &stopDateTo=2018-04-20T23%3A59%3A00.000Z&sortField=stopDateTime | + | |
- | &fromAgentCallback=&queueId=0&agentUserId=425b496b-d96d-4931-be1c-f095ecdc09ef' \ | + | |
--header 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | --header 'Kefu-Token: a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
</code> | </code> | ||
行 661: | 行 1524: | ||
|tenantId|int|Y|租户ID| | |tenantId|int|Y|租户ID| | ||
|page|int|N|查询页码索引,默认为1| | |page|int|N|查询页码索引,默认为1| | ||
- | |per_page|int|N|每页显示的数据容量,默认并且最大为50| | + | |per_page|int|N|每页显示的数据容量,默认为10,最大为50| |
|originType| String |N|渠道 不写为查询全部 要查询的话值为 网页:webim,APP:app,微信渠道weixin,微博为weibo,呼叫中心:phone| | |originType| String |N|渠道 不写为查询全部 要查询的话值为 网页:webim,APP:app,微信渠道weixin,微博为weibo,呼叫中心:phone| | ||
|customerName| String |N|客户昵称| | |customerName| String |N|客户昵称| | ||
行 667: | 行 1530: | ||
|fromAgentCallback|boolean|N|会话类型 回呼:true 呼入:false| | |fromAgentCallback|boolean|N|会话类型 回呼:true 呼入:false| | ||
|enquirySummary|int|N|评价 值为:0,1,2,3,4,5不填默认查询全部评价| | |enquirySummary|int|N|评价 值为:0,1,2,3,4,5不填默认查询全部评价| | ||
+ | |enquiryDegree|int|N|"3 (一般)" 满意度评价(用于数字评价)| | ||
+ | |resolutionScore|int|N| "1" 解决率评价分数 1 已解决 2 未解决(用于数字评价)| | ||
+ | |resolutionScore2|int|N| "1" 解决率评价分数 1 已解决 2 未解决(用于数字评价)| | ||
+ | |consultResult|int|N| "1" 咨询结果: 有效会话 - 1 ; 无效会话 = 0| | ||
|queueIds|int|N|多个技能组ID数组| | |queueIds|int|N|多个技能组ID数组| | ||
|beginDate| String |N|会话接起时间(开始范围条件),时间格式 2018-06-16T23%3A59%3A59.000Z| | |beginDate| String |N|会话接起时间(开始范围条件),时间格式 2018-06-16T23%3A59%3A59.000Z| | ||
行 675: | 行 1542: | ||
|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| | ||
行 684: | 行 1552: | ||
"status": "OK", | "status": "OK", | ||
"entity": { | "entity": { | ||
- | "total_entries": 10178, | + | "total_entries": 3, |
"items": [ | "items": [ | ||
{ | { | ||
- | "serviceSessionId": "29b04e8e-4e79-4eeb-a24a-bad04b9669d4", | + | "serviceSessionId": "45bd1110-69a3-49d0-b9e2-55e9399e3633", |
- | "tenantId": 1, | + | "tenantId": 29676, |
- | "techChannelId": 1, | + | "techChannelId": 1434, |
- | "queueId": null, | + | "queueId": 161557, |
- | "state": "Abort", | + | "state": "Terminal", |
- | "chatGroupId": 1493629159358939434, | + | "chatGroupId": 4611895, |
- | "messageSeqId": 1, | + | "messageSeqId": 4, |
- | "agentUserId": null, | + | "agentUserId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", |
- | "agentUserNiceName": null, | + | "agentUserNiceName": "Admin昵称1", |
- | "agentUserTrueName": null, | + | |
"agentUserType": 1, | "agentUserType": 1, | ||
- | "createDatetime": "2018-04-19 15:00:59", | + | "createDatetime": "2021-05-10 18:46:44", |
- | "startDateTime": null, | + | "startDateTime": "2021-05-10 18:46:48", |
- | "agentLastMessageDate": null, | + | "stopDateTime": "2021-05-10 18:56:59", |
- | "stopDateTime": "2018-04-19 15:00:59", | + | "techChannelType": "wechat", |
- | "techChannelType": "easemob", | + | "enquirySummary": "4", |
- | "summarys": [ | + | "enquiryDegree": "4 (满意)", |
- | [ | + | "resolutionScore": "0", |
- | { | + | "resolutionScore2": "0", |
- | "id": 123, | + | "consultResult": "0", |
- | "name": "test summary name", | + | "evaluateWay": "agent", |
- | "color": 1, | + | "invited": true, |
- | "parentId": 0 | + | "techChannelName": "环信本地测试", |
- | } | + | "originType": [ |
- | ] | + | "weixin" |
], | ], | ||
- | "enquirySummary": "1", | + | "comment": "不活跃会话超时结束备注", |
- | "enquiryDetail": "enquiry detail", | + | "visitorUser": { |
- | "techChannelName": "优信测试", | + | "userId": "479032e4-1d94-4f65-a59b-43515b67d7dc", |
+ | "nicename": "环信本地测试:o6B_c4p_OKwcGLWqoFCXcXqKExS4", | ||
+ | "username": "o6B_c4p_OKwcGLWqoFCXcXqKExS4" | ||
+ | }, | ||
+ | "customer": { | ||
+ | "customerId": "c7e44d7d-8378-44b3-8b30-d4b46d97b62d", | ||
+ | "customerNiceName": "环信本地测试:o6B_c4p_OKwcGLWqoFCXcXqKExS4", | ||
+ | "customerTrueName": null | ||
+ | }, | ||
+ | "fromAgentCallback": false, | ||
+ | "transfered": false, | ||
+ | "agentUserSet": [ | ||
+ | { | ||
+ | "userId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "username": "15010965776@163.com", | ||
+ | "nicename": "Admin昵称1", | ||
+ | "trueName": "Admin姓名", | ||
+ | "tenantId": "29676" | ||
+ | } | ||
+ | ], | ||
+ | "agentUserList": [ | ||
+ | { | ||
+ | "userId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "username": "15010965776@163.com", | ||
+ | "nicename": "Admin昵称1", | ||
+ | "trueName": "Admin姓名", | ||
+ | "tenantId": "29676" | ||
+ | } | ||
+ | ], | ||
+ | "agentQueueSet": [ | ||
+ | { | ||
+ | "queueId": "161557", | ||
+ | "queueName": "未分组", | ||
+ | "queueType": "QueueNormal", | ||
+ | "tenantId": 29676 | ||
+ | } | ||
+ | ], | ||
+ | "agentQueueList": [ | ||
+ | { | ||
+ | "queueId": "161557", | ||
+ | "queueName": "未分组", | ||
+ | "queueType": "QueueNormal", | ||
+ | "tenantId": 29676 | ||
+ | } | ||
+ | ], | ||
+ | "serviceSessionAttribute": {} | ||
+ | }, | ||
+ | { | ||
+ | "serviceSessionId": "e4bd2cb2-d95d-4db6-85c7-5bf83b559d58", | ||
+ | "tenantId": 29676, | ||
+ | "techChannelId": 1434, | ||
+ | "queueId": 161557, | ||
+ | "state": "Terminal", | ||
+ | "chatGroupId": 4611895, | ||
+ | "messageSeqId": 5, | ||
+ | "agentUserId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "agentUserNiceName": "Admin昵称1", | ||
+ | "agentUserType": 1, | ||
+ | "createDatetime": "2021-05-10 18:19:53", | ||
+ | "startDateTime": "2021-05-10 18:20:08", | ||
+ | "agentLastMessageDate": "2021-05-10 18:20:12", | ||
+ | "stopDateTime": "2021-05-10 18:24:29", | ||
+ | "techChannelType": "wechat", | ||
+ | "enquirySummary": "5", | ||
+ | "enquiryDegree": "5 (非常满意,好)", | ||
+ | "resolutionScore": "0", | ||
+ | "resolutionScore2": "0", | ||
+ | "consultResult": "1", | ||
+ | "evaluateWay": "agent", | ||
+ | "invited": true, | ||
+ | "techChannelName": "环信本地测试", | ||
"originType": [ | "originType": [ | ||
- | "webim" | + | "weixin" |
], | ], | ||
- | "comment": "comment", | ||
"visitorUser": { | "visitorUser": { | ||
- | "userId": "e11668c4-8821-4da0-bd42-ca067e338b1d", | + | "userId": "479032e4-1d94-4f65-a59b-43515b67d7dc", |
- | "nicename": "customerNiceName", | + | "nicename": "环信本地测试:o6B_c4p_OKwcGLWqoFCXcXqKExS4", |
- | "username": "visitor_username" | + | "username": "o6B_c4p_OKwcGLWqoFCXcXqKExS4" |
}, | }, | ||
"customer": { | "customer": { | ||
- | "customerId": "a56a735c-a8ea-4043-b161-5235587b85e6", | + | "customerId": "c7e44d7d-8378-44b3-8b30-d4b46d97b62d", |
- | "customerNiceName": "customerNiceName", | + | "customerNiceName": "环信本地测试:o6B_c4p_OKwcGLWqoFCXcXqKExS4", |
"customerTrueName": null | "customerTrueName": null | ||
}, | }, | ||
- | "messageDetail": null, | ||
- | "recordFileUrl": null, | ||
"fromAgentCallback": false, | "fromAgentCallback": false, | ||
"transfered": false, | "transfered": false, | ||
- | "visitorUserTags": null, | + | "enquiryTags": [ |
- | "enquiryTags": null, | + | { |
- | "chatMessages": null, | + | "appraiseTagId": 4784, |
- | "lastChatMessage": null, | + | "name": "未解决" |
+ | } | ||
+ | ], | ||
"agentUserSet": [ | "agentUserSet": [ | ||
{ | { | ||
- | "userId": "425b496b-d96d-4931-be1c-f095ecdc09ef", | + | "userId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", |
- | "username": null, | + | "username": "15010965776@163.com", |
- | "nicename": "testAgentNicename", | + | "nicename": "Admin昵称1", |
- | "trueName": "testAgentTrueName", | + | "trueName": "Admin姓名", |
- | "tenantId": "1" | + | "tenantId": "29676" |
} | } | ||
], | ], | ||
- | "agentQueueSet": null, | + | "agentUserList": [ |
- | "enquiryTagNames": null, | + | { |
- | "summarysDetail": "test summary name" | + | "userId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", |
+ | "username": "15010965776@163.com", | ||
+ | "nicename": "Admin昵称1", | ||
+ | "trueName": "Admin姓名", | ||
+ | "tenantId": "29676" | ||
+ | } | ||
+ | ], | ||
+ | "agentQueueSet": [ | ||
+ | { | ||
+ | "queueId": "161557", | ||
+ | "queueName": "未分组", | ||
+ | "queueType": "QueueNormal", | ||
+ | "tenantId": 29676 | ||
+ | } | ||
+ | ], | ||
+ | "agentQueueList": [ | ||
+ | { | ||
+ | "queueId": "161557", | ||
+ | "queueName": "未分组", | ||
+ | "queueType": "QueueNormal", | ||
+ | "tenantId": 29676 | ||
+ | } | ||
+ | ], | ||
+ | "serviceSessionEventHistoryList": [ | ||
+ | { | ||
+ | "eventId": "82c0ab6d-0291-4376-b838-c7cb177c8e1f", | ||
+ | "serviceSessionId": "e4bd2cb2-d95d-4db6-85c7-5bf83b559d58", | ||
+ | "tenantId": 29676, | ||
+ | "actorId": null, | ||
+ | "actorName": null, | ||
+ | "fromId": null, | ||
+ | "fromName": null, | ||
+ | "actorTrueName": null, | ||
+ | "fromState": null, | ||
+ | "toId": null, | ||
+ | "toName": null, | ||
+ | "toState": null, | ||
+ | "type": "Created", | ||
+ | "serviceSessionExt": "{\"fromAgentCallback\":false,\"sessionCreateType\":\"fromRoutingPolicy\",\"routingToRobot\":false,\"queueName\":\"未分组\"}", | ||
+ | "createDateTime": "2021-05-10 18:19:53", | ||
+ | "timeStamp": null | ||
+ | }, | ||
+ | { | ||
+ | "eventId": "0e2dedcb-8f2b-400e-b1f2-8f489f041bdb", | ||
+ | "serviceSessionId": "e4bd2cb2-d95d-4db6-85c7-5bf83b559d58", | ||
+ | "tenantId": 29676, | ||
+ | "actorId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "actorName": "Admin昵称1", | ||
+ | "fromId": null, | ||
+ | "fromName": null, | ||
+ | "actorTrueName": "Admin姓名", | ||
+ | "fromState": null, | ||
+ | "toId": null, | ||
+ | "toName": null, | ||
+ | "toState": null, | ||
+ | "type": "Opened", | ||
+ | "serviceSessionExt": null, | ||
+ | "createDateTime": "2021-05-10 18:20:08", | ||
+ | "timeStamp": null | ||
+ | }, | ||
+ | { | ||
+ | "eventId": "e6e3c589-d6b4-498a-9dd0-caf5104fc47a", | ||
+ | "serviceSessionId": "e4bd2cb2-d95d-4db6-85c7-5bf83b559d58", | ||
+ | "tenantId": 29676, | ||
+ | "actorId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "actorName": "Admin昵称1", | ||
+ | "fromId": null, | ||
+ | "fromName": null, | ||
+ | "actorTrueName": "Admin姓名", | ||
+ | "fromState": null, | ||
+ | "toId": null, | ||
+ | "toName": null, | ||
+ | "toState": null, | ||
+ | "type": "FirstReplyTime", | ||
+ | "serviceSessionExt": null, | ||
+ | "createDateTime": "2021-05-10 18:20:11", | ||
+ | "timeStamp": null | ||
+ | }, | ||
+ | { | ||
+ | "eventId": "836e7ff4-921f-4a79-b494-d5ffeeeb869e", | ||
+ | "serviceSessionId": "e4bd2cb2-d95d-4db6-85c7-5bf83b559d58", | ||
+ | "tenantId": 29676, | ||
+ | "actorId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "actorName": "Admin昵称1", | ||
+ | "fromId": null, | ||
+ | "fromName": null, | ||
+ | "actorTrueName": "Admin姓名", | ||
+ | "fromState": null, | ||
+ | "toId": null, | ||
+ | "toName": null, | ||
+ | "toState": null, | ||
+ | "type": "Closed", | ||
+ | "serviceSessionExt": null, | ||
+ | "createDateTime": "2021-05-10 18:24:29", | ||
+ | "timeStamp": null | ||
+ | } | ||
+ | ], | ||
+ | "enquiryTagNames": "未解决", | ||
+ | "serviceSessionAttribute": {} | ||
+ | }, | ||
+ | { | ||
+ | "serviceSessionId": "55e34279-8a1c-4863-aa66-896fdd80b2ee", | ||
+ | "tenantId": 29676, | ||
+ | "techChannelId": 23293, | ||
+ | "queueId": 161557, | ||
+ | "state": "Terminal", | ||
+ | "chatGroupId": 4611717, | ||
+ | "messageSeqId": 15, | ||
+ | "agentUserId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "agentUserNiceName": "Admin昵称1", | ||
+ | "agentUserType": 1, | ||
+ | "createDatetime": "2021-05-10 11:17:16", | ||
+ | "startDateTime": "2021-05-10 11:17:26", | ||
+ | "agentLastMessageDate": "2021-05-10 11:20:03", | ||
+ | "stopDateTime": "2021-05-10 11:20:09", | ||
+ | "techChannelType": "easemob", | ||
+ | "enquirySummary": "0", | ||
+ | "enquiryDegree": "0", | ||
+ | "resolutionScore": "0", | ||
+ | "resolutionScore2": "0", | ||
+ | "consultResult": "1", | ||
+ | "invited": false, | ||
+ | "visitorLeaveTime": "2021-05-10 11:20:18", | ||
+ | "techChannelName": "体验关联", | ||
+ | "originType": [ | ||
+ | "webim" | ||
+ | ], | ||
+ | "visitorUser": { | ||
+ | "userId": "49440425-ac26-45df-9bf1-11bf39ca74af", | ||
+ | "nicename": "webim-visitor-CKFR3YEGFB2Q672V8W4P", | ||
+ | "username": "webim-visitor-CKFR3YEGFB2Q672V8W4P" | ||
+ | }, | ||
+ | "customer": { | ||
+ | "customerId": "5d513e47-0628-4c25-85f3-76627b26ceea", | ||
+ | "customerNiceName": "webim-visitor-CKFR3YEGFB2Q672V8W4P", | ||
+ | "customerTrueName": null | ||
+ | }, | ||
+ | "fromAgentCallback": false, | ||
+ | "transfered": true, | ||
+ | "agentUserSet": [ | ||
+ | { | ||
+ | "userId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "username": "15010965776@163.com", | ||
+ | "nicename": "Admin昵称1", | ||
+ | "trueName": "Admin姓名", | ||
+ | "tenantId": "29676" | ||
+ | }, | ||
+ | { | ||
+ | "userId": "18c8af0f-5891-4a36-ad49-90fb612d3b8b", | ||
+ | "username": "qu1@1.com", | ||
+ | "nicename": "qu1@1.com昵称", | ||
+ | "trueName": "qu1@1.com姓名", | ||
+ | "tenantId": "29676" | ||
+ | } | ||
+ | ], | ||
+ | "agentUserList": [ | ||
+ | { | ||
+ | "userId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "username": "15010965776@163.com", | ||
+ | "nicename": "Admin昵称1", | ||
+ | "trueName": "Admin姓名", | ||
+ | "tenantId": "29676" | ||
+ | }, | ||
+ | { | ||
+ | "userId": "18c8af0f-5891-4a36-ad49-90fb612d3b8b", | ||
+ | "username": "qu1@1.com", | ||
+ | "nicename": "qu1@1.com昵称", | ||
+ | "trueName": "qu1@1.com姓名", | ||
+ | "tenantId": "29676" | ||
+ | }, | ||
+ | { | ||
+ | "userId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "username": "15010965776@163.com", | ||
+ | "nicename": "Admin昵称1", | ||
+ | "trueName": "Admin姓名", | ||
+ | "tenantId": "29676" | ||
+ | } | ||
+ | ], | ||
+ | "agentQueueSet": [ | ||
+ | { | ||
+ | "queueId": "164924", | ||
+ | "queueName": "第一技能组", | ||
+ | "queueType": "QueueNormal", | ||
+ | "tenantId": 29676 | ||
+ | } | ||
+ | ], | ||
+ | "agentQueueList": [ | ||
+ | { | ||
+ | "queueId": "164924", | ||
+ | "queueName": "第一技能组", | ||
+ | "queueType": "QueueNormal", | ||
+ | "tenantId": 29676 | ||
+ | } | ||
+ | ], | ||
+ | "serviceSessionEventHistoryList": [ | ||
+ | { | ||
+ | "eventId": "06fed1c4-fbe2-4ac8-87d6-2d07c340db13", | ||
+ | "serviceSessionId": "55e34279-8a1c-4863-aa66-896fdd80b2ee", | ||
+ | "tenantId": 29676, | ||
+ | "actorId": null, | ||
+ | "actorName": null, | ||
+ | "fromId": null, | ||
+ | "fromName": null, | ||
+ | "actorTrueName": null, | ||
+ | "fromState": null, | ||
+ | "toId": null, | ||
+ | "toName": null, | ||
+ | "toState": null, | ||
+ | "type": "Created", | ||
+ | "serviceSessionExt": "{\"fromAgentCallback\":false,\"routingPolicyType\":\"Channel\",\"sessionCreateType\":\"fromRoutingPolicy\",\"routingToRobot\":false,\"queueName\":\"第一技能组\"}", | ||
+ | "createDateTime": "2021-05-10 11:17:16", | ||
+ | "timeStamp": null | ||
+ | }, | ||
+ | { | ||
+ | "eventId": "d34d7ddf-b1e9-4630-a9bb-5b34eae38e17", | ||
+ | "serviceSessionId": "55e34279-8a1c-4863-aa66-896fdd80b2ee", | ||
+ | "tenantId": 29676, | ||
+ | "actorId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "actorName": "Admin昵称1", | ||
+ | "fromId": null, | ||
+ | "fromName": null, | ||
+ | "actorTrueName": "Admin姓名", | ||
+ | "fromState": null, | ||
+ | "toId": null, | ||
+ | "toName": null, | ||
+ | "toState": null, | ||
+ | "type": "Opened", | ||
+ | "serviceSessionExt": null, | ||
+ | "createDateTime": "2021-05-10 11:17:26", | ||
+ | "timeStamp": null | ||
+ | }, | ||
+ | { | ||
+ | "eventId": "55c7cabe-9ef9-4572-923f-69c48788866f", | ||
+ | "serviceSessionId": "55e34279-8a1c-4863-aa66-896fdd80b2ee", | ||
+ | "tenantId": 29676, | ||
+ | "actorId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "actorName": "Admin昵称1", | ||
+ | "fromId": null, | ||
+ | "fromName": null, | ||
+ | "actorTrueName": "Admin姓名", | ||
+ | "fromState": null, | ||
+ | "toId": null, | ||
+ | "toName": null, | ||
+ | "toState": null, | ||
+ | "type": "FirstReplyTime", | ||
+ | "serviceSessionExt": null, | ||
+ | "createDateTime": "2021-05-10 11:17:27", | ||
+ | "timeStamp": null | ||
+ | }, | ||
+ | { | ||
+ | "eventId": "eb7ab5ba-64a9-4aad-a516-16e2d6acbfa1", | ||
+ | "serviceSessionId": "55e34279-8a1c-4863-aa66-896fdd80b2ee", | ||
+ | "tenantId": 29676, | ||
+ | "actorId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "actorName": "Admin昵称1", | ||
+ | "fromId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "fromName": "Admin姓名", | ||
+ | "actorTrueName": "Admin姓名", | ||
+ | "fromState": "Processing", | ||
+ | "toId": "18c8af0f-5891-4a36-ad49-90fb612d3b8b", | ||
+ | "toName": "qu1@1.com姓名", | ||
+ | "toState": "Processing", | ||
+ | "type": "TransferAA", | ||
+ | "serviceSessionExt": null, | ||
+ | "createDateTime": "2021-05-10 11:17:45", | ||
+ | "timeStamp": null | ||
+ | }, | ||
+ | { | ||
+ | "eventId": "fb8478a5-2506-4759-b70b-2cfd2fe4a105", | ||
+ | "serviceSessionId": "55e34279-8a1c-4863-aa66-896fdd80b2ee", | ||
+ | "tenantId": 29676, | ||
+ | "actorId": "18c8af0f-5891-4a36-ad49-90fb612d3b8b", | ||
+ | "actorName": "qu1@1.com昵称", | ||
+ | "fromId": "18c8af0f-5891-4a36-ad49-90fb612d3b8b", | ||
+ | "fromName": "qu1@1.com姓名", | ||
+ | "actorTrueName": "qu1@1.com姓名", | ||
+ | "fromState": "Processing", | ||
+ | "toId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "toName": "Admin姓名", | ||
+ | "toState": "Processing", | ||
+ | "type": "TransferAA", | ||
+ | "serviceSessionExt": null, | ||
+ | "createDateTime": "2021-05-10 11:19:29", | ||
+ | "timeStamp": null | ||
+ | }, | ||
+ | { | ||
+ | "eventId": "6d1f1823-ca5d-48bc-8c04-42abd02fa0ea", | ||
+ | "serviceSessionId": "55e34279-8a1c-4863-aa66-896fdd80b2ee", | ||
+ | "tenantId": 29676, | ||
+ | "actorId": "5dade28d-77e8-43a4-84e8-1eefa0c63748", | ||
+ | "actorName": "Admin昵称1", | ||
+ | "fromId": null, | ||
+ | "fromName": null, | ||
+ | "actorTrueName": "Admin姓名", | ||
+ | "fromState": null, | ||
+ | "toId": null, | ||
+ | "toName": null, | ||
+ | "toState": null, | ||
+ | "type": "Closed", | ||
+ | "serviceSessionExt": null, | ||
+ | "createDateTime": "2021-05-10 11:20:09", | ||
+ | "timeStamp": null | ||
+ | } | ||
+ | ], | ||
+ | "serviceSessionAttribute": { | ||
+ | "referer": "https://029676.sandbox.kefu.easemob.com/mo/admin/webapp/channels/web", | ||
+ | "searchType": "直接访问", | ||
+ | "ip": "211.157.146.18", | ||
+ | "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36", | ||
+ | "region": "中国,北京,北京" | ||
+ | } | ||
} | } | ||
] | ] | ||
行 764: | 行 2010: | ||
| techChannelId | int | 关联ID | | | techChannelId | int | 关联ID | | ||
| queueId | int | 技能组ID | | | queueId | int | 技能组ID | | ||
- | | state | String | 会话状态 | | + | | state | String | 会话状态 ,会话状态包含的是Wait(排队中)、Processing(进行中)、Terminal(已关闭)| |
| chatGroupId | int | 访客的群组ID | | | chatGroupId | int | 访客的群组ID | | ||
| messageSeqId | int | 最大消息序列自增标记 | | | messageSeqId | int | 最大消息序列自增标记 | | ||
行 807: | 行 2053: | ||
| enquiryTagNames | String | 满意度评价标签的名字 | | | enquiryTagNames | String | 满意度评价标签的名字 | | ||
| summarysDetail | String | 会话小结文本内容 | | | summarysDetail | String | 会话小结文本内容 | | ||
+ | |||| | ||
+ | |serviceSessionEventHistoryList||会话流转事件| | ||
+ | | eventId | String | 事件Id | | ||
+ | | serviceSessionId | String | 会话Id | | ||
+ | | tenantId | String | 租户Id | | ||
+ | | actorId | String | 操作人Id | | ||
+ | | actorName | String | 操作人昵称 | | ||
+ | | fromId | String | 转接自(操作人Id) | | ||
+ | | fromName | String | 转接自(操作人昵称)| | ||
+ | | actorTrueName | String | 操作人姓名| | ||
+ | | fromState | String | 操作前状态 | | ||
+ | | toId | String | 转接用户Id | | ||
+ | | toName | String | 转接用户姓名 | | ||
+ | | toState | String | 操作后状态| | ||
+ | | type | String | 事件类型:Created-创建,Opened-接起,FirstReplyTime-首次响应,Transfer转接(AA-坐席转坐席,AQ-坐席转技能组,QA-技能组转坐席,QQ-技能组转技能组,RA-机器人转坐席,RQ-机器人转技能组),Closed-关闭,Aborted-待接入会话关闭| | ||
+ | |||| | ||
+ | | serviceSessionExt | | 会话相关事件的详细信息 | | ||
+ | | fromAgentCallback | boolean | 用于记录会话创建事件,会话是否是回呼 | | ||
+ | | assignedAgent | String | 用于记录会话创建事件,记录会话是否指定坐席(指定:坐席的username, 未指定:null) | | ||
+ | | routingPolicyType | String | 用于记录会话创建事件,会话路由信息(UserSpecifiedChannel:入口指定,ChannelData:关联指定,Channel:渠道指定, OfficialAccount:服务号指定,SpecialIdentity:特殊身份指定,Default:默认指定) | | ||
+ | | sessionCreateType | String | 会话创建的方式( "fromAgentCallback", "fromAassignedAgent", "fromRoutingPolicy") | | ||
+ | | routingToRobot | boolean | 是否路由到机器人 | | ||
+ | | queueName | String | 路由到技能组的名称 | | ||
+ | | createDateTime | String | 事件时间 | | ||
+ | | timeStamp | 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: | 行 2103: | ||
<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> | ||
行 829: | 行 2111: | ||
|Kefu-Token| String |Y|调用接口的accessToken| | |Kefu-Token| String |Y|调用接口的accessToken| | ||
|tenantId|int|Y|租户ID| | |tenantId|int|Y|租户ID| | ||
- | |sessionServiceId|String|N|会话ID| | + | |sessionServiceId|String|Y|会话ID| |
|page|int|N|查询页码索引,默认为0| | |page|int|N|查询页码索引,默认为0| | ||
|size|int|N|每页显示的数据容量,默认为10,最大为50| | |size|int|N|每页显示的数据容量,默认为10,最大为50| | ||
行 1230: | 行 2512: | ||
} | } | ||
</code> | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | |status|String|接口响应状态| | ||
+ | |msgId|String|消息Id| | ||
+ | |tenantId|Integer|租户Id| | ||
+ | |sessionServiceId|String|会话Id| | ||
+ | |messageType|String|消息类型| | ||
+ | |(fromUser)tenantId|Integer|租户Id| | ||
+ | |(fromUser)userId|String|Id| | ||
+ | |(fromUser)userType|String|类型| | ||
+ | |(fromUser)userScope|String|用户层级| | ||
+ | |(fromUser)nicename|String|昵称| | ||
+ | |(fromUser)scope|String|用户层级| | ||
+ | |(fromUser)bizId|String|租户Id| | ||
+ | |(fromUser)status|String|用户状态| | ||
+ | |contentType|String|消息内容类型| | ||
+ | |(bodies)|String|事件名称| | ||
+ | |(bodies)|String|消息类型| | ||
+ | |(ext.weichat)msgId|String|消息Id| | ||
+ | |(ext.weichat)originType|String|渠道类型| | ||
+ | |(ext.weichat)queueId|Long|技能组Id| | ||
+ | |(ext.weichat)queueName|String|技能组名称| | ||
+ | |(ext.weichat.event.eventName)|String|事件名| | ||
+ | |(ext.weichat.service_session)serviceSessionId|String|会话Id| | ||
+ | |(ext.weichat.service_session)robotId|Integer|机器人Id| | ||
+ | |(ext.weichat.service_session)state|String|会话状态| | ||
+ | |(ext.weichat.service_session)messageSeqId|Long|最大消息序列自增标记 ,注:messageSeqId 不代表完整消息数,其特殊情况下,messageSeqId 可能会有重复情况| | ||
+ | |(ext.weichat.service_session)agentUserId|String|坐席Id| | ||
+ | |(ext.weichat.service_session)agentUserType|Integer|坐席类型| | ||
+ | |(ext.weichat.service_session)expire|Boolean|会话是否过期| | ||
+ | |(ext.weichat.service_session)categoryId|Integer|标识该会话是否只有无效的访客消息| | ||
+ | |(ext.weichat.hide_flag)|Boolean|消息是否上屏| | ||
+ | |(body)from|String|发送者昵称| | ||
+ | |(body)to|String|接受者昵称| | ||
+ | |(body)channelType|String|关联类型| | ||
+ | |(body)timestamp|Date|时间戳| | ||
+ | |(body)tenantId |Integer|租户Id| | ||
+ | |(body)visitorUserId|String|访客Id| | ||
+ | |(body)originType|String|渠道类型| | ||
+ | |(body)channel_id|Integer|关联Id| | ||
+ | |first|Boolean|是否为第一页| | ||
+ | |last|Boolean|是否为最后一页| | ||
+ | |size|Integer|页大小| | ||
+ | |number|Integer|页码| | ||
+ | |numberOfElements|Integer|当前页element数量| | ||
+ | |totalPages|Integer|总页数| | ||
+ | |totalElements|Integer|总个数| | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== 呼叫中心 ===== | ||
+ | |||
+ | ==== 获取历史通话列表 ==== | ||
+ | |||
+ | 根据呼叫类型、通话时间、技能组、坐席、挂断原因、满意度评价等条件查询历史通话列表。 | ||
+ | |||
+ | * Path: http://kefu.easemob.com/api/platform/tenants/{tenantId}/calldetails | ||
+ | * HTTP Method: GET | ||
+ | * Request Headers: Kefu-Token=${accessToken} | ||
+ | * 可能的错误码:详见:[[#错误码说明|错误码说明]] | ||
+ | |||
+ | **Curl示例:** | ||
+ | |||
+ | <code php> | ||
+ | curl --request GET \ | ||
+ | --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' \ | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |Kefu-Token| String |Y|调用接口的accessToken| | ||
+ | |tenantId|int|Y|租户ID| | ||
+ | |page|int|N|查询页码索引,默认为0,0代表查询第一页数据| | ||
+ | |size|int|N|每页显示的数据容量,默认为10,最大为50| | ||
+ | |startTime| String |N|通话时间(开始范围条件),时间格式 2018-06-16T23%3A59%3A59.000Z| | ||
+ | |stopTime| String |N|通话时间(结束范围条件),时间格式 2018-06-16T23%3A59%3A59.000Z| | ||
+ | |contactType| String |N|通话类型,取值:Inbound(呼入),Outbound(呼出),Back2Back(双呼),Internal(内部通话),多个条件以英文逗号隔开| | ||
+ | |orderType| String |N|排序方式,取值:ASC/DESC,默认DESC| | ||
+ | |contactDisposition| String |N|挂断原因,取值:ALL(全部),Success(正常),NoAnswer(未接通),AbandonedInContactFlow(IVR中放弃),AbandonedInQueue(排队放弃),AbandonedRing(振铃放弃),QueueOverflow(排队超时),OneStepTransfer(转外线)| | ||
+ | |phoneNumber| 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, | ||
+ | "validDuration":14, | ||
+ | "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", | ||
+ | "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| Int |总通话时长| | ||
+ | |validDuration| Int |有效通话时长| | ||
+ | |satisfaction| String |满意度值| | ||
+ | |satisfactionDesc| String |满意度评价信息| | ||
+ | |startTime| String |通话开始时间| | ||
+ | |stopTime| String |通话结束时间| | ||
+ | |syncFlag| Boolean |通话详单生成标识,true为已生成| | ||
+ | |recordSyncFlag| Integer |录音生成标识,1为已生成,8为无录音| | ||
+ | |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 |录音文件名| | ||
+ | |startTime| String |录音开始时间| | ||
+ | |first| boolean |是否是第一页| | ||
+ | |last| boolean |是否是最后一页| | ||
+ | |number| int |当前页码| | ||
+ | |numberOfElements| int |当前页数据量| | ||
+ | |totalPages| int |总页数| | ||
+ | |totalElements| int |总数据量| | ||
+ | |||
+ | ==== 获取通话录音 ==== | ||
+ | |||
+ | 根据通话id查询通话录音。 | ||
+ | |||
+ | * Path: http://kefu.easemob.com/api/platform/tenants/{tenantId}/recording/{contactId} | ||
+ | * HTTP Method: GET | ||
+ | * Request Headers: Kefu-Token=${accessToken} | ||
+ | * 可能的错误码:详见:[[#错误码说明|错误码说明]] | ||
+ | |||
+ | **Curl示例:** | ||
+ | |||
+ | <code php> | ||
+ | curl --request GET \ | ||
+ | --url 'http://kefu.easemob.com/api/platform/tenants/20080/recording/3059753965' \ | ||
+ | --header 'Kefu-Token:a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |Kefu-Token| String |Y|调用接口的accessToken| | ||
+ | |tenantId|int|Y|租户ID| | ||
+ | |contactId|int|Y|通话id| | ||
+ | |||
+ | **Response示例:** | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "entity": [ | ||
+ | { | ||
+ | "tenantId": 20080, | ||
+ | "ccId": "d00842df-e406-4f32-9929-80b02f26e07c", | ||
+ | "staffUsername": "gcy@easemob.com", | ||
+ | "staffNickname": "gcy@easemob.com", | ||
+ | "staffTruename": "gcy", | ||
+ | "fileName": "161519050124500080550386.wav", | ||
+ | "fileUrl": "http%3A%2F%2Fcloudcallcenter-online.oss-cn-shanghai.aliyuncs.com%2Frecord%2Ff626832e-3da0-4c99-b534-ed3a2116b626%2F161519050124500080550386.wav%3FExpires%3D1615285356%26OSSAccessKeyId%3DLTAIvKWEr4DoFSqz%26Signature%3D7%252BTZaLQAng6iisw4R1LFVIUj1Gg%253D", | ||
+ | "startTime": 1615190501000, | ||
+ | "contactType": "Inbound", | ||
+ | "callingNumber": "18829209656", | ||
+ | "calledNumber": "02160556504", | ||
+ | "contactId": "3059753965", | ||
+ | "duration": 21 | ||
+ | }, | ||
+ | { | ||
+ | "tenantId": 20080, | ||
+ | "ccId": "d00842df-e406-4f32-9929-80b02f26e07c", | ||
+ | "staffUsername": "gcy_test@qq.com", | ||
+ | "staffNickname": "gcy_test", | ||
+ | "staffTruename": "gcy_test", | ||
+ | "fileName": "161519051281300080580663.wav", | ||
+ | "fileUrl": "http%3A%2F%2Fcloudcallcenter-online.oss-cn-shanghai.aliyuncs.com%2Frecord%2Ff626832e-3da0-4c99-b534-ed3a2116b626%2F161519051281300080580663.wav%3FExpires%3D1615285356%26OSSAccessKeyId%3DLTAIvKWEr4DoFSqz%26Signature%3DX%252FhBkDVR3HCIMSvHTkUcfA%252BFFcQ%253D", | ||
+ | "startTime": 1615190512000, | ||
+ | "contactType": "Inbound", | ||
+ | "callingNumber": "18829209656", | ||
+ | "calledNumber": "02160556504", | ||
+ | "contactId": "3059753965", | ||
+ | "duration": 30 | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | |status| String |接口响应状态| | ||
+ | |tenantId| String |租户ID| | ||
+ | |ccid| String |呼叫中心实例ID| | ||
+ | |contactId| String |通话ID| | ||
+ | |contactType| String |通话类型:呼入/呼出/双呼等| | ||
+ | |callingNumber| String |主叫号码| | ||
+ | |calledNumber| String |被叫号码| | ||
+ | |staffUsername| String |客服账号| | ||
+ | |staffNickname| String |客服昵称| | ||
+ | |staffTruename| String |客服姓名| | ||
+ | |fileName| String |录音文件名| | ||
+ | |fileUrl| String |录音文件路径| | ||
+ | |startTime| String |开始时间| | ||
+ | |duration| String |录音时长| | ||
+ | |||
+ | |||
+ | ===== 工单 ===== | ||
+ | |||
+ | ==== 查询自定义表单 ==== | ||
+ | |||
+ | 可查询在环信客服云后台设置的自定义表单列表。 | ||
+ | |||
+ | 应用场景: | ||
+ | 您自己的业务系统/APP里提交工单,您自己开发提交工单的页面,调用环信工单接口,工单数据提交至环信客服云。您自己开发提交工单的页面时,需要指定用户填写的工单字段,这一步调用此接口完成。获取自定义表单后,您可在页面上直接指定用户填写哪一个表单的字段,也可让用户自行选择表单(让用户选择业务分类)。 | ||
+ | |||
+ | * Path: http://kefu.easemob.com/api/platform/tenants/{tenantId}/integration-ticket/forms | ||
+ | * HTTP Method: GET | ||
+ | * Request Headers: Kefu-Token=${accessToken} | ||
+ | * 可能的错误码:详见:[[#错误码说明|错误码说明]] | ||
+ | |||
+ | **Curl示例:** | ||
+ | |||
+ | <code php> | ||
+ | curl --request GET \ | ||
+ | --url 'http://kefu.easemob.com/api/platform/tenants/20016/integration-ticket/forms' \ | ||
+ | --header 'Kefu-Token:a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |Kefu-Token| String |Y|调用接口的accessToken| | ||
+ | |tenantId| int |Y|租户ID| | ||
+ | |page| int |N|页码,默认为0| | ||
+ | |size| int |N|每页的数据量,默认为10| | ||
+ | |||
+ | **Response示例:** | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entities": [ | ||
+ | { | ||
+ | "id": "7f0f0af4-71bd-4c04-b049-c98802cb793b", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-28T03:11:18Z", | ||
+ | "updated": "2019-11-28T03:11:18Z", | ||
+ | "name": "自定义表单111", | ||
+ | "description": "测试自定义表单功能", | ||
+ | "status": "enabled", | ||
+ | "fields": [ | ||
+ | { | ||
+ | "id": "6cf63d66-5f0a-4a53-acb4-e46998227342", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-28T03:14:49Z", | ||
+ | "updated": "2019-11-28T03:14:49Z", | ||
+ | "name": "自定义表单222", | ||
+ | "description": "测试自定义表单2222", | ||
+ | "status": "enabled", | ||
+ | "fields": [ | ||
+ | { | ||
+ | "id": "e7d32c88-22e0-4ffd-95df-741e628ada8e", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-28T03:24:25Z", | ||
+ | "updated": "2019-11-28T03:24:25Z", | ||
+ | "form_id": "6cf63d66-5f0a-4a53-acb4-e46998227342", | ||
+ | "name": "男,女", | ||
+ | "label": "性别", | ||
+ | "type": "TEXT_STRING", | ||
+ | "visible": true, | ||
+ | "required": "ON", | ||
+ | "sort": 1, | ||
+ | "hint": "填写性别", | ||
+ | "dictionary_items": [], | ||
+ | "cascade_items": [] | ||
+ | }, | ||
+ | { | ||
+ | "id": "2c17ad7b-c808-4850-94e7-d39ecf743d7e", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-28T03:24:53Z", | ||
+ | "updated": "2019-11-28T03:24:53Z", | ||
+ | "form_id": "6cf63d66-5f0a-4a53-acb4-e46998227342", | ||
+ | "name": "填写爱好", | ||
+ | "label": "爱好", | ||
+ | "type": "SELECT_STRING", | ||
+ | "dictionary_id": "eb9fb55e-3978-40ac-bc79-8623af7bc11b", | ||
+ | "visible": true, | ||
+ | "required": "ON", | ||
+ | "sort": 2, | ||
+ | "dictionary_items": [], | ||
+ | "cascade_items": [] | ||
+ | }, | ||
+ | { | ||
+ | "id": "ceb2ca78-6118-42de-9e21-23baf366dba1", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-28T03:25:26Z", | ||
+ | "updated": "2019-11-28T03:25:26Z", | ||
+ | "form_id": "6cf63d66-5f0a-4a53-acb4-e46998227342", | ||
+ | "name": "填写出生日期", | ||
+ | "label": "出生日期", | ||
+ | "type": "NUMBER", | ||
+ | "visible": true, | ||
+ | "required": "ON", | ||
+ | "sort": 3, | ||
+ | "hint": "填写出生日期", | ||
+ | "dictionary_items": [], | ||
+ | "cascade_items": [] | ||
+ | } | ||
+ | ], | ||
+ | "topics": [ | ||
+ | { | ||
+ | "id": "351d899f-c83c-476c-8f71-bc1918eb4ba0", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-27T10:31:05Z", | ||
+ | "updated": "2019-11-27T10:31:05Z", | ||
+ | "parent_id": "eb72bc55-cbd6-454b-be81-1ad1b8df4940", | ||
+ | "name": "第二级别主题", | ||
+ | "is_active": 1, | ||
+ | "is_public": 1, | ||
+ | "full_name": "/hegj帮助主题1/第二级别主题", | ||
+ | "children": [ | ||
+ | { | ||
+ | "id": "2e272127-84d2-49a2-964e-e507d4a374f3", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-27T10:31:17Z", | ||
+ | "updated": "2019-11-27T10:31:17Z", | ||
+ | "parent_id": "351d899f-c83c-476c-8f71-bc1918eb4ba0", | ||
+ | "name": "第三级别主题1", | ||
+ | "is_active": 1, | ||
+ | "is_public": 1, | ||
+ | "children": [ | ||
+ | { | ||
+ | "id": "1ba44df9-ee60-4b8a-83ce-ff007a46bc38", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-27T10:31:30Z", | ||
+ | "updated": "2019-11-27T10:31:30Z", | ||
+ | "parent_id": "2e272127-84d2-49a2-964e-e507d4a374f3", | ||
+ | "name": "第四级主题1", | ||
+ | "is_active": 1, | ||
+ | "is_public": 1, | ||
+ | "full_name": "/hegj帮助主题1/第二级别主题/第三级别主题1/第四级主题1", | ||
+ | "children": [ | ||
+ | { | ||
+ | "id": "aca22ed9-f392-4620-8676-2d44da4a3891", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-27T10:31:40Z", | ||
+ | "updated": "2019-11-27T10:31:40Z", | ||
+ | "parent_id": "1ba44df9-ee60-4b8a-83ce-ff007a46bc38", | ||
+ | "name": "第五级主题1", | ||
+ | "is_active": 1, | ||
+ | "is_public": 1, | ||
+ | "children": [ | ||
+ | { | ||
+ | "id": "1bb2a127-9179-4d4f-9352-20c341180c85", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-27T10:31:49Z", | ||
+ | "updated": "2019-11-27T10:31:49Z", | ||
+ | "parent_id": "aca22ed9-f392-4620-8676-2d44da4a3891", | ||
+ | "name": "第六级主题1", | ||
+ | "is_active": 1, | ||
+ | "is_public": 1 | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | { | ||
+ | "id": "1bb2a127-9179-4d4f-9352-20c341180c85", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-27T10:31:49Z", | ||
+ | "updated": "2019-11-27T10:31:49Z", | ||
+ | "parent_id": "aca22ed9-f392-4620-8676-2d44da4a3891", | ||
+ | "name": "第六级主题1", | ||
+ | "is_active": 1, | ||
+ | "is_public": 1, | ||
+ | "full_name": "/hegj帮助主题1/第二级别主题/第三级别主题1/第四级主题1/第五级主题1/第六级主题1" | ||
+ | }, | ||
+ | { | ||
+ | "id": "1ba44df9-ee60-4b8a-83ce-ff007a46bc38", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-27T10:31:30Z", | ||
+ | "updated": "2019-11-27T10:31:30Z", | ||
+ | "parent_id": "2e272127-84d2-49a2-964e-e507d4a374f3", | ||
+ | "name": "第四级主题1", | ||
+ | "is_active": 1, | ||
+ | "is_public": 1, | ||
+ | "full_name": "/hegj帮助主题1/第二级别主题/第三级别主题1/第四级主题1", | ||
+ | "children": [ | ||
+ | { | ||
+ | "id": "aca22ed9-f392-4620-8676-2d44da4a3891", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-27T10:31:40Z", | ||
+ | "updated": "2019-11-27T10:31:40Z", | ||
+ | "parent_id": "1ba44df9-ee60-4b8a-83ce-ff007a46bc38", | ||
+ | "name": "第五级主题1", | ||
+ | "is_active": 1, | ||
+ | "is_public": 1, | ||
+ | "children": [ | ||
+ | { | ||
+ | "id": "1bb2a127-9179-4d4f-9352-20c341180c85", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-27T10:31:49Z", | ||
+ | "updated": "2019-11-27T10:31:49Z", | ||
+ | "parent_id": "aca22ed9-f392-4620-8676-2d44da4a3891", | ||
+ | "name": "第六级主题1", | ||
+ | "is_active": 1, | ||
+ | "is_public": 1 | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ], | ||
+ | "topic_ids": [ | ||
+ | "1ba44df9-ee60-4b8a-83ce-ff007a46bc38", | ||
+ | "351d899f-c83c-476c-8f71-bc1918eb4ba0", | ||
+ | "1bb2a127-9179-4d4f-9352-20c341180c85" | ||
+ | ] | ||
+ | }, | ||
+ | { | ||
+ | "id": "kefu_27886", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2019-11-27T07:22:35Z", | ||
+ | "updated": "2019-11-27T07:22:35Z", | ||
+ | "name": "默认表单", | ||
+ | "description": "租户默认的自定义表单", | ||
+ | "status": "enabled", | ||
+ | "fields": [], | ||
+ | "topics": [], | ||
+ | "topic_ids": [] | ||
+ | } | ||
+ | ], | ||
+ | "first": true, | ||
+ | "last": true, | ||
+ | "size": 10, | ||
+ | "number": 0, | ||
+ | "numberOfElements": 3, | ||
+ | "totalPages": 1, | ||
+ | "totalElements": 3 | ||
+ | } | ||
+ | |||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | |httpStatusCode| String |http状态码| | ||
+ | |status| String |接口响应状态| | ||
+ | |entities| |表单列表| | ||
+ | |first| Boolean |是否是第一页| | ||
+ | |last| Boolean |是否是最后一页| | ||
+ | |size| int |每页的数据量| | ||
+ | |number| String |第几页| | ||
+ | |numberOfElements| int |该页的数据量| | ||
+ | |totalPages| int |总页数| | ||
+ | |totalElements| int|总数据量| | ||
+ | |||| | ||
+ | |表单数据| | ||
+ | |id| String |表单ID,自定义表单的唯一标识| | ||
+ | |tenant_id| String |租户ID| | ||
+ | |created| int |表单创建时间| | ||
+ | |updated| String |表单修改时间| | ||
+ | |name| String |表单名称| | ||
+ | |description| String |描述| | ||
+ | |status| String|状态,enabled| | ||
+ | |fields| |List<FormField>,自定义字段信息| | ||
+ | |topics| |List<HelpTopic>,表单关联的帮助主题| | ||
+ | |topic_ids| String |表单关联的帮助主题Id列表| | ||
+ | |||| | ||
+ | |表单字段数据| | ||
+ | |id| String |字段ID,字段的唯一标识| | ||
+ | |tenant_id| String |租户ID| | ||
+ | |created| int |字段创建时间| | ||
+ | |updated| String |字段修改时间| | ||
+ | |form_id| String |表单ID| | ||
+ | |name| String |字段标识| | ||
+ | |label| String |字段名称| | ||
+ | |type| String|字段格式:TEXT_STRING 单行文本,DATE 日期,NUMBER 数字类型,URL URL,SELECT_STRING 下拉选项,TEXTAREA_STRING 多行文本,CASCADE_SELECT_STRING 级联选择| | ||
+ | |dictionary_id| String |关联下拉选项| | ||
+ | |visible| Boolean |访客是否可见| | ||
+ | |required| Boolean |是否必填| | ||
+ | |sort| String |排序字段| | ||
+ | |hint| String |文本框提示语| | ||
+ | |dictionary_items| |List<DictionaryItem>,下拉选项| | ||
+ | |cascade_items| |List<CascadeItem>,级联选项| | ||
+ | |||| | ||
+ | |选项数据| | ||
+ | |id| String |每个选项的ID| | ||
+ | |tenant_id| String |租户ID| | ||
+ | |created| int |选项创建时间| | ||
+ | |updated| String |选项修改时间| | ||
+ | |dictionary_Id| String |关联字段ID| | ||
+ | |item_value| String |选项名称| | ||
+ | |sort| String |排序字段| | ||
+ | |status| String |可忽略| | ||
+ | |||| | ||
+ | |级联选项| | ||
+ | |id| String |每个级联的ID| | ||
+ | |tenant_id| String |租户ID| | ||
+ | |created| int |选项创建时间| | ||
+ | |updated| String |选项修改时间| | ||
+ | |field_id| String |字段ID| | ||
+ | |form_id| String |表单ID| | ||
+ | |name| String |级联选项名称| | ||
+ | |parent_id| String |父节点ID| | ||
+ | |children| |List<CascadeItem>,子节点| | ||
+ | |||
+ | ==== 工单附件上传 ==== | ||
+ | |||
+ | 提交工单/回复工单时,若需要上传附件,则需要先调用此接口上传附件,再调用访客提交工单接口提交工单。 | ||
+ | |||
+ | * Path: http://kefu.easemob.com/api/platform/tenants/{tenantId}/integration-ticket/mediaFiles | ||
+ | * HTTP Method: POST | ||
+ | * Request Headers: Kefu-Token=${accessToken} | ||
+ | * 可能的错误码:详见:[[#错误码说明|错误码说明]] | ||
+ | |||
+ | **Curl示例:** | ||
+ | |||
+ | <code php> | ||
+ | curl --request GET \ | ||
+ | --url 'http://kefu.easemob.com/api/platform/tenants/20016/integration-ticket/mediaFiles' \ | ||
+ | --header 'Kefu-Token:a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
+ | --form 'file=@/Users/heguojiao/Downloads/第024期-lcn.pptx' | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |Kefu-Token| String |Y|调用接口的accessToken| | ||
+ | |tenantId|int|Y|租户ID| | ||
+ | |file|form-data|Y|附件信息| | ||
+ | |||
+ | **Response示例:** | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entity": { | ||
+ | "uuid": "010b99ec-ba54-4062-b6cf-a20737ae782e56ysMDI05pyfLWxjbi5wcHR4", | ||
+ | "contentType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", | ||
+ | "contentLength": 1385894, | ||
+ | "url": "/v2/tenants/20016/integration/ticket-server/visitors/mediaFiles/010b99ec-ba54-4062-b6cf-a20737ae782e56ysMDI05pyfLWxjbi5wcHR4", | ||
+ | "fileName": "第024期-lcn.pptx" | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | |status| String |接口响应状态| | ||
+ | |entity| |附件信息| | ||
+ | |||| | ||
+ | |附件信息| | ||
+ | |uuid| String |附件ID| | ||
+ | |contentType| String |附件类型| | ||
+ | |contentLength| String |附件大小| | ||
+ | |url| String |附件地址| | ||
+ | |fileName| String |附件名称| | ||
+ | |||
+ | ==== 工单状态接口 ==== | ||
+ | |||
+ | **获取token:** | ||
+ | |||
+ | 1.开放平台需要使用token进行身份验证。 | ||
+ | |||
+ | 2.Kefu-Token有效期2小时,到期需重新获取。 | ||
+ | |||
+ | 登录地址: | ||
+ | ^操作^|更新修改工单状态,标题,优先级,工单内容,分配组,分配人的接口| | ||
+ | ^协议^| HTTPS | | ||
+ | ^方式^| PUT | | ||
+ | ^URL^|/api/platform/tenants/{tenantId}/integration-ticket/{ticketId}/updateTicketInfo| | ||
+ | |||
+ | 请求参数: | ||
+ | ^参数^是否必传^描述^参数类型^数据类型^ | ||
+ | |tenantId| 是 |租户Id|Path|integer| | ||
+ | |ticketId|是|工单Id|Path|String| | ||
+ | |requestBody|是|请求体|Body|object| | ||
+ | |||
+ | requestBody包括以下几个参数: | ||
+ | ^参数^是否必传^描述^数据类型^ | ||
+ | |title|否|标题|String| | ||
+ | |status_id|否|工单状态id|String| | ||
+ | |staff_id|是|坐席id|String| | ||
+ | |team_id|否|技能组Id|String| | ||
+ | |priority_id|否|优先级id|String| | ||
+ | |content|否|工单内容|String| | ||
+ | |||
+ | 返回数据: | ||
+ | ^HTTP状态Code^含义^ | ||
+ | |200|OK| | ||
+ | |API_007|Staff_id不能为空| | ||
+ | ^成功返回数据^含义^ | ||
+ | |Status|OK| | ||
+ | |entities|List<from>| | ||
+ | |||
+ | **请求示例:** | ||
+ | |||
+ | 请求数据格式都应该是application/json,编码形式为UTF-8 | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "title":"开放平台45", | ||
+ | "status_id":"7732d036-fdcc-4996-973e-0d9323a39617", | ||
+ | "team_id":"dfdgsd", | ||
+ | "staff_id":"hksjdks77555", | ||
+ | "priority_id":"tjuncu1", | ||
+ | "content":"公章" | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | **成功返回示例:** | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entity": { | ||
+ | "id": "eca76b2c-a69a-48d8-8056-7fad0ff290f3", | ||
+ | "tenant_id": 11, | ||
+ | "title":"开放平台45", | ||
+ | "status_id":"7732d036-fdcc-4996-973e-0d9323a39617", | ||
+ | "team_id":"dfdgsd", | ||
+ | "staff_id":"hksjdks77555", | ||
+ | "priority_id":"tjuncu1", | ||
+ | "content":"公章", | ||
+ | "satisfaction_score": 0, | ||
+ | "quality_score": 0, | ||
+ | "operator_id": "hksjdks77555", | ||
+ | "operator_type": "S", | ||
+ | "is_admin": true, | ||
+ | "form_values": [], | ||
+ | "is_read": 0 | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | |||
+ | ==== 访客提交工单 ==== | ||
+ | |||
+ | 访客提交工单接口。 | ||
+ | |||
+ | * Path: http://kefu.easemob.com/api/platform/tenants/{tenantId}/integration-ticket/visitors/ticket | ||
+ | * HTTP Method: POST | ||
+ | * Request Headers: Kefu-Token=${accessToken} | ||
+ | * 可能的错误码:详见:[[#错误码说明|错误码说明]] | ||
+ | |||
+ | **Curl示例:** | ||
+ | |||
+ | <code php> | ||
+ | curl --request GET \ | ||
+ | --url 'http://kefu.easemob.com/api/platform/tenants/20016/integration-ticket/visitors/ticket' \ | ||
+ | --header 'Kefu-Token:a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
+ | --header 'Content-Type: application/json' \ | ||
+ | --data-raw '{ | ||
+ | "title": "标题222334", | ||
+ | "content": "描述222334", | ||
+ | "visitor_phone": "13662124786", | ||
+ | "visitor_email": "8122334@qq.com", | ||
+ | "visitor_nickname": "称呼222334", | ||
+ | "attachments": [ | ||
+ | { | ||
+ | "name": "message-center-server服务未升级组件.png", | ||
+ | "file_type": "image/png", | ||
+ | "size": 970870, | ||
+ | "url": "http://sandbox.kefu.easemob.com//v2/tenants/27886/integration/ticket-server/visitors/mediaFiles/c5154e5e-09c4-476c-a2f6-f6a1ca42eaa1bWVzc2FnZS1jZW50ZXItc2VydmVy5pyN5Yqh5pyq5Y2H57qn57uE5Lu2LnBuZw==", | ||
+ | "uuid": "c5154e5e-09c4-476c-a2f6-f6a1ca42eaa1bWVzc2FnZS1jZW50ZXItc2VydmVy5pyN5Yqh5pyq5Y2H57qn57uE5Lu2LnBuZw==" | ||
+ | } | ||
+ | ], | ||
+ | "form_values": [ | ||
+ | { | ||
+ | "field_id": "2c17ad7b-c808-4850-94e7-d39ecf743d7e", | ||
+ | "field_value": "篮球" | ||
+ | }, | ||
+ | { | ||
+ | "field_id": "e7d32c88-22e0-4ffd-95df-741e628ada8e", | ||
+ | "field_value": "女" | ||
+ | }, | ||
+ | { | ||
+ | "field_id": "ceb2ca78-6118-42de-9e21-23baf366dba1", | ||
+ | "field_value": "22" | ||
+ | }, | ||
+ | { | ||
+ | "field_id": "030eb800-00f4-4ff0-96b1-01edb15d0016", | ||
+ | "field_value": "级联选项1/级联选项1-1", | ||
+ | "item_ids": "6b550cfd-74b6-405c-aadf-c82989f4b52e_09d44dab-196a-4529-9c8b-1c92f7152037" | ||
+ | } | ||
+ | ], | ||
+ | "form_id": "6cf63d66-5f0a-4a53-acb4-e46998227342" | ||
+ | }' | ||
+ | |||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |Kefu-Token| String |Y|调用接口的accessToken| | ||
+ | |tenantId|int|Y|租户ID| | ||
+ | |title|String|Y|标题| | ||
+ | |content|String|Y|内容| | ||
+ | |visitor_phone|String|Y|访客手机号| | ||
+ | |visitor_email|String|Y|访客邮箱| | ||
+ | |visitor_nickname|String|Y|访客昵称| | ||
+ | |attachments|String|N|附件信息| | ||
+ | |form_id|String|N|表单ID| | ||
+ | |form_values|String|N|表单自定义字段信息| | ||
+ | |||| | ||
+ | |附件信息| | ||
+ | |name|String||附件名,对应上传附件接口里的fileName字段| | ||
+ | |file_type|String||对应上传附件接口里的contentType字段| | ||
+ | |size|String||对应上传附件接口里的contentLength字段| | ||
+ | |url|String||对应上传附件接口里的url字段| | ||
+ | |uuid|String||对应上传附件接口里的uuid字段| | ||
+ | |||| | ||
+ | |自定义表单字段| | ||
+ | |field_id|String||字段ID| | ||
+ | |file_type|String||填写内容| | ||
+ | |item_ids|String||对于级联字段设置的层级id| | ||
+ | |||
+ | **Response示例:** | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entity": { | ||
+ | "id": "75eb5d2e-3235-431d-b716-5b634736cf5b", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2020-09-16T07:42:46Z", | ||
+ | "updated": "2020-09-16T07:42:46Z", | ||
+ | "title": "标题222334", | ||
+ | "code": "A0000004", | ||
+ | "visitor_user_id": "64022b77-166d-4a68-bc37-fdb146a07dfa", | ||
+ | "status_id": "ff22d6d8-3da5-4ec2-8920-aa645b332c5a", | ||
+ | "source": "API", | ||
+ | "creator_id": "64022b77-166d-4a68-bc37-fdb146a07dfa", | ||
+ | "creator_type": "C", | ||
+ | "content": "描述222334", | ||
+ | "form_id": "6cf63d66-5f0a-4a53-acb4-e46998227342", | ||
+ | "satisfaction_score": 0, | ||
+ | "quality_score": 0, | ||
+ | "operator_id": "64022b77-166d-4a68-bc37-fdb146a07dfa", | ||
+ | "operator_type": "C", | ||
+ | "form_values": [ | ||
+ | { | ||
+ | "id": "196fc01c-650d-4b3d-9755-e2221541155e", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2020-09-16T07:42:46Z", | ||
+ | "updated": "2020-09-16T07:42:46Z", | ||
+ | "field_id": "2c17ad7b-c808-4850-94e7-d39ecf743d7e", | ||
+ | "field_value": "篮球" | ||
+ | }, | ||
+ | { | ||
+ | "id": "d774aed5-6dc8-469d-ba30-287ebe99faaa", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2020-09-16T07:42:46Z", | ||
+ | "updated": "2020-09-16T07:42:46Z", | ||
+ | "field_id": "030eb800-00f4-4ff0-96b1-01edb15d0016", | ||
+ | "field_value": "级联选项1/级联选项1-1", | ||
+ | "item_ids": "6b550cfd-74b6-405c-aadf-c82989f4b52e_09d44dab-196a-4529-9c8b-1c92f7152037" | ||
+ | }, | ||
+ | { | ||
+ | "id": "611bfc78-b3a0-468a-80c7-89cf4c6b8d41", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2020-09-16T07:42:46Z", | ||
+ | "updated": "2020-09-16T07:42:46Z", | ||
+ | "field_id": "ceb2ca78-6118-42de-9e21-23baf366dba1", | ||
+ | "field_value": "22" | ||
+ | }, | ||
+ | { | ||
+ | "id": "6c51017a-de6e-426b-a4b8-038befc6a936", | ||
+ | "tenant_id": 200161, | ||
+ | "created": "2020-09-16T07:42:46Z", | ||
+ | "updated": "2020-09-16T07:42:46Z", | ||
+ | "field_id": "e7d32c88-22e0-4ffd-95df-741e628ada8e", | ||
+ | "field_value": "女" | ||
+ | } | ||
+ | ], | ||
+ | "is_read": 0 | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | |status| String |接口响应状态| | ||
+ | |entity| |工单信息| | ||
+ | |||| | ||
+ | |工单信息| | ||
+ | |id| String |工单id| | ||
+ | |tenant_id| String |租户id| | ||
+ | |created| String |创建时间| | ||
+ | |updated| String |修改时间| | ||
+ | |title| String |工单标题| | ||
+ | |code| String |工单编号| | ||
+ | |visitor_user_id| String |访客ID| | ||
+ | |status_id| String |工单状态ID| | ||
+ | |source| String |固定传值“API”| | ||
+ | |creator_id| String |创建者ID| | ||
+ | |creator_type| String |创建者类型(S、C)STAFF("S"), CUSTOMER("C")| | ||
+ | |content| String |工单内容| | ||
+ | |form_id| String |表单ID| | ||
+ | |satisfaction_score| String |满意度评分| | ||
+ | |quality_score| String |质检评分| | ||
+ | |operator_id| String |质检员ID| | ||
+ | |operator_type| String |质检员类型| | ||
+ | |form_values| String |List<FormValue>,表单自定义字段内容| | ||
+ | |is_read| String |工单已读未读功能| | ||
+ | |||| | ||
+ | |FormValue| | ||
+ | |id| String |工单和字段关联ID| | ||
+ | |tenant_id| String |租户id| | ||
+ | |created| String |创建时间| | ||
+ | |updated| String |修改时间| | ||
+ | |field_id| String |字段ID| | ||
+ | |field_value| String |字段对应的填写的内容| | ||
+ | ==== 访客回复工单 ==== | ||
+ | |||
+ | 访客回复工单接口。 | ||
+ | |||
+ | * Path: http://kefu.easemob.com/api/platform/tenants/{tenantId}/integration-ticket/visitors/{ticketId}/comments | ||
+ | * HTTP Method: POST | ||
+ | * Request Headers: Kefu-Token=${accessToken} | ||
+ | * 可能的错误码:详见:[[#错误码说明|错误码说明]] | ||
+ | |||
+ | **Curl示例:** | ||
+ | |||
+ | <code php> | ||
+ | curl --request GET \ | ||
+ | --url 'http://kefu.easemob.com/api/platform/tenants/20016/integration-ticket/visitors/{ticketId}/comments' \ | ||
+ | --header 'Kefu-Token:a7f3d2bcb62721a3c67b8f567acfd553' \ | ||
+ | -d '{ | ||
+ | "body": "<p>aaaappppiiii</p>", | ||
+ | "format": "html", | ||
+ | "attachments": [ | ||
+ | { | ||
+ | "contentType": "image/png", | ||
+ | "contentLength": 239008, | ||
+ | "url": "https://sandbox.kefu.easemob.com/v2/tenants/29676/integration/ticket-server/visitors/mediaFiles/afec47f4-659d-4dd9-9406-1e07bc7ca9415raI5oGvLnBuZw==", | ||
+ | "name": "消息.png" | ||
+ | } | ||
+ | ], | ||
+ | "visitor_email": "qu@api.com" | ||
+ | }' | ||
+ | |||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^是否非空(Y:是;N:否)^说明^ | ||
+ | |Kefu-Token| String |Y|调用接口的accessToken| | ||
+ | |tenantId|int|Y|租户ID| | ||
+ | |ticketId|String|Y|工单ID| | ||
+ | |body|String|Y|回复内容| | ||
+ | |format|String|Y|文本格式| | ||
+ | |visitor_email|String|Y|访客邮箱| | ||
+ | |attachments||N|附件| | ||
+ | |附件信息| | ||
+ | |contentType|String||类型| | ||
+ | |contentLength|String||附件大小| | ||
+ | |url|String||附件地址| | ||
+ | |name|String||附件名称| | ||
+ | |||
+ | **Response示例:** | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | "status": "OK", | ||
+ | "entity": { | ||
+ | "id": "01237efe-6d43-4092-afb3-49efbf22b9ef", | ||
+ | "tenant_id": 601, | ||
+ | "created": "2021-01-11T14:49:28Z", | ||
+ | "updated": "2021-01-11T14:49:28Z", | ||
+ | "ticket_id": "e863ba5e-6e54-429c-9674-7e5a43cf495c", | ||
+ | "visitor_user_id": "8fdfca59-9e4b-466c-84a7-06f3cd0ce942", | ||
+ | "body": "<p>aaaappppiiii</p>", | ||
+ | "format": "html", | ||
+ | "is_public": true, | ||
+ | "attachments": [ | ||
+ | { | ||
+ | "id": "c54109e1-98fe-4f62-a00f-8e4394f9b669", | ||
+ | "tenant_id": 601, | ||
+ | "url": "https://sandbox.kefu.easemob.com/v2/tenants/29676/integration/ticket-server/visitors/mediaFiles/afec47f4-659d-4dd9-9406-1e07bc7ca9415raI5oGvLnBuZw==", | ||
+ | "right_attachment": false | ||
+ | } | ||
+ | ], | ||
+ | "public_response_type": "EMAIL" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </code> | ||
+ | |||
+ | 参数说明: | ||
+ | ^名称^类型^说明^ | ||
+ | |status| String |接口响应状态| | ||
+ | |entity| |回复信息| | ||
+ | |id|String|评论ID| | ||
+ | |tenantId|String|租户ID| | ||
+ | |created|String|评论添加时间| | ||
+ | |updated|String|评论修改事件| | ||
+ | |ticket_id|String|工单id| | ||
+ | |visitor_user_id|String|访客ID| | ||
+ | |body|String|回复内容| | ||
+ | |format|String|文本格式| | ||
+ | |is_public|String|是否公开回复| | ||
+ | |attachments||附件| | ||
+ | |附件信息| | ||
+ | |id|String|类型| | ||
+ | |tenant_id|String|附件大小| | ||
+ | |url|String|附件地址| | ||
+ | |right_attachment|String|| | ||
+ | |public_response_type|String|回复渠道| | ||
+ | |||
+ | |||
+ | |||
===== 错误码说明 ===== | ===== 错误码说明 ===== | ||
行 1251: | 行 3525: | ||
|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|服务间调用请求错误| | ||
+ | |API_117|tenant without ticket function|租户没有开通工单功能| | ||
+ | |API_118|tenant without yuncentercall function|租户没有开通云呼功能| | ||
+ | |||
+ | ===== 不同格式消息结构 ===== | ||
+ | |||
+ | 新消息对应的报文格式 | ||
+ | |||
+ | 1.文本:txt | ||
+ | 报文: | ||
+ | |||
+ | { | ||
+ | "eventId": "91a007c0-1215-11ec-90a5-a10326678cd1", | ||
+ | "timestamp": 1631264438855, | ||
+ | "event": "ServiceSessionMessageEvent", | ||
+ | "payload": { | ||
+ | "message": { | ||
+ | "id": "a06529e8-4b31-4042-a738-af2d1296b6cb", | ||
+ | "service_session_id": "54eeacc4-6946-4b80-bd8e-f0a4426211f8", | ||
+ | "msg_id_for_ack": "997f6f43-e11f-4898-a21f-4f643a6dfb18", | ||
+ | "create_at": 1631264438793, | ||
+ | "from": { | ||
+ | "id": "2735acf5-a003-42f9-8ada-fdcc6581ee09", | ||
+ | "name": "webim-visitor-8MQTGP9E4VEEGHEWBFXQ", | ||
+ | "type": "Visitor" | ||
+ | }, | ||
+ | "to": { | ||
+ | "id": "f6a9ae57-6bd8-4ba5-9478-10027d6143a2", | ||
+ | "name": "宋晓伟", | ||
+ | "type": "Agent" | ||
+ | }, | ||
+ | "origin_type": "webim", | ||
+ | "channel": { | ||
+ | "id": 23457, | ||
+ | "name": "关联2", | ||
+ | "type": "easemob" | ||
+ | }, | ||
+ | "body": { | ||
+ | "msg": "会尽快", | ||
+ | "type": "txt" | ||
+ | }, | ||
+ | "ext": { | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | 2.cmd | ||
+ | |||
+ | { | ||
+ | "eventId": "51dfa130-121b-11ec-8511-fb6f37820f89", | ||
+ | "timestamp": 1631266908881, | ||
+ | "event": "ServiceSessionMessageEvent", | ||
+ | "payload": { | ||
+ | "message": { | ||
+ | "id": "f7bc1803-1d3c-4346-b46d-a6a1f58e39af", | ||
+ | "service_session_id": "6baa6363-6770-4110-b319-4a2a6b14e02e", | ||
+ | "msg_id_for_ack": NULL, | ||
+ | "create_at": 1631266908814"from": { | ||
+ | "id": "_2", | ||
+ | "name": "关联设置调度员", | ||
+ | "type": "Scheduler" | ||
+ | }, | ||
+ | "to": { | ||
+ | "id": "2735acf5-a003-42f9-8ada-fdcc6581ee09", | ||
+ | "name": "webim-visitor-8MQTGP9E4VEEGHEWBFXQ", | ||
+ | "type": "Visitor" | ||
+ | }, | ||
+ | "origin_type": "webim", | ||
+ | "channel": { | ||
+ | "id": 23457, | ||
+ | "type": "easemob" | ||
+ | }, | ||
+ | "body": { | ||
+ | "action": "ServiceSessionOpenedEvent", | ||
+ | "type": "cmd" | ||
+ | }, | ||
+ | "ext": { | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | 3.图片:img | ||
+ | { | ||
+ | "eventId": "73c94200-1217-11ec-90ce-e186d8435957", | ||
+ | "timestamp": 1631265247817, | ||
+ | "event": "ServiceSessionMessageEvent", | ||
+ | "payload": { | ||
+ | "message": { | ||
+ | "id": "aff765d2-f7b5-443a-939c-718446cf70a2", | ||
+ | "service_session_id": "3dea8e64-1f94-4ecd-aaab-daae8161b4a5", | ||
+ | "msg_id_for_ack": "fbc6ded2-62ba-4731-8d0b-65f8d3b074b0", | ||
+ | "create_at": 1631265247718, | ||
+ | "from": { | ||
+ | "id": "2735acf5-a003-42f9-8ada-fdcc6581ee09", | ||
+ | "name": "webim-visitor-8MQTGP9E4VEEGHEWBFXQ", | ||
+ | "type": "Visitor" | ||
+ | }, | ||
+ | "to": { | ||
+ | "id": "", | ||
+ | "name": "", | ||
+ | "type": "Agent" | ||
+ | }, | ||
+ | "origin_type": "webim", | ||
+ | "channel": { | ||
+ | "id": 23457, | ||
+ | "name": "关联2", | ||
+ | "type": "easemob" | ||
+ | }, | ||
+ | "body": { | ||
+ | "url": "/v1/Tenant/29676/MediaFiles/bf086bfe-2bb0-4b28-874e-dab6d09753c55YiG5biD5byP6ZSB6Zeu6aKYLnBuZw==", | ||
+ | "filename": "分布式锁问题.png", | ||
+ | "type": "img" | ||
+ | }, | ||
+ | "ext": {} | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | 4.文件 file | ||
+ | { | ||
+ | "eventId": "15980750-1219-11ec-abcd-4112b9a39f21", | ||
+ | "timestamp": 1631265948754, | ||
+ | "event": "ServiceSessionMessageEvent", | ||
+ | "payload": { | ||
+ | "message": { | ||
+ | "id": "c710292d-87c0-4d1a-ab11-4eb0af7c62f3", | ||
+ | "service_session_id": "7f76bdbd-cc65-4e04-a8b8-14c8b7139525", | ||
+ | "msg_id_for_ack": "", | ||
+ | "create_at": 1631265948677, | ||
+ | "from": { | ||
+ | "id": "c6e5df54-ce63-4c8c-8a1d-c1fac4feecc3", | ||
+ | "name": "webim-visitor-9BM6XB77QTE2R7Y7R6VH", | ||
+ | "type": "Visitor" | ||
+ | }, | ||
+ | "to": { | ||
+ | "id": "8215d830-d998-4f54-9d66-eefabcaa36da", | ||
+ | "name": "客服机器人-小鹤", | ||
+ | "type": "Robot" | ||
+ | }, | ||
+ | "origin_type": "webim", | ||
+ | "channel": { | ||
+ | "id": 23700, | ||
+ | "name": "快速创建的关联", | ||
+ | "type": "easemob" | ||
+ | }, | ||
+ | "body": { | ||
+ | "url": "/v1/Tenant/29762/MediaFiles/dd9372b3-958f-4295-9d90-b78bd6e25d6256uW5bGP6KeG6aKRLm1wNA==", | ||
+ | "secret": "FUNXqhIZEeyHRyM6cNo2pkf8p1g18YHIIVtPfkHst5LV8hUv", | ||
+ | "filename": "竖屏视频.mp4", | ||
+ | "type": "file", | ||
+ | "file_length": 0 | ||
+ | }, | ||
+ | "ext": {} | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | 5.视频 video | ||
+ | { | ||
+ | "eventId": "05f38310-1219-11ec-9d15-f9ee668587e3", | ||
+ | "timestamp": 1631265922519, | ||
+ | "event": "ServiceSessionMessageEvent", | ||
+ | "payload": { | ||
+ | "message": { | ||
+ | "id": "11050e01-0ff9-4953-a3c6-3d513ad1bda7", | ||
+ | "service_session_id": "7f76bdbd-cc65-4e04-a8b8-14c8b7139525", | ||
+ | "msg_id_for_ack": "", | ||
+ | "create_at": 1631265922427, | ||
+ | "from": { | ||
+ | "id": "c6e5df54-ce63-4c8c-8a1d-c1fac4feecc3", | ||
+ | "name": "webim-visitor-9BM6XB77QTE2R7Y7R6VH", | ||
+ | "type": "Visitor" | ||
+ | }, | ||
+ | "to": { | ||
+ | "id": "8215d830-d998-4f54-9d66-eefabcaa36da", | ||
+ | "name": "客服机器人-小鹤", | ||
+ | "type": "Robot" | ||
+ | }, | ||
+ | "origin_type": "webim", | ||
+ | "channel": { | ||
+ | "id": 23700, | ||
+ | "name": "快速创建的关联", | ||
+ | "type": "easemob" | ||
+ | }, | ||
+ | "body": { | ||
+ | "url": "/v1/Tenant/29762/MediaFiles/d97c5f88-8ac3-49d0-91ad-49cd7a66801daGFzYXNkLm1wNA==", | ||
+ | "secret": "BZt4ChIZEeyaUT88YVfVmi4oeK9hT0_UXefA6R87K8NgHxDG", | ||
+ | "filename": "hasasd.mp4", | ||
+ | "size": { | ||
+ | "width": 0, | ||
+ | "height": 0 | ||
+ | }, | ||
+ | "length": 0, | ||
+ | "type": "video", | ||
+ | "file_length": 0 | ||
+ | }, | ||
+ | "ext": {} | ||
+ | } | ||
+ | } | ||
+ | |||
+ | 位置:loc | ||
+ | { | ||
+ | "eventId": "80bb8fd0-121d-11ec-87e8-d927c5568258", | ||
+ | "timestamp": 1631267846567, | ||
+ | "event ": "ServiceSessionMessageEvent ", | ||
+ | "payload": { | ||
+ | "message": { | ||
+ | "id": "42e2e99c-ab2d-430e-b91a-db5607328ed3", | ||
+ | "service_session_id": "776d6be3-cf1a-47d3-aad9-79f5d3288107", | ||
+ | "msg_id_for_ack": "a739f0f352c046748826f16c12ef20af", | ||
+ | "create_at": 1631267846444, | ||
+ | "from": { | ||
+ | "id": "f604a463-e27b-43d1-9273-16927ea1987d", | ||
+ | "name": "3bfbbc20cae9432c9753fc36a96b937334792", | ||
+ | "type": "Visitor" | ||
+ | }, | ||
+ | "to": { | ||
+ | "id": "43d92e7f-f6a0-420e-8868-693ccc8afa6d", | ||
+ | "name": "fs", | ||
+ | "type": "Robot" | ||
+ | }, | ||
+ | "origin_type": "app", | ||
+ | "channel": { | ||
+ | "id": 97244, | ||
+ | "name": "快速创建的关联111", | ||
+ | "type": "easemob" | ||
+ | }, | ||
+ | "body": { | ||
+ | "addr": "IDP教育(海淀分公司)", | ||
+ | "lat": "39.96616243929114", | ||
+ | "lng": "116.32302823756933", | ||
+ | "type": "loc" | ||
+ | }, | ||
+ | "ext": {} | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | 语音:audio | ||
+ | { | ||
+ | "eventId": "78448230-121d-11ec-969a-83b2be719b1c", | ||
+ | "timestamp": 1631267832367, | ||
+ | "event": "ServiceSessionMessageEvent", | ||
+ | "payload": { | ||
+ | "message": { | ||
+ | "id": "b7a3ce9f-0672-4b84-948a-5224504e3e0c", | ||
+ | "service_session_id": "776d6be3-cf1a-47d3-aad9-79f5d3288107", | ||
+ | "msg_id_for_ack": "e0da0acff549417cb5b6d3e9801e577f", | ||
+ | "create_at": 1631267832242, | ||
+ | "from": { | ||
+ | "id": "f604a463-e27b-43d1-9273-16927ea1987d", | ||
+ | "name": "3bfbbc20cae9432c9753fc36a96b937334792", | ||
+ | "type": "Visitor" | ||
+ | }, | ||
+ | "to": { | ||
+ | "id": "43d92e7f-f6a0-420e-8868-693ccc8afa6d", | ||
+ | "name": "fs", | ||
+ | "type": "Robot" | ||
+ | }, | ||
+ | "origin_type": "app", | ||
+ | "channel": { | ||
+ | "id": 97244, | ||
+ | "name": "快速创建的关联111", | ||
+ | "type": "easemob" | ||
+ | }, | ||
+ | "body": { | ||
+ | "url": "/v1/Tenant/2112/MediaFiles/eb3c9468-e3b5-4421-b1de-39aa493f9104YXVkaW8=", | ||
+ | "secret": "eAMMahIdEeyeb8sE833GrNu3csSD9_RsgID97l0uvwrCCQtd", | ||
+ | "filename": "audio", | ||
+ | "length": 1, | ||
+ | "type": "audio" | ||
+ | }, | ||
+ | "ext": {} | ||
+ | } | ||
+ | } | ||
+ | } |