任务相关
任务创建初始化
接口:GET /v1/task/create
返回
{
"meta": {
"enum_disable_dial_timegroup": [{
"uuid": "146979fe-3864-4817-ad76-13b37f43bb1c", // 禁呼时间id
"name": "休息时间"
}, {
"uuid": "cf44b8fc-a60f-499e-a5c8-5340963a56a3",
"name": "午休时间"
}, {
"uuid": "a6c20127-1199-4b87-bffa-75ed3e368fd0",
"name": "早会时间"
}],
"caller_line_list": [{ // 线路列表
"name": "尊享ai.zxycall.com一",
"value": "37d73edf-4628-4cf1-8beb-758433fd0aab", // 使用线路id
"residue": 1, // 剩余并发,只能选大于1的
"call_line": 1, // 线路总并发
"available_at": "2019-12-18 00:00:00",
"call_number": "13530525008" // 主叫号码
}],
"max_recycle_limit": "50", // 可设置最大重拨次数 [弃用,使用重呼规则]
"auto_recycle_rules": [{ // 重呼规则
"id": 1, // 重呼规则id
"name": "测试重呼规则", // 重呼规则名称
"remark": "test", // 重呼规则备注
"status": true, // 重呼规则状态
}],
"customer_service": [{ // 客服组
"id": 21,
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"name": "组2",
"created_at": "2019-05-10 16:03:09",
"updated_at": "2019-05-15 18:01:40",
"caller_line_id": "37d73edf-4628-4cf1-8beb-758433fd0aab", // 使用的转接线路,只能不为null的
"status": 1 // 是否可用,必须选为1的
}],
"outbound_group": [{ // 话术分组
"id": 390, // 话术分组ID
"name": "测试话术【复制】", // 话术分组名称
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"debug": true, // 是否开启调试模式,开启后全部话术走tts
"deleted_at": null,
"created_at": "2019-02-24 14:24:23",
"updated_at": "2019-02-24 14:24:23",
"link_word_group_id": null, // 使用的衔接词组id
"tag_scene_id": null, // 关联的业务场景id
"default": false
}]
}
}
部分字段解释
caller_line_list使用的线路列表,只能使用residue大于1的
enum_disable_dial_timegroup禁呼时间段列表
任务创建
接口:POST /v1/task
data
参数 类型 示例 解释 required
caller_line_id string 37d73edf-4628-4cf1-8beb-758433fd0aab 使用线路列表caller_line_list的value yes
customer_service_id int 1 使用客服组的id no
destination_extension int 297 使用话术分组的id yes
disable_dial_timegroup string 146979fe-3864-4817-ad76-13b37f43bb1c 禁用呼叫时间的uuid yes
maximumcall int 1 并发数(不得超过选用线路的residue) yes
name string 测试任务 任务名称 yes
random_assignment_number int 0 固定为0 yes
recycle_limit int 1 呼叫失败最大重拨次数[弃用,有且只能为0] yes
remark string 第一个任务 任务描述 no
_originate_timeout int 60 拨号超时 yes
call_pause_second int 10 每通电话的呼叫间隔,单并发的建议间隔10秒,多并发可选择0秒 yes
auto_recycle_rule_id int 1 重呼规则id yes
部分字段解释
话术分组列表需要自己请求接口,在其他中;
客服列表需要自己请求接口,在其他中;
返回
{
"start": 0, // 此任务的实体
"alter_datetime": "2020-03-06 22:38:02",
"destination_dialplan": "XML",
"destination_context": "default",
"originate_variables": "{execute_on_media=start_da2}",
"maximumcall": 1,
"recycle_limit": 0,
"name": "测试",
"remark": "测试",
"destination_extension": 1197,
"disable_dial_timegroup": "146979fe-3864-4817-ad76-13b37f43bb1c",
"random_assignment_number": 0,
"caller_line_id": "83f180c4-00f3-4aaa-bc41-6cba4493e892",
"call_pause_second": 10,
"_originate_timeout": 60,
"customer_service_id": 21,
"auto_recycle_rule_id": 103,
"_origination_caller_id_number": "13530525008",
"dial_format": "user/admin",
"call_notify_url": "http://127.0.0.1:81/api/hangup_notify",
"call_notify_type": 2,
"uuid": "02f5bb4a-8a09-4eae-8969-6c2a3732f774",
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"create_datetime": "2020-03-06 22:38:02",
"start_str": "暂停",
"group_str": "测试",
"progress_bar": { // 此任务当前进度
"total": 0,
"progress": 0,
"percent": 0
},
"group": { // 此任务使用的话术分组
"id": 1197,
"name": "测试",
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"debug": true,
"deleted_at": null,
"created_at": "2020-03-06 15:17:41",
"updated_at": "2020-03-06 15:17:41",
"link_word_group_id": null,
"tag_scene_id": null,
"default": true
}
}
任务修改
接口:PUT /v1/task/{task_id}
参数同创建任务
外呼任务列表
接口:GET /v1/task
返回
{
"data": [{
"uuid": "dfc36b34-b398-4f6b-b263-cd64c53e5185", // 任务id
"name": "测试任务",
"create_datetime": "2019-05-07 15:15:40",
"alter_datetime": "2019-05-17 10:58:58",
"start": 0, // 任务状态,1开启|0暂停
"maximumcall": 1, // 最大并发呼叫量
"call_per_second": 10,
"recycle_limit": 1, // 呼叫失败最大重拨次数 [启用,使用重呼规则]
"random_assignment_number": 0,
"disable_dial_timegroup": "146979fe-3864-4817-ad76-13b37f43bb1c", // 禁呼时间组ID
"destination_extension": 447, // 使用话术分组ID
"destination_dialplan": "XML",
"destination_context": "default",
"scheduling_policy_ratio": null,
"scheduling_queue": null,
"dial_format": "user/admin",
"domain": null,
"remark": null,
"sort": 1,
"originate_variables": "{execute_on_media=start_da2}",
"_originate_timeout": 60,
"_origination_caller_id_number": "13530525008", // 主叫号码
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"caller_line_id": "37d73edf-4628-4cf1-8beb-758433fd0aab", // 使用线路ID
"customer_service_id": null, // 使用客服组ID
"auto_recycle_rule_id": 103, //重呼规则ID
"call_notify_url": "http://127.0.0.1:81/api/hangup_notify",
"call_notify_type": 2,
"call_pause_second": 10, //呼叫间隔(秒)
"start_str": "暂停",
"group_str": "test",
"progress_bar": { // 任务进度 [弃用,需要专门请求 任务拨打进度 接口]
"total": 2,
"progress": 2,
"percent": 100
},
"caller_line": { //线路
"id": "af69c544-a170-4a2d-b740-20bf66cc7ff4",
"name": "南京-云蝠智能-17361984317",
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"description": null,
"deadline_at": "2020-11-20 00:00:00",
"available_time": 31536000,
"begin_at": "2020-02-28 22:23:24",
"call_line": 1,
"call_line_used": 1,
"call_number_prefix": "17361984317",
"is_call_number_enable": 1,
"is_call_number_prefix_editable": 0,
"dial_string": "user/admin",
"dial_string_mode": 1,
"db_public_id": null,
"db_private_id": null,
"node_ip": "59.111.104.155",
"node_status": "1",
"created_at": "2020-02-28 22:24:48",
"updated_at": "2020-03-04 20:51:03",
"feature": 7
},
"auto_recycle_rule": {
"id": 103,
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"name": "默认",
"remark": "默认",
"status": true,
"created_at": "2020-02-13 10:35:05",
"updated_at": "2020-02-13 10:35:05",
"is_default": true
},
"disable_time_group": {
"uuid": "cf44b8fc-a60f-499e-a5c8-5340963a56a3",
"name": "午休时间",
"domain": "",
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"created_at": null,
"updated_at": null
},
"group": { // 使用话术组
"id": 447,
"name": "test",
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"debug": true,
"deleted_at": null,
"created_at": "2019-03-17 13:14:55",
"updated_at": "2019-03-17 13:14:55",
"default": false
}
}]
}
任务的删除
接口:GET /v1/task/destroy/{task_id}
任务的启动
接口:GET /v1/task/start/{id}
任务暂停
接口:GET /v1/task/stop/{id}
向任务里导入号码
接口:POST /v1/task/import_task_customer/{task_id}
data
{
"customer_info_list": [
{"phone": "18611228822"}, // 电话号码
{"phone": "18611228811"},
{"phone": "18611228800"},
{"phone": "18611228899"}
]
}
任务拨打进度
接口:GET /v1/task/task_progress/{task_id}
返回
{
"code": 200,
"status": "ok",
"message": "获取任务进度成功",
"data": {
"task_id": "772dd881-dcf7-42ee-a32b-b40a0ee5afb7",
"progress": {
"total": 10, //任务下号码总量
"progress": 10, //已经拨打数量
"percent": 100 //进度
}
}
}
重置号码呼叫状态
接口:PUT /v1/task/{task_id}/number_reset
1.data
参数 类型 示例 解释 required
status array [“12”] 筛选你所需要重呼的号码的状态 no
created_at array [“2020-3-10”,“2020-3-10”] 筛选号码导入时间 no
keyword string 12345678901 指定号码 no
2.返回
{
"code": 200,
"status": "ok",
"message": "重呼号码成功",
"data": ""
}
根据任务ID获取标签场景,母标签,标签
接口:GET /v1/task/{task_id}/tag
1.data
参数 类型 示例 解释 required
task_id string qazwsxedc123456 任务ID yes
2.返回
{
"code": 200,
"status": "ok",
"message": "获取标签信息成功",
"data": {
"tag_scene": {
"id": "0e62b98f-a5b9-46f8-ad95-dd18e0bb062e",
"name": "标签场景2",
"description": "我是描述2"
},
"tag_groups": [
{
"id": "1",
"name": "标签组1"
},
{
"id": "4",
"name": "标签组2"
}
],
"tags": [
{
"id": "12",
"name": "测试标签",
"description": "33"
},
{
"id": "20",
"name": "加油",
"description": "加油"
},
{
"id": "11",
"name": "标签2",
"description": "33"
}
]
}
}
通话相关