Gọi tự động sử dụng callBot
API gọi tự động
Gọi tự động tới một số điện thoại khách hàng
POST
[URL]/api/call_bot/execute_by_phone
Tạo một phiên callBot với tham số đầu vào là một kịch bản callbot và 1 danh sách các thông tin liên hệ
Query Parameters
cid*
String
Số hotline hay số SIP sẽ thực hiện chạy phiên.
Nếu gọi nội mạng, truyền giá trị rỗng.
Headers
Content-type
string
application/json
Authorization
string
Access Token Bearer token
x-api-key*
String
API key được cung cấp
Request Body
speed
number
Tốc độ đọc.Từ chậm : -3. Đến nhanh : 3.
Mặc định là 0
voice
string
Giọng đọc, có thể một trong các giá trị sau + "northern_female_ngocanh" : Ngọc Anh
+ "southern_female_honganh" : Hồng Anh
+ "southern_male_tienhuy" : Tiến HuyQ
cid
string
Đầu số dùng để gọi tự động. Nếu không truyền, mặc định ưu tiên gọi nội mạng
name
string
Tên của phiên gọi tự động
num_retry
Integer
Số lần gọi lại khi không nghe máy. Mặc định là 0
num_per_call
Integer
Số cuộc gọi mỗi lần. Mặc định là 15
distance_per_call
Integer
Khoảng cách thời gian , giữa các lần gọi. Mặc định là 30s
distance_retry
Integer
Khoảng cách giữa các lần gọi lại . Mặc định là 0
bot_script_id
String
Id kịch bản, được lấy ở danh sách trong hệ thống
send_time
Number
Thời gian thực hiện phiên (milisecond)
Nếu không truyền giá trị, sẽ thực hiện gọi ngay
contact_info*
Array
Danh sách contact cần gọi
Giá trị:
{
"phone":"0395187***",
"email":"",
"ext_contact_code":"",
"mapping_variables":{
"gender1":"Anh",
"full_name":"Trần Văn Tiến",
"address":"Phan Huy Ích",
"mail":"tientv@***.com",
"birthday":"11/10/19***"
}
}
phone : Số điện thoại KH
email: Email khách hàng nếu có
ext_contact_code : Mã KH bên thứ 03
mapping_variables : Hỗ trợ cho phép truyền biến động từ đối tác. Danh sách và chi tiết biến động cần truyền trong (API lấy danh sách KB Callbot)
ext_session_id
String
Mã định danh phiên bên ngoài CRM (tránh trường hợp lên trùng phiên do double summit)
Nếu có giá trị field này, mới kiểm tra trùng
{
"instance_id": "stg",
"payload": {
"bot_script_id": "653b155db0f794**********",
"autocall_id": "6552de1891be25**********"
},
"instance_version": "1.2.164",
"key_enabled": false,
"status_code": 9999
}
Lấy danh sách kịch bản bot
GET
[URL]/api/call_bot/script/list
Lấy danh sách kịch bản callBot do khách hàng thiết lập
{
"instance_id": "stg",
"payload": [
{
"id": "64915bc76a690c0edad14723",
"name": "Thông báo điểm thi",
"variables": [
{
"field_name": "tên thí sinh",
"field_code": "tên thí sinh",
"field_value": "",
"field_type": "",
"type": "",
"is_dynamic_attribute": true
},
{
"field_name": "Toán",
"field_code": "uB131frQEU",
"field_value": "",
"field_type": "single_text",
"type": "CONTACT",
"is_dynamic_attribute": true
}
]
},
{
"id": "64a922f61900954f5419d503",
"name": "Cảnh báo từ khóa tiêu cực",
"variables": [
{
"field_name": "",
"field_code": "nhanvien",
"field_value": "",
"field_type": "",
"type": "",
"is_dynamic_attribute": true
},
{
"field_name": "",
"field_code": "tenkhachhang",
"field_value": "",
"field_type": "",
"type": "",
"is_dynamic_attribute": true
},
{
"field_name": "",
"field_code": "sodienthoai",
"field_value": "",
"field_type": "",
"type": "",
"is_dynamic_attribute": true
},
{
"field_name": "",
"field_code": "thoigiangoi",
"field_value": "",
"field_type": "",
"type": "",
"is_dynamic_attribute": true
},
{
"field_name": "",
"field_code": "diem",
"field_value": "",
"field_type": "",
"type": "",
"is_dynamic_attribute": true
}
]
}
],
"instance_version": "1.2.164",
"key_enabled": false,
"status_code": 9999
}
Lấy chi tiết kịch bản callbot
GET
[URL]/api/call_bot/getById/:id
Lấy chi tiết kịch bản callBot do khách hàng thiết lập
Query Parameters
id*
String
Id kịch bản callbot
Headers
Content-type
string
application/json
Authorization
string
Access Token Bearer token
x-api-key*
String
API key được cung cấp
{
"instance_id": "stg",
"payload": {
"id": "6719b4d011f78633e2ea14f6",
"uuid": "bb748c43-2686-4896-9f89-17109be4b4bc",
"tenant_id": "62d8b0d1a89196134b65409b",
"name": "[GiangHT] - Test",
"variables": [],
"collect_info_variables": [
{
"entity_type_code": "omi_entity_datetime",
"variable_code": "uFyduVr7IS",
"variable_name": "datetime"
}
],
"connections": [
{
"sourceHandle": "1",
"animated": false,
"style": {
"strokeWidth": 3,
"stroke": "#00B1FF"
},
"id": "reactflow__edge-SJ5lEmGXbg1-oy368JdCFu1",
"source": "SJ5lEmGXbg",
"type": "custom",
"targetHandle": "1",
"target": "oy368JdCFu"
},
{
"sourceHandle": "COLLECT_INFO",
"conditionId": "f1TiwGREhl",
"animated": true,
"style": {
"strokeWidth": 3,
"stroke": "#6c63ff"
},
"id": "reactflow__edge-oy368JdCFuCOLLECT_INFO-oy368JdCFuCOLLECT_INFO1",
"source": "oy368JdCFu",
"type": "custom",
"targetHandle": "1",
"target": "oy368JdCFuCOLLECT_INFO"
},
{
"sourceHandle": "CUSTOMER_RESPONSE",
"animated": false,
"style": {
"strokeWidth": 3,
"stroke": "#1e3150"
},
"id": "reactflow__edge-oy368JdCFuCUSTOMER_RESPONSE-AyvmTCJ6k31",
"source": "oy368JdCFu",
"type": "custom",
"targetHandle": "1",
"target": "AyvmTCJ6k3"
}
],
"nodes": [
{
"id": "SJ5lEmGXbg",
"node_type": "BEGIN",
"next_nodes": [
"oy368JdCFu"
],
"is_collapse": false
},
{
"id": "Qh40Fk58bt",
"node_type": "CONDITION",
"next_nodes": [
"AyvmTCJ6k3"
],
"condition_type": "CUSTOMER_RESPONSE",
"is_collapse": false
},
{
"id": "oy368JdCFu",
"node_type": "STAFF",
"next_nodes": [
"Qh40Fk58bt"
],
"template_content": "Alo",
"return_template_content": "",
"wrong_response_content": "",
"customer_response_delay": 10000,
"actions": [
{
"id": "DJvZNqzMP2",
"type": "COLLECT_INFO",
"data": {
"variables": [
{
"entity_type_code": "omi_entity_datetime",
"variable_code": "uFyduVr7IS",
"variable_name": "datetime"
}
]
}
}
],
"is_collapse": false
},
{
"id": "AyvmTCJ6k3",
"node_type": "STAFF",
"template_content": "ok",
"return_template_content": "",
"wrong_response_content": "",
"customer_response_delay": 10000,
"is_collapse": false
}
],
"org_nodes": [
{
"data": {
"type": "BEGIN",
"collapseObj": {
"NEXT_STEP": {
"isCollapse": false
}
}
},
"width": 332,
"id": "SJ5lEmGXbg",
"position": {
"x": 200,
"y": 100
},
"type": "BEGIN",
"height": 120
},
{
"data": {
"variables": [],
"objVariables": {
"uFyduVr7IS": "datetime"
},
"isSortIndex": false,
"notResponseTime": 10000,
"responseTime": 10000,
"count": 1,
"collectionInfo": [
{
"entityCode": "omi_entity_datetime",
"variableName": "datetime",
"variableCode": "uFyduVr7IS",
"label": "Thời gian ngày tháng",
"value": "634d6c3042d14f7ec2df05e4"
}
],
"type": "STAFF",
"content": "Alo",
"speed": {
"label": "speedRead.normal",
"value": 1
},
"collapseObj": {
"NEXT_STEP": {
"isCollapse": false
},
"COLLECT_INFO": {
"isCollapsible": true,
"isCollapse": false
},
"CUSTOMER_RESPONSE": {
"isCollapsible": true,
"isCollapse": false
}
},
"audio_file": null,
"typeSay": "text",
"activeIdx": 0,
"conditions": [
{
"conditionId": "f1TiwGREhl",
"id": "COLLECT_INFO",
"type": "COLLECT_INFO"
},
{
"conditionId": "Qh40Fk58bt",
"id": "CUSTOMER_RESPONSE",
"type": "CUSTOMER_RESPONSE"
}
],
"subContent": "Alo"
},
"width": 332,
"id": "oy368JdCFu",
"position": {
"x": "657.4222",
"y": "117.88900000000001"
},
"type": "STAFF",
"height": 246
},
{
"data": {
"collectionInfo": [
{
"entityCode": "omi_entity_datetime",
"variableName": "datetime",
"variableCode": "uFyduVr7IS",
"label": "Thời gian ngày tháng",
"value": "634d6c3042d14f7ec2df05e4"
}
],
"count": 1,
"type": "COLLECT_INFO",
"collapseObj": {
"NEXT_STEP": {
"isCollapse": false
}
}
},
"width": 332,
"id": "oy368JdCFuCOLLECT_INFO",
"position": {
"x": "1154.5595999999998",
"y": "-145.52140000000003"
},
"type": "COLLECT_INFO",
"height": 264
},
{
"data": {
"variables": [],
"objVariables": {},
"notResponseTime": 10000,
"responseTime": 10000,
"count": 2,
"collectionInfo": [],
"type": "STAFF",
"content": "ok",
"speed": {
"label": "speedRead.normal",
"value": 1
},
"collapseObj": {
"NEXT_STEP": {
"isCollapse": false
}
},
"audio_file": null,
"typeSay": "text",
"activeIdx": 0,
"subContent": "ok"
},
"width": 332,
"id": "AyvmTCJ6k3",
"position": {
"x": "1312.8604000000003",
"y": "136.505"
},
"type": "STAFF",
"height": 172
}
],
"is_draft": true,
"created_date": 1729737934640,
"last_updated_date": 1729737934674,
"last_publish_time": 1729737934640,
"created_by": {
"id": "62d8b0d2a89196134b65409e",
"name": "Hello Thiên Quân",
"contact_id": "62d8b0f47f167c3ca9fab2d3"
},
"public_key": "70057c3f-0221-4685-ba77-c4e104e6bbee",
"last_updated_by": {
"id": "62d8b0d2a89196134b65409e",
"name": "Hello Thiên Quân",
"contact_id": "62d8b0f47f167c3ca9fab2d3"
},
"is_deleted": false,
"collect_authentication_data": "NONE",
"system_intent_ids": [],
"system_entity_type_ids": [
"634d6c3042d14f7ec2df05e4"
],
"version": 1,
"is_newest_version": false,
"layouts": [
{
"field_code": "uFyduVr7IS",
"field_name": "datetime",
"view_option": "ONLY_VALUE",
"index": 1
}
],
"is_publish": true,
"custom_variables": [],
"classifies": [],
"variables_with_order": [],
"speed": 1,
"voice": "northern_female_ngocanh"
},
"instance_version": "1.2.164",
"key_enabled": false,
"status_code": 9999
}
Last updated
Was this helpful?