新增静默规则
场景描述
新增静默规则。
接口方法
POST
接口URI
https://域名/apiaccess/CCSQM/rest/ccisqm/v1/silencerule/createSilenceRule,例如域名是service.besclouds.com
请求说明
| 序号 | 名称 | 参数类型 | 是否必选 | 说明 |
|---|---|---|---|---|
| 1 | Content-Type | string | False | 固定填 application/json; charset=UTF-8。 |
| 2 | x-app-key | string | False | appKey标识 |
| 3 | Authorization | string | True | 鉴权字段,内容格式为: Bearer +tokenByAKSK接口的返回值中AccessToken(Bearer后有空格) |
| 4 | x-UserId | string | True | 操作员标识 可在登录后,进入员工管理页面,查看接口返回的userId |
| 序号 | 名称 | 参数类型 | 是否必选 | 说明 |
|---|---|---|---|---|
| 1.1 | setting | object | False | 静默规则基本信息 |
| 1.1.1 | name | string | True | 规则名称 |
| 1.1.2 | score | number | True | 规则分数: 取值范围:1-100 |
| 1.1.3 | seconds | number | True | 连续静默秒数 取值范围:1-2147483647 |
| 1.1.4 | times | number | True | 静默次数 取值范围:1-2147483647 |
| 1.1.5 | other | object | False | 触发条件 |
| 1.1.5.1 | call_from | number | False | 单通通话开始时间:时间戳,单位秒 |
| 1.1.5.2 | call_end | number | False | 单通通话结束时间:时间戳,单位秒 |
| 1.2 | exception | object | False | 例外设定 |
| 1.2.1 | before | object | False | 静默之前的例外设定 |
| 1.2.1.1 | staff | array[string] | False | 座席说的句子标识集合 |
| 1.2.1.2 | customer | array[string] | False | 客户说的句子标识集合 |
| 1.2.2 | after | object | False | 静默之后的例外设定 |
| 1.2.2.1 | staff | array[string] | False | 座席说的句子标识集合 |
响应说明
- 响应状态码: 200
| 序号 | 名称 | 参数类型 | 是否必选 | 说明 |
|---|---|---|---|---|
| 1.1 | silence_id | string | False | 静默规则标识 |
| 1.2 | resultCode | string | False | 返回码,0405000表示成功,其他表示失败 |
| 1.3 | resultDesc | string | False | 返回描述 |
- 响应状态码: 401
未授权:1. 请确认是否购买了相关服务。 2. 请联系客服人员检查您账号的当前状态。
- 响应状态码: 404
请求的内容未找到:请检查请求的路径。
- 响应状态码: 409
规则名称重复
- 响应状态码: 500
业务失败:请依次确认您请求中各参数的取值。
错误码
无。
报文样例
- 场景描述:新增静默规则
x-app-key:************************************ X-UserID:1611917095665261978 Authorization:Bearer ********************************
请求参数:
{ "setting": { "name": "test34", "score": 4, "seconds": 5, "times": 4, "other": { "call_from": 1623911884, "call_end": 1624430285 } }, "exception": { "before": { "staff": ["14161"], "customer": [] }, "after": {} } }响应参数:
{ "silence_id": "922987647176019968", "resultCode": "0405000", "resultDesc": "操作成功" }