任務(wù)相關(guān)
任務(wù)創(chuàng)建初始化
接口:GET /v1/task/create
返回
{
"meta": {
"enum_disable_dial_timegroup": [{
"uuid": "146979fe-3864-4817-ad76-13b37f43bb1c", // 禁呼時(shí)間id
"name": "休息時(shí)間"
}, {
"uuid": "cf44b8fc-a60f-499e-a5c8-5340963a56a3",
"name": "午休時(shí)間"
}, {
"uuid": "a6c20127-1199-4b87-bffa-75ed3e368fd0",
"name": "早會(huì)時(shí)間"
}],
"caller_line_list": [{ // 線路列表
"name": "尊享ai.zxycall.com一",
"value": "37d73edf-4628-4cf1-8beb-758433fd0aab", // 使用線路id
"residue": 1, // 剩余并發(fā),只能選大于1的
"call_line": 1, // 線路總并發(fā)
"available_at": "2019-12-18 00:00:00",
"call_number": "13530525008" // 主叫號(hào)碼
}],
"max_recycle_limit": "50", // 可設(shè)置最大重?fù)艽螖?shù) [棄用,使用重呼規(guī)則]
"auto_recycle_rules": [{ // 重呼規(guī)則
"id": 1, // 重呼規(guī)則id
"name": "測(cè)試重呼規(guī)則", // 重呼規(guī)則名稱(chēng)
"remark": "test", // 重呼規(guī)則備注
"status": true, // 重呼規(guī)則狀態(tài)
}],
"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", // 使用的轉(zhuǎn)接線路,只能不為null的
"status": 1 // 是否可用,必須選為1的
}],
"outbound_group": [{ // 話(huà)術(shù)分組
"id": 390, // 話(huà)術(shù)分組ID
"name": "測(cè)試話(huà)術(shù)【復(fù)制】", // 話(huà)術(shù)分組名稱(chēng)
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"debug": true, // 是否開(kāi)啟調(diào)試模式,開(kāi)啟后全部話(huà)術(shù)走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, // 關(guān)聯(lián)的業(yè)務(wù)場(chǎng)景id
"default": false
}]
}
}
部分字段解釋
caller_line_list使用的線路列表,只能使用residue大于1的
enum_disable_dial_timegroup禁呼時(shí)間段列表
任務(wù)創(chuàng)建
接口:POST /v1/task
data
參數(shù) 類(lèi)型 示例 解釋 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 使用話(huà)術(shù)分組的id yes
disable_dial_timegroup string 146979fe-3864-4817-ad76-13b37f43bb1c 禁用呼叫時(shí)間的uuid yes
maximumcall int 1 并發(fā)數(shù)(不得超過(guò)選用線路的residue) yes
name string 測(cè)試任務(wù) 任務(wù)名稱(chēng) yes
random_assignment_number int 0 固定為0 yes
recycle_limit int 1 呼叫失敗最大重?fù)艽螖?shù)[棄用,有且只能為0] yes
remark string 第一個(gè)任務(wù) 任務(wù)描述 no
_originate_timeout int 60 撥號(hào)超時(shí) yes
call_pause_second int 10 每通電話(huà)的呼叫間隔,單并發(fā)的建議間隔10秒,多并發(fā)可選擇0秒 yes
auto_recycle_rule_id int 1 重呼規(guī)則id yes
部分字段解釋
話(huà)術(shù)分組列表需要自己請(qǐng)求接口,在其他中;
客服列表需要自己請(qǐng)求接口,在其他中;
返回
{
"start": 0, // 此任務(wù)的實(shí)體
"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": "測(cè)試",
"remark": "測(cè)試",
"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": "測(cè)試",
"progress_bar": { // 此任務(wù)當(dāng)前進(jìn)度
"total": 0,
"progress": 0,
"percent": 0
},
"group": { // 此任務(wù)使用的話(huà)術(shù)分組
"id": 1197,
"name": "測(cè)試",
"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
}
}
任務(wù)修改
接口:PUT /v1/task/{task_id}
參數(shù)同創(chuàng)建任務(wù)
外呼任務(wù)列表
接口:GET /v1/task
返回
{
"data": [{
"uuid": "dfc36b34-b398-4f6b-b263-cd64c53e5185", // 任務(wù)id
"name": "測(cè)試任務(wù)",
"create_datetime": "2019-05-07 15:15:40",
"alter_datetime": "2019-05-17 10:58:58",
"start": 0, // 任務(wù)狀態(tài),1開(kāi)啟|0暫停
"maximumcall": 1, // 最大并發(fā)呼叫量
"call_per_second": 10,
"recycle_limit": 1, // 呼叫失敗最大重?fù)艽螖?shù) [啟用,使用重呼規(guī)則]
"random_assignment_number": 0,
"disable_dial_timegroup": "146979fe-3864-4817-ad76-13b37f43bb1c", // 禁呼時(shí)間組ID
"destination_extension": 447, // 使用話(huà)術(shù)分組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", // 主叫號(hào)碼
"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, //重呼規(guī)則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": { // 任務(wù)進(jìn)度 [棄用,需要專(zhuān)門(mén)請(qǐng)求 任務(wù)撥打進(jìn)度 接口]
"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": "默認(rèn)",
"remark": "默認(rèn)",
"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": "午休時(shí)間",
"domain": "",
"user_id": "4d99d91c-f5d9-49da-88da-758977cc58a9",
"created_at": null,
"updated_at": null
},
"group": { // 使用話(huà)術(shù)組
"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
}
}]
}
任務(wù)的刪除
接口:GET /v1/task/destroy/{task_id}
任務(wù)的啟動(dòng)
接口:GET /v1/task/start/{id}
任務(wù)暫停
接口:GET /v1/task/stop/{id}
向任務(wù)里導(dǎo)入號(hào)碼
接口:POST /v1/task/import_task_customer/{task_id}
data
{
"customer_info_list": [
{"phone": "18611228822"}, // 電話(huà)號(hào)碼
{"phone": "18611228811"},
{"phone": "18611228800"},
{"phone": "18611228899"}
]
}
任務(wù)撥打進(jìn)度
接口:GET /v1/task/task_progress/{task_id}
返回
{
"code": 200,
"status": "ok",
"message": "獲取任務(wù)進(jìn)度成功",
"data": {
"task_id": "772dd881-dcf7-42ee-a32b-b40a0ee5afb7",
"progress": {
"total": 10, //任務(wù)下號(hào)碼總量
"progress": 10, //已經(jīng)撥打數(shù)量
"percent": 100 //進(jìn)度
}
}
}
重置號(hào)碼呼叫狀態(tài)
接口:PUT /v1/task/{task_id}/number_reset
1.data
參數(shù) 類(lèi)型 示例 解釋 required
status array [“12”] 篩選你所需要重呼的號(hào)碼的狀態(tài) no
created_at array [“2020-3-10”,“2020-3-10”] 篩選號(hào)碼導(dǎo)入時(shí)間 no
keyword string 12345678901 指定號(hào)碼 no
2.返回
{
"code": 200,
"status": "ok",
"message": "重呼號(hào)碼成功",
"data": ""
}
根據(jù)任務(wù)ID獲取標(biāo)簽場(chǎng)景,母標(biāo)簽,標(biāo)簽
接口:GET /v1/task/{task_id}/tag
1.data
參數(shù) 類(lèi)型 示例 解釋 required
task_id string qazwsxedc123456 任務(wù)ID yes
2.返回
{
"code": 200,
"status": "ok",
"message": "獲取標(biāo)簽信息成功",
"data": {
"tag_scene": {
"id": "0e62b98f-a5b9-46f8-ad95-dd18e0bb062e",
"name": "標(biāo)簽場(chǎng)景2",
"description": "我是描述2"
},
"tag_groups": [
{
"id": "1",
"name": "標(biāo)簽組1"
},
{
"id": "4",
"name": "標(biāo)簽組2"
}
],
"tags": [
{
"id": "12",
"name": "測(cè)試標(biāo)簽",
"description": "33"
},
{
"id": "20",
"name": "加油",
"description": "加油"
},
{
"id": "11",
"name": "標(biāo)簽2",
"description": "33"
}
]
}
}
通話(huà)相關(guān)