API AutoTelesale
1.1. Kịch bản
i. API tạo kịch bản
URI: http://crm.abc.vn/api/script.php
Method: POST
INPUT: {
"script_id": "127", //Mã kịch bản là duy nhất
"script_name": "HellowWorld",
"script_link": "",
"script_type": "2", //AutoTeleSale
"script_control": "1", // tạo kịch bản
"speed": "0", // tốc độ gọi dự kiến
"range": "0", // khoảng cách giữa 2 đợt call
"list_exten": "201,202,203", // danh sách máy lẻ có thể có nhận cuộc gọi
"time_callbegin": "2020-08-03 00:00:00",
"time_callend": "2020-08-04 00:00:00",
}
RESPONSE: {"message":"success","resultCode":100}
ii. API xóa kịch bản
URI: http://crm.abc.vn/api/script.php
Method: POST
INPUT: {
"script_id": "125",
"script_control": "0" //xóa kịch bản
}
RESPONSE: {"message":"success","resultCode":100}
iii. API hiển thị các kịch bản đã xây dựng
URI: http://crm.abc.vn/api/script.php
Method: POST
INPUT: {
"script_id": "125",
"script_control": "0" //xóa kịch bản
}
RESPONSE: {"message":"success","resultCode":100}
1.2. Chiến dịch
i. API tạo chiến dịch
URI: http://crm.abc.vn/api/autotelesale.php
Method: POST
INPUT: {
"script_id": "127", // mã kịch bản (phía trên)
"phones": "0961166133,0973260058" // danh sách số điện thoại
}
RESPONSE: {
"message": "success",
"resultCode": 100,
"idcamp": 1596468281 // id chiến dịch
}
ii. API dừng chiến dịch
URI: http://crm.abc.vn/api/autotelesale_control.php
Method: POST
INPUT: {
"idcamp": "1596467551",
"phone": "",
"flag": "0" // dừng
}
RESPONSE: {"message":"success","resultCode":100}
iii. API kích hoạt lại chiến dịch
URI: http://crm.abc.vn/api/autotelesale_control.php
Method: POST
INPUT: {
"idcamp": "1596467551",
"phone": "",
"flag": "1" // Kích hoạt lại
}
RESPONSE: {"message":"success","resultCode":100}
iv. API xóa chiến dịch
URI: http://crm.abc.vn/api/autotelesale_control.php
Method: POST
INPUT: {
"idcamp": "1596467551",
"phone": "",
"flag": "-1" // xóa
}
RESPONSE: {"message":"success","resultCode":100}
1.3. Report
URI: http://crm.abc.vn/api/autotelesale_report.php
Method: POST
INPUT: {
"idcamp": "1596467551",
"phone": ""
}
RESPONSE:
[{"id":"2","id_chiendich":"1596467551","sdt":"0973260058","mang":"1","script_id":"0","icallsummax":"1","istart":"0","icalled":"0","disposition":null,"tg_callbegin":"2020-08-03 00:00:00","tg_callbegin_c":null,"tg_call":"2020-08-03 00:00:00","tg_callend":"0000-00-00 00:00:00","icallnumber":"0","path":"\/autocall\/script\/1596456995","list_exten":"201,202,203","duration":null,"billsec":null,"starttime":null,"cause":null,"keypress":null}]