该接口是优音云客服提供给第三方编写接口的接口规范.
1、服务地址
由第三方提供一个可以公网访问的地址,支持http/https, 接口地址不限定。提供好后,在IVR里配置。
测试环境:https://domain.thirdpart.com/
2、接口
2.1 web端配置时校验请求
- 说明:主要用于前端配置页面做请求校验接口返回值是否合法
- 地址: /rec
- 方法: POST
请求头
序号 | 类型 | 值 | 说明 |
---|---|---|---|
1 | Content-Type | application/json | json |
请求体
序号 | 键值 | 类型 | 说明 |
---|---|---|---|
1 | tenantid | String |
请求体示例
POST /thirdpart/data/rec01 HTTP/1.1
User-Agent: PostmanRuntime/7.29.2
Accept: */*
Postman-Token: 447d7b9b-cde4-4b35-9857-87216bba313a
Host: localhost:28980
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: application/json
Content-Length: 9
tenantid=
返回值示例(成功)
{
"tips4": "aaa",
"tips5": "是否有权限查询快递",
"tips6": "条件备注6",
"tips1": "本月消费额度",
"tips2": "账户余额",
"agents": [
"8000",
"8001",
"8002"
],
"tips3": "发送快递件数",
"sound1": 123,
"sound2": -1,
"sound3": 15666,
"sound4": 235.55,
"condition5": "true",
"condition6": "false"
},
"rtnmsg": "success",
"rtncode": 200
}
2.2正式通信平台请求接口
- 说明:通信平台发起的请求
- 地址: /rec
- 方法: POST
请求头
序号 | 类型 | 值 | 说明 |
---|---|---|---|
1 | Content-Type | application/json | json |
请求体
序号 | 键值 | 类型 | 说明 |
---|---|---|---|
1 | tenantid | String | 租户id |
2 | sessionid | String | 呼叫会话唯一id |
3 | ani | String | 来电主叫号码 |
4 | dnis | String | 来电被叫号码 |
5 | dtmf | String | 主叫用户按键 |
请求体示例
POST /thirdpart/data/rec01 HTTP/1.1
Content-Type: application/json
User-Agent: PostmanRuntime/7.29.2
Accept: */*
Postman-Token: b4e83c2f-25e5-45fa-8493-c9e5ce9bd30b
Host: localhost:28980
Accept-Encoding: gzip, deflate, br
Connection: keep-alive Content-Length: 189
{"tenantid":"租户id 设置-开发者中心-开发者凭证-租户ID","sessionid":"呼叫会话唯一 id","ani":"来电主叫号码","dnis":"来电被叫号码","dtmf":"主叫用户按键"}
返回值示例(成功)
{
"data": {
"tips4": "aaa",
"tips5": "是否有权限查询快递",
"tips6": "条件备注6",
"tips1": "本月消费额度",
"tips2": "账户余额",
"agents": [
"8000",
"8001",
"8002"
],
"tips3": "发送快递件数",
"sound1": 123,
"sound2": -1,
"sound3": 15666,
"sound4": 235.55,
"condition5": "true",
"condition6": "false"
},
"rtnmsg": "success",
"rtncode": 200
}
附录
1)约定俗成
- 比如实现主叫查询余额,那么可以 返回时”tips1”: “本月消费额度” “sound1”: 为余额数, IVR配置校验 通过后,在后续节点可以拿到变量,变量名称 本月消费额度 来实现播放对应余额
- 比如要实现不同case播放对应语音,那么可以 返回时”tips1”: “返回码” “sound1”: “200”,或者201 等任意整形。在后续节点可以拿到变量,变量名称 返回码 来用条件路由节点播放对应语音
- 还比如要根据对应业务控制动态一组坐席来接听等等业务。
文档更新时间: 2024-05-14 09:25 作者:admin