新增IVR树
更新时间: 2022/01/12 06:26:54
新增IVR树
- 可以只创建一颗没有子节点的树,然后再添加子节点与之关联
- 可以直接导入一颗已经关联了子节点的完整的树
URL
- 请求方法:POST
- URL:
http://voip-host/api/v1/voip/cti/app/ivr/tree
请求参数
参数名称 | 类型 | 是否必选 | 示例 | 描述 |
appId | String | 必填 | eca23f68c66d4acfceee77c200200359 | 应用ID。 |
ivrName | String | 必填 | 爱情保卫战IVR | IVR树名称,企业下ivr name不能重名。 |
createUser | String | 选填 | 张三 | 创建者。 |
updateUser | string | 选填 | 李四 | 修改者。 |
version | string | 选填 | 1.0.0 | 版本号。 |
headerNode | json | 选填 | {json} | 头结点对象,用于整棵树导入,如果不需要一次性创建,可以不创建,通过创建子节点来灵活组装整棵树。 |
description | string | 选填 | 第一个ivr | 描述信息。 |
返回参数
参数名称 | 类型 | 示例 | 描述 |
code | int | 0 | 状态码。 |
message | string | OK | 请求成功或者失败描述信息。 |
data | long | 95032 | ivr树的唯一id。 |
示例
不导入整棵树请求示例
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"description": "不直接导入整棵树",
"ivrName": "余额查询简单IVR",
"createUser": "dujun",
"updateUser": "dujun",
"version": "1.0.0"
}
导入整棵树简单请求示例
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"description": "ivr树整个直接导入",
"ivrName": "余额查询简单IVR",
"createUser": "dujun",
"updateUser": "dujun",
"version": "1.0.0",
"headerNode": {
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"description": "第一个节点",
"tailIVRNodeAOs": [
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"description": "第一个节点",
"keyNum": 1,
"tailIVRNodeAOs": [
{
"id": 4025,
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"keyNum": 1,
"nodeType": 8,
"nodeName": "请输入你的4位身份信息,按景号键结束",
"nodeWordType": 0,
"nodeWord": "请输入你的4位身份信息,按景号键结束",
"version": "1.0.0",
"nodeAttr": {
"callBackUrl": "http://voiptest.netease.im/voip/mock/ivr/callback",
"variableName": "accountId",
"minKey": "2",
"maxKey": "4",
"endKey": "#",
"repeat": "3",
"outTime": "30"
}
}
],
"nodeType": 1,
"nodeName": "余额查询请按1",
"nodeWordType": 0,
"nodeWord": "余额查询请按1",
"version": "1.0.0"
}
],
"nodeType": 6,
"nodeName": "欢迎语",
"nodeWordType": 0,
"nodeWord": "欢迎你,请按键导航",
"version": "1.0.0"
}
}
导入整棵完整树请求示例,
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"description": "ivr树整个直接导入1",
"ivrName": "欢迎语-》放音收号-》转坐席",
"createUser": "dujun",
"updateUser": "dujun",
"version": "1.0.0",
"headerNode": {
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "第一个节点",
"description": "第一个节点",
"ivrId": 5027,
"tailNodeIds": [
4118
],
"tailIVRNodeAOs": [
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "第一个节点",
"description": "第一个节点",
"ivrId": 5027,
"keyNum": 0,
"preNodeId": 4117,
"tailNodeIds": [
4119,
4120,
4121,
4122,
4123
],
"tailIVRNodeAOs": [
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "第一个节点",
"description": "第一个节点",
"ivrId": 5027,
"keyNum": 3,
"preNodeId": 4118,
"tailIVRNodeAOs": [],
"nodeStatus": 1,
"nodeType": 6,
"defaultNode": 0,
"nodeName": "听音乐节点",
"nodeWordType": 0,
"nodeWord": "啦啦啦啦啦啦啦啦啦啦,音乐真好听啊,啊啊啊啊啊啊啊啊,唱完了我就挂了哦",
"version": "1.0.0",
"nodeAttr": {},
"ivrEndSign": "",
"ivrStartSign": "",
"hangup": 1,
"checked": false,
"tempId": 4119
},
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "第一个节点",
"description": "第一个节点",
"ivrId": 5027,
"keyNum": 2,
"preNodeId": 4118,
"tailIVRNodeAOs": [],
"nodeStatus": 1,
"nodeType": 2,
"defaultNode": 0,
"nodeName": "转人工坐席,指定一个坐席进行接听",
"nodeWordType": 0,
"nodeWord": "",
"version": "",
"nodeAttr": {
"sipAccount": "10000008000005"
},
"ivrEndSign": "endNode",
"ivrStartSign": "",
"hangup": 0,
"checked": false,
"tempId": 4120
},
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "",
"description": "",
"ivrId": 5027,
"keyNum": 10,
"preNodeId": 4118,
"tailIVRNodeAOs": [],
"nodeStatus": 1,
"nodeType": 5,
"defaultNode": 0,
"nodeName": "重听节点,按*",
"nodeWordType": 0,
"nodeWord": "",
"version": "1.0.0",
"nodeAttr": {},
"ivrEndSign": "",
"ivrStartSign": "",
"hangup": 0,
"checked": false,
"tempId": 4121
},
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "",
"description": "",
"ivrId": 5027,
"keyNum": 11,
"preNodeId": 4118,
"tailIVRNodeAOs": [],
"nodeStatus": 1,
"nodeType": 4,
"defaultNode": 0,
"nodeName": "返回上一层请按#",
"nodeWordType": 0,
"nodeWord": "",
"version": "1.0.0",
"nodeAttr": {},
"ivrEndSign": "",
"ivrStartSign": "",
"hangup": 0,
"checked": false,
"tempId": 4122
},
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "",
"description": "",
"ivrId": 5027,
"keyNum": 1,
"preNodeId": 4118,
"tailNodeIds": [
4124
],
"tailIVRNodeAOs": [
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "",
"description": "",
"ivrId": 5027,
"keyNum": 0,
"preNodeId": 4123,
"tailNodeIds": [
4127,
4125,
4128
],
"tailIVRNodeAOs": [
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "",
"description": "",
"ivrId": 5027,
"keyNum": 5,
"preNodeId": 4124,
"tailNodeIds": [
4126
],
"tailIVRNodeAOs": [],
"nodeStatus": 1,
"nodeType": 6,
"defaultNode": 0,
"nodeName": "你的银行卡余额",
"nodeWordType": 0,
"nodeWord": "你的银行卡余额是${money}元",
"version": "1.0.0",
"nodeAttr": {},
"ivrEndSign": "",
"ivrStartSign": "",
"hangup": 0,
"checked": false,
"tempId": 4127
},
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "",
"description": "",
"ivrId": 5027,
"keyNum": 3,
"preNodeId": 4124,
"tailNodeIds": [
4126
],
"tailIVRNodeAOs": [
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "",
"description": "",
"ivrId": 5027,
"keyNum": 1,
"preNodeId": 4125,
"tailNodeIds": [
4118
],
"tailIVRNodeAOs": [],
"nodeStatus": 1,
"nodeType": 12,
"defaultNode": 0,
"nodeName": "任意节点,跳转到前面几层的节点",
"nodeWordType": 0,
"nodeWord": "",
"version": "1.0.0",
"nodeAttr": {},
"ivrEndSign": "",
"ivrStartSign": "",
"hangup": 0,
"checked": false,
"tempId": 4126
}
],
"nodeStatus": 1,
"nodeType": 6,
"defaultNode": 0,
"nodeName": "播放水费余额",
"nodeWordType": 0,
"nodeWord": "你的水费余额是${money}元",
"version": "1.0.0",
"nodeAttr": {},
"ivrEndSign": "",
"ivrStartSign": "",
"hangup": 0,
"checked": false,
"tempId": 4125
},
{
"appId": "776c3a0f2a7b3f3c6cff9ba0a6ecd445",
"ext1": "",
"description": "",
"ivrId": 5027,
"keyNum": 4,
"preNodeId": 4124,
"tailNodeIds": [
4126
],
"tailIVRNodeAOs": [],
"nodeStatus": 1,
"nodeType": 6,
"defaultNode": 0,
"nodeName": "播放电费费余额",
"nodeWordType": 0,
"nodeWord": "你的电费余额是${money}元",
"version": "1.0.0",
"nodeAttr": {},
"ivrEndSign": "",
"ivrStartSign": "",
"hangup": 0,
"checked": false,
"tempId": 4128
}
],
"nodeStatus": 1,
"nodeType": 11,
"defaultNode": 0,
"nodeName": "余额判断节点",
"nodeWordType": 0,
"nodeWord": "",
"version": "1.0.0",
"nodeAttr": {
"judgeSourceValue": "2",
"targetNodes": {
"<": 4127,
"=": 4125,
">": 4128
}
},
"ivrEndSign": "",
"ivrStartSign": "",
"hangup": 0,
"checked": false,
"tempId": 4124
}
],
"nodeStatus": 0,
"nodeType": 8,
"defaultNode": 0,
"nodeName": "请输入你的4位身份信息,按景号键结束",
"nodeWordType": 0,
"nodeWord": "请输入你的4位身份信息,按景号键结束",
"version": "1.0.0",
"nodeAttr": {
"callBackUrl": "http://voiptest.netease.im/voip/mock/ivr/callback",
"variableName": "accountId",
"minKey": "2",
"maxKey": "4",
"endKey": "#",
"repeat": "3",
"outTime": "30"
},
"ivrEndSign": "",
"ivrStartSign": "",
"hangup": 0,
"checked": false,
"tempId": 4123
}
],
"nodeStatus": 1,
"nodeType": 1,
"defaultNode": 0,
"nodeName": "余额查询请按1,转人工坐席请按2,听音乐请按3,从听请按心号键,返回上一层菜单请按景号键",
"nodeWordType": 0,
"nodeWord": "余额查询请按1,转人工坐席请按2,听音乐请按3,从听请按心号键,返回上一层菜单请按景号键",
"version": "1.0.0",
"nodeAttr": {
"repeat": "2",
"outTime": "10"
},
"ivrEndSign": "",
"ivrStartSign": "",
"hangup": 0,
"checked": false,
"tempId": 4118
}
],
"nodeStatus": 0,
"nodeType": 6,
"defaultNode": 0,
"nodeName": "欢迎语",
"nodeWordType": 0,
"nodeWord": "1,欢迎你,请按键导航",
"version": "1.0.0",
"nodeAttr": {},
"ivrEndSign": "",
"ivrStartSign": "startNode",
"hangup": 0,
"tempId": 4117
}
}
正常返回示例
{
"code": 0,
"message": "OK",
"data": 95032
}
此文档是否对你有帮助?