Live Chat Statistics API
# Live Chat Statistics API
# API Declaration
The "token" param must be contained in the header of the https request when calling the API.
Token is the only global API call credential for the Sobot API open platform. It is used when developers call the business APIs and thus should be properly kept. At least 32 chars should be reserved to store token. The validity period of token is currently 24 hours. It needs to be refreshed regularly or reacquired according to the token failure prompt returned by the API. When requesting the token API, regardless of the existence of token, a new token will be returned and its expiry time will be reset (currently 24 hours).
Token usage description:
- Developers need to obtain and manage the token uniformly. When calling the Sobot open APIs of various business, they should use the same token, instead of refreshing and obtaining new tokens for each business. Otherwise, it will easily lead to token invalidation and affect the normal API call.
- The current validity period of the token is transmitted by the returned expire_in, which is currently a value within 86,400 s. Developers need to refresh the new token in advance based on this valid time.
- Developers should reacquire the token according to the token invalidation prompt returned by the API.
# API Call
# ● Get the Access Token Code
API description:
Get the open API token, which is only applicable to all APIs of Sobot Open Platform v5.0. Contact the Sobot after-sales service personnel to get appid and app_key in the API.
Request method:
GET
Request URL:
https://sg.sobot.io/api/get_token
Request param:
Param | Type | Required | Description |
---|---|---|---|
appid | String | Yes | API credential ID |
create_time | String | Yes | Timestamp |
sign | String | Yes | Signature |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
item | Object | No | Return object |
item object:
Param | Type | Required | Description |
---|---|---|---|
token | String | Yes | token code |
expires_in | String | Yes | Credential valid time |
Timestamp conversion tool:
https://www.unixtimestamp.com/
sign signature generation example:
E.g.: appid = "1"; create_time="1569397773"; app_key="2"
sign = Md5("115693977732") is 258eec3118705112b2c53dc8043d4d34.
Request example:
curl https://sg.sobot.io/api/get_token?appid=1&create_time=1569397773&sign=258eec3118705112b2c53dc8043d4d34
Return example:
{
"item": {
"token": "4ac37cb2e9c740dba4b75a34d5358802",
"expires_in": "86400"
},
"ret_code": "000000",
"ret_msg": "success"
}
2
3
4
5
6
7
8
# Param and Status Code Description
# PARAM
Request header param description:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
token | String | Yes | token | |
timezoneid | String | No | Time zone | standard time zone ID, not passed or defaulted to "Asia/Shanghai" illegally |
language | String | No | Language tag | en: English, zh: Chinese, not passed or defaulted to "zh" illegally |
Other param description:
For the input time description, if there are no special remarks on the regular API, the passed time is usually greater than the current time. To ensure the legitimacy of input, we will reset the input time to the current time based on the designated pattern of the API. For example, if today is September 11, 2023, assuming the passed time is September 12, 2023, the time will be reset to September 11, 2023.
If the passed time is the start time and end time, there is usually no special description for the API, and the end time cannot be greater than the start time.
Time format description:
pattern | Date |
---|---|
yyyy-MM-dd | 2023-09-01 |
yyyy-MM-dd HH:mm | 2023-09-01 00:00 |
yyyy-MM-dd HH:mm:ss | 2023-09-01 00:00:00 |
# Uniform Status Code Description
Return param:
Error Code | Description |
---|---|
000000 | Succeed |
900001 | Token is null! |
900002 | token authentication failed |
229000 | API call too frequent |
222000 | API input error |
999999 | System internal error |
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"item": {}
}
2
3
4
5
{
"ret_code": "900001",
"ret_msg": "Token is null!"
}
2
3
4
{
"ret_code": "900002",
"ret_msg": "Token invalid or not found. Get a new one!"
}
2
3
4
{
"ret_code": "229000",
"ret_msg": "API call too frequent. Try again [60]s later. Currently [20] times of API call within [60]s is allowed. Excess will be limited!"
}
2
3
4
{
"ret_code": "222000",
"ret_msg": "[startTime] and [endTime] time range cannot be greater than [90]d. Current [startTime] input is [2023-01-01], and [endTime] input is [2023-09-01]"
}
2
3
4
{
"ret_code": "999999",
"ret_msg": "Unknown System Exception"
}
2
3
4
5
# Public Query Condition API Call
# ● Query Channel List Information
Request method:
POST
Request URL:
https://sg.sobot.io/chat-static-api/api/condition/getChannelList
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
query_content | String | No | Channel Name Keyword |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
code | String | Yes | Channel Type |
msg | String | Yes | Channel Name |
Request example:
curl --location 'https://sg.sobot.io/chat-static-api/api/condition/getChannelList' \
--header 'token: 3d162dc4362840428f80e1f8c49670ee' \
--header 'language: en' \
--header 'timezoneid: Asia/Shanghai' \
--header 'Content-Type: application/json' \
--data '{
"query_content": ""
}'
2
3
4
5
6
7
8
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"items": [
{
"code": "0",
"msg": "Desktop site"
},
{
"code": "4",
"msg": "Mobile Site"
},
{
"code": "2",
"msg": "APP"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# ● Query Sub-channel List Information (Paging)
Request method:
POST
Request URL:
https://sg.sobot.io/chat-static-api/api/condition/getChildChannelList
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
sources | String | No | Channel Type | In case of two or more, separate by ",", such as "1,2" |
query_content | String | No | Channel Name Keyword | |
page_no | String | No | Page | Default 1 |
page_size | String | No | Number on each page | Default 15,The maximum allowed is 100, and if it exceeds 100, it will be reset to 100. |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
page_no | String | Yes | Current page |
page_count | String | Yes | Total pages |
page_size | String | Yes | Page Number |
total_count | String | Yes | Total Pieces of Data |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
sub_channel_id | String | Yes | Sub-channel ID |
channel_type | String | Yes | Channel Type |
sub_channel_name | String | Yes | Sub-channel name |
channel_flag | String | Yes | Channel tag |
channel_flag_key | String | Yes | Channel tag key (used for bot API query input) |
Request example:
curl --location 'https://sg.sobot.io/chat-static-api/api/condition/getChildChannelList' \
--header 'token: 3d162dc4362840428f80e1f8c49670ee' \
--header 'language: en' \
--header 'timezoneid: Asia/Shanghai' \
--header 'Content-Type: application/json' \
--data '{
"page_no": "1",
"page_size": "5",
"sources": "",
"query_content": ""
}'
2
3
4
5
6
7
8
9
10
11
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"page_no": 1,
"total_count": 42,
"page_size": 5,
"items": [
{
"sub_channel_id": "9eef5ee48be74ff2850a7886acbadd7c",
"channel_type": "4",
"sub_channel_name": "channel01",
"channel_flag": "1",
"channel_flag_key": "4_1"
},
{
"sub_channel_id": "12ef5039433e48558945aaf834c04a82",
"channel_type": "4",
"sub_channel_name": "channel-29",
"channel_flag": "29",
"channel_flag_key": "4_29"
},
{
"sub_channel_id": "21f51d0acc0b43b0a3945d70d56bb1bf",
"channel_type": "4",
"sub_channel_name": "Randolph Keebler",
"channel_flag": "32",
"channel_flag_key": "4_32"
},
{
"sub_channel_id": "d58353048a3c460b9fa391dd581c06d4",
"channel_type": "4",
"sub_channel_name": "channel Conrad Parisian",
"channel_flag": "35",
"channel_flag_key": "4_35"
},
{
"sub_channel_id": "ea3917b2579642f0a84968b3589d9a20",
"channel_type": "4",
"sub_channel_name": "Bill Bergstrom",
"channel_flag": "30",
"channel_flag_key": "4_30"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# ● Query Service Classification List
Request method:
POST
Request URL:
/chat-static-api/api/condition/getClassificationList
Request param:
None
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
id | String | Yes | Classification ID |
classify_name | String | Yes | Classification Name |
classify_code | String | Yes | Classification Code |
classify_level | String | Yes | Classification Level |
classify_level_path | String | Yes | Path segments ending with current ID, comma-separated |
classify_parent_id | String | Yes | Parent Classification ID |
sort | String | Yes | Sort Number |
Request example:
curl --location --request POST '/chat-static-api/api/condition/getClassificationList' \
--header 'token: 94b4db111e2f4369942db415bdfec17e' \
--header 'language: en' \
--header 'timezoneid: Asia/Shanghai'
2
3
4
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"items": [
{
"id": "1675771435033501698",
"classify_name": "Classification1",
"classify_code": "1001",
"classify_level": 1,
"classify_level_path": "1675771435033501698",
"classify_parent_id": "1",
"sort": 1
},
{
"id": "1942058769946447874",
"classify_name": "Classification1_2",
"classify_level": 2,
"classify_level_path": "1675771435033501698,1942058769946447874",
"classify_parent_id": "1675771435033501698",
"sort": 1
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# ● Query Robot List
Request method:
POST
Request URL:
/chat-static-api/api/condition/getRobotList
Request param:
None
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
robot_logo | String | Yes | Robot Logo |
robot_name | String | Yes | Robot Name |
robot_flag | String | Yes | Robot Flag |
Request example:
curl --location --request POST '/chat-static-api/api/condition/getRobotList' \
--header 'token: 94b4db111e2f4369942db415bdfec17e' \
--header 'language: en' \
--header 'timezoneid: Asia/Shanghai'
2
3
4
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"items": [
{
"robot_logo": "https://img.sobot.com/console/common/face/robot.png",
"robot_name": "Robot-1",
"robot_flag": 1
},
{
"robot_logo": "https://img.sobot.com/console/common/face/robot.png",
"robot_name": "Robot-2",
"robot_flag": 2
},
{
"robot_logo": "https://img.sobot.com/console/common/face/robot.png",
"robot_name": "Robot-3",
"robot_flag": 3
},
{
"robot_logo": "https://img.sobot.com/console/common/face/robot.png",
"robot_name": "Robot-4",
"robot_flag": 4
},
{
"robot_logo": "https://img.sobot.com/console/common/face/robot.png",
"robot_name": "Robot-5",
"robot_flag": 5
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# ● Query Department List
Request method:
POST
Request URL:
/chat-static-api/api/condition/getDepartmentList
Request param:
None
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
depart_id | String | Yes | Department ID |
depart_name | String | Yes | Department Name |
parent_id | String | Yes | Parent Department ID |
company_id | String | Yes | Company ID |
child_list | List | No | Sub-department List |
Request example:
curl --location --request POST '/chat-static-api/api/condition/getDepartmentList' \
--header 'token: 94b4db111e2f4369942db415bdfec17e' \
--header 'language: en' \
--header 'timezoneid: Asia/Shanghai'
2
3
4
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"items": [
{
"depart_id": "11b97b04eaea4f89b84fcbb75e41a3d6",
"depart_name": "Headquarters",
"company_id": "913d909e3a194598ba61cf904b5dc12a",
"parent_id": "0",
"child_list": [
{
"depart_id": "6e4c8ae50b7046e2b790466dc35e660f",
"depart_name": "Southwest Region",
"company_id": "913d909e3a194598ba61cf904b5dc12a",
"parent_id": "11b97b04eaea4f89b84fcbb75e41a3d6"
},
{
"depart_id": "7b46015c6a184511bc6a4d8a8c44bc99",
"depart_name": "Northeast Region",
"company_id": "913d909e3a194598ba61cf904b5dc12a",
"parent_id": "11b97b04eaea4f89b84fcbb75e41a3d6"
}
]
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# ● Query Skill Group List
Request method:
POST
Request URL:
/chat-static-api/api/condition/getGroupList
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
query_content | String | No | Name Keyword | |
page | String | No | Page | Default 1 |
size | String | No | Number on each page | Default 15,The maximum allowed is 100, and if it exceeds 100, it will be reset to 100. |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
group_id | String | Yes | Skill Group ID |
group_name | String | Yes | Skill Group Name |
Request example:
curl --location --request POST '/chat-static-api/api/condition/getGroupList' \
--header 'token: 38cb37ae635e46faa5ffd5cf5bc9acc3' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"query_content": "Test",
"depart_ids_param": "11b97b04eaea4f89b84fcbb75e41a3d6"
}'
2
3
4
5
6
7
8
9
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"page_no": 1,
"page_size": 15,
"items": [
{
"group_id": "3b4a3eb565f74558a0b746023a85e0ad",
"group_name": "Test"
},
{
"group_id": "2a5171b2a85d49bda666f1569588d12e",
"group_name": "Session Stat Test"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# ● Query Customer Service List
Request method:
POST
Request URL:
/chat-static-api/api/condition/getServiceList
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
search_way | Integer | Yes | 1-Department 2-Skill Group | Default: search_way=1 |
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
group_ids_param | String | No | Skill Group IDs | In case of two or more, separate by ",", such as "1,2" |
query_content | String | No | Name Keyword | |
page | String | No | Page | Default 1 |
size | String | No | Number on each page | Default 15,The maximum allowed is 100, and if it exceeds 100, it will be reset to 100. |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
page_no | String | Yes | Current page |
page_count | String | Yes | Total pages |
page_size | String | Yes | Page Number |
total_count | String | Yes | Total Pieces of Data |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
service_id | String | Yes | Service ID |
service_name | String | Yes | Service Name |
service_nick | String | Yes | Service Nickname |
Request example:
curl --location --request POST '/chat-static-api/api/condition/getServiceList' \
--header 'token: 38cb37ae635e46faa5ffd5cf5bc9acc3' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"query_content": "",
"search_way":"2",
"group_ids_param":"3b4a3eb565f74558a0b746023a85e0ad,2a5171b2a85d49bda666f1569588d12e",
"depart_ids_param": "11b97b04eaea4f89b84fcbb75e41a3d6"
}'
2
3
4
5
6
7
8
9
10
11
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"page_no": 1,
"total_count": 3,
"page_size": 15,
"items": [
{
"service_id": "3c199c5dff5b44f7b45638e83d8710a7",
"service_name": "Zhangsan",
"service_nick": "zstest"
},
{
"service_id": "70b08e73e1894273934acf97ab3726d5",
"service_name": "ZhaoLinFeng",
"service_nick": "ZhaoLinFeng"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# Chat Statistics API
# ● Chat Data (Paging)
Request method:
POST
Request URL:
/chat-static-api/api/online/session/getStat
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
start_date | String | Yes | Time of Chat Connecting | pattern:yyyy-MM-dd HH:mm:ss |
end_date | String | Yes | Chat End Time | pattern:yyyy-MM-dd HH:mm:ss |
search_way | Integer | Yes | 1-Department 2-Skill Group 3-Channel | Default: search_way=3 |
summary_way | Integer | No | 0-Summary 1-Daily 2-Weekly 3-Monthly | Default: summary_way=0 |
source | String | No | Channel Type | In case of two or more, separate by ",", such as "1,2" |
channel_flag | String | No | channel_flag_key | In case of two or more, separate by ",", such as "1,2" |
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
group_ids_param | String | No | Skill Group IDs | In case of two or more, separate by ",", such as "1,2" |
robot_ids_param | String | No | Robot flags | In case of two or more, separate by ",", such as "1,2" |
staff_ids_param | String | No | Agent IDs | In case of two or more, separate by ",", such as "1,2" |
page | String | Yes | Current page | Default 1 |
size | String | Yes | Page Number | 15 by default |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
page_no | String | Yes | Current page |
page_count | String | Yes | Total pages |
page_size | String | Yes | Page Number |
total_count | String | Yes | Total Pieces of Data |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
queue | Long | No | Queuing Chats |
not_queue | Long | No | Unqueued Chats |
queue_not_accept_rate | Double | No | Unqueued Connection % |
queue_accept | Long | No | Queuing Connection Chats |
queue_accept_rate | Double | No | Queuing Connection % |
queue_leave | Long | No | Queue Leaving Chats |
queue_leave_rate | Double | No | Queue Leaving % |
avg_queue_accept_duration | Double | No | Avg. Queuing Connection Time |
avg_queue_leave_duration | Double | No | Avg. Queue Leaving Time |
human_consult | Long | No | Total Chats |
human_self | Integer | No | Independent Reception Chats |
human_self_rate | Double | No | Bot Reception % |
human_valid | Integer | No | Valid Chats |
human_invalid | Integer | No | Invalid Chats |
human_valid_rate | Double | No | Valid Chat % |
human_not_recep | Long | No | Valid Reception by agent |
human_not_recep_rate | Double | No | Valid Reception by agent % |
avg_human_recep_duration | Double | No | Avg. Reception Time |
avg_staff_first_res_duration | Double | No | Avg. 1st-Response Time |
avg_staff_res_total_duration | Double | No | Avg. Response Time |
human_valid_recep | Long | No | Valid Reception Chats |
human_valid_recep_rate | Double | No | Valid Reception Chat % |
human_invalid_recep | Long | No | Chat without Agent's Reply |
human_invalid_recep_rate | Double | No | Chat without Agent's Reply % |
human_transfer | Long | No | Transferred Chats |
in_blacklist | Long | No | Blacklisted Chats |
summary_solved | Long | No | Resolved Chats |
summary_not_solved | Long | No | Unresolved Chats |
human_snatch | Long | No | Taken-Away Chats |
human_initiative | Long | No | Proactive Chats |
not_mark_is_solved | Long | No | Chats Not Tagged as Resolved or Unresolved |
Request example:
curl --location --request POST '/chat-static-api/api/online/session/getStat' \
--header 'token: 3a9da6809b0c4daebe4706d17e4bcf89' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"start_date": "2025-02-01 00:00:00",
"end_date": "2025-07-08 23:59:59",
"channel_flag": "0_12,0_13",
"robot_ids_param": "1,2,3,4,5",
"group_ids_param": "284a84325e504b5489179b925ec01e54",
"search_way": "2"
"page": 1,
"size": 15,
}'
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"page_no": 1,
"page_count": 37,
"total_count": 73,
"page_size": 2,
"items": [
{
"channel_flag": "6",
"channel_flag_name": "DeskTop--6",
"source": "0",
"source_name": "Desktop Site",
"session_consult": 0,
"session_valid": 0,
"session_invalid": 0,
"queue": 0,
"not_queue": 56,
"queue_accept": 0,
"queue_leave": 0,
"queue_not_accept_rate": 1.0,
"queue_not_accept_rate_str": "100.00%",
"queue_accept_rate": 0.0,
"queue_accept_rate_str": "0.00%",
"queue_leave_rate": 0.0,
"queue_leave_rate_str": "0.00%",
"avg_queue_accept_duration": 0.0,
"avg_queue_accept_duration_str": "00:00:00",
"avg_queue_leave_duration": 0.0,
"avg_queue_leave_duration_str": "00:00:00",
"robot_consult": 0,
"robot_self": 0,
"robot_valid": 0,
"robot_in_valid": 0,
"robot_to_staff_active": 0,
"robot_to_staff_trigger_key_word": 0,
"robot_total_transfer": 0,
"human_consult": 56,
"human_self": 42,
"human_valid": 56,
"human_invalid": 0,
"human_not_recep": 14,
"human_valid_recep": 40,
"human_invalid_recep": 2,
"human_transfer": 0,
"in_blacklist": 0,
"summary_solved": 20,
"summary_not_solved": 14,
"human_snatch": 0,
"human_initiative": 0,
"human_self_rate": 0.75,
"human_self_rate_str": "75.00%",
"human_valid_rate": 1.0,
"human_valid_rate_str": "100.00%",
"human_not_recep_rate": 0.25,
"human_not_recep_rate_str": "25.00%",
"avg_human_recep_duration": 628769.25,
"avg_human_recep_duration_str": "00:10:28",
"avg_staff_first_res_duration": 853451.6,
"avg_staff_first_res_duration_str": "00:14:13",
"avg_staff_res_total_duration": 182964.42328042327,
"avg_staff_res_total_duration_str": "00:03:02",
"human_valid_recep_rate": 0.7142857142857143,
"human_valid_recep_rate_str": "71.43%",
"human_invalid_recep_rate": 0.03571428571428571,
"human_invalid_recep_rate_str": "3.57%",
"not_mark_is_solved": 22,
"response_warn_count": 20,
"staff_res_total_count": 189.0,
"response_warn_rate": 0.10582010582010581
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# ● Chat Message Data (Paging)
Request method:
POST
Request URL:
/chat-static-api/api/online/session/getMsgStat
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
start_date | String | Yes | Time of Chat Connecting | pattern:yyyy-MM-dd HH:mm:ss |
end_date | String | Yes | Chat End Time | pattern:yyyy-MM-dd HH:mm:ss |
search_way | Integer | Yes | 1-Department 2-Skill Group 3-Channel | Default: search_way=3 |
summary_way | Integer | No | 0-Summary 1-Daily 2-Weekly 3-Monthly | Default: summary_way=0 |
source | String | No | Channel Type | In case of two or more, separate by ",", such as "1,2" |
channel_flag | String | No | channel_flag_key | In case of two or more, separate by ",", such as "1,2" |
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
group_ids_param | String | No | Skill Group IDs | In case of two or more, separate by ",", such as "1,2" |
robot_ids_param | String | No | Robot flags | In case of two or more, separate by ",", such as "1,2" |
staff_ids_param | String | No | Agent IDs | In case of two or more, separate by ",", such as "1,2" |
page | String | Yes | Current page | Default 1 |
size | String | Yes | Page Number | 15 by default |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
page_no | String | Yes | Current page |
page_count | String | Yes | Total pages |
page_size | String | Yes | Page Number |
total_count | String | Yes | Total Pieces of Data |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
msg_human | Integer | No | Total Chat Messages |
msg_visitor_to_staff | Integer | No | Customer Messages |
msg_staff | Integer | No | Agent Messages |
offline_message | Long | No | Offline Message of Agent |
human_avg_msg | Double | No | Average Number of Messages Per Session |
msg_staff_visitor_rate | Double | No | Q&A % |
human_avg_msg_visitor | Double | No | Avg. Customer Msgs Per Chat |
human_avg_msg_staff | Double | No | Avg. Agent Msgs Per Chat |
msg_staff_word_count | Integer | No | Agent Chars |
human_avg_staff_word_count | Double | No | Avg. Agent Msgs Chars Per Chat |
staff_res_total_count | Double | No | Agent Chat Round Level |
response_warn_rate | Double | No | Agent Chat Response Alert Round Level |
response_warn_count | Integer | No | Agent Chat Response Alert % |
Request example:
curl --location --request POST '/chat-static-api/api/online/session/getMsgStat' \
--header 'token: 3a9da6809b0c4daebe4706d17e4bcf89' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"start_date": "2025-06-11 00:00:00",
"end_date": "2025-07-10 23:59:00",
"page": 1,
"size": 15,
"search_way": 1
}'
2
3
4
5
6
7
8
9
10
11
12
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"page_no": 1,
"page_count": 1,
"total_count": 1,
"page_size": 15,
"items": [
{
"depart_id": "11b97b04eaea4f89b84fcbb75e41a3d6",
"depart_name": "head office",
"msg_human": 31,
"msg_visitor_to_staff": 23,
"msg_staff": 8,
"offline_message": 0,
"msg_staff_word_count": 32,
"human_avg_msg": 3.44,
"msg_staff_visitor_rate": 0.34782608695652173,
"msg_staff_visitor_rate_str": "34.78%",
"human_avg_msg_visitor": 2.56,
"human_avg_msg_staff": 0.89,
"human_avg_staff_word_count": 3.56,
"response_warn_count": 7,
"staff_res_total_count": 11.0,
"response_warn_rate": 0.6363636363636364,
"response_warn_rate_str": "63.64%"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# Customer Statistics API
# ● Customer Statistics-Overview Data
Request method:
POST
Request URL:
/chat-static-api/api/online/custom/getGeneral
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
start_date | String | Yes | Time of Chat Connecting | pattern:yyyy-MM-dd HH:mm |
end_date | String | Yes | Chat End Time | pattern:yyyy-MM-dd HH:mm |
search_way | Integer | Yes | 1-Department 2-Skill Group 3-Channel | Default: search_way=2 |
source | String | No | Channel Type | In case of two or more, separate by ",", such as "1,2" |
channel_flag | String | No | channel_flag_key | In case of two or more, separate by ",", such as "1,2" |
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
group_ids_param | String | No | Skill Group IDs | In case of two or more, separate by ",", such as "1,2" |
robot_ids_param | String | No | Robot flags | In case of two or more, separate by ",", such as "1,2" |
staff_ids_param | String | No | Agent IDs | In case of two or more, separate by ",", such as "1,2" |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
item | Object | No | Return object |
item object:
Param | Type | Required | Description |
---|---|---|---|
valid_visitor_total | String | No | Total Valid Customers |
new_visitor_num | String | No | New Visitors |
old_visitor_num | String | No | Regular Visitors |
old_visitor_proportion | String | No | Regular Visitor % |
one_time_solution_rate | String | No | 24h FCR |
valid_visitor_total_cycle | String | No | Total Valid Customers MoM |
new_visitor_num_cycle | String | No | New Visitors MoM |
old_visitor_num_cycle | String | No | Regular Visitors MoM |
old_visitor_proportion_cycle | String | No | Regular Visitor % MoM |
one_time_solution_rate_cycle | String | No | 24h FCR MoM |
Request example:
curl --location --request POST '/chat-static-api/api/online/custom/getGeneral' \
--header 'token: 3a9da6809b0c4daebe4706d17e4bcf89' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"start_date": "2025-06-11 00:00",
"end_date": "2025-07-10 23:59",
"search_way": 1
}'
2
3
4
5
6
7
8
9
10
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"item": {
"valid_visitor_total": "21",
"new_visitor_num": "7",
"old_visitor_num": "14",
"old_visitor_proportion": "66.67%",
"one_time_solution_rate": "22.22%",
"valid_visitor_total_cycle": "-32.26%",
"new_visitor_num_cycle": "-69.57%",
"old_visitor_num_cycle": "55.56%",
"old_visitor_proportion_cycle": "38.54%",
"one_time_solution_rate_cycle": "-5.36%"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# ● Customer Statistics-Bot Reception Data
Request method:
POST
Request URL:
/chat-static-api/api/online/custom/getRobotReception
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
start_date | String | Yes | Time of Chat Connecting | pattern:yyyy-MM-dd HH:mm |
end_date | String | Yes | Chat End Time | pattern:yyyy-MM-dd HH:mm |
search_way | Integer | Yes | 1-Department 2-Skill Group 3-Channel | Default: search_way=2 |
source | String | No | Channel Type | In case of two or more, separate by ",", such as "1,2" |
channel_flag | String | No | channel_flag_key | In case of two or more, separate by ",", such as "1,2" |
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
group_ids_param | String | No | Skill Group IDs | In case of two or more, separate by ",", such as "1,2" |
robot_ids_param | String | No | Robot flags | In case of two or more, separate by ",", such as "1,2" |
staff_ids_param | String | No | Agent IDs | In case of two or more, separate by ",", such as "1,2" |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
item | Object | No | Return object |
item object:
Param | Type | Required | Description |
---|---|---|---|
robot_reception_num | String | No | Bot Received Customers |
robot_reception_num_cycle | String | No | Bot Received Customers MoM |
robot_reception_valid_num | String | No | Bot Validly Received Customers |
robot_reception_valid_num_cycle | String | No | Bot Validly Received Customers MoM |
robot_self_reception_num | String | No | Bot Independently Received Customers |
robot_self_reception_num_cycle | String | No | Bot Independently Received Customers MoM |
robot_self_reception_num_proportion | String | No | Bot Independently Received Customer % |
robot_self_reception_num_proportion_cycle | String | No | Bot Independently Received Customer % MoM |
robot_to_staff_active | String | No | Proactive Trans-to-Agent Customers |
robot_to_staff_active_cycle | String | No | Proactive Trans-to-Agent Customers MoM |
robot_to_staff_active_proportion | String | No | Proactive Trans-to-Agent Customer % |
robot_to_staff_active_proportion_cycle | String | No | Proactive Trans-to-Agent Customer % MoM |
trigger_to_manual_num | String | No | Triggering Trans-to-Agent Customers |
trigger_to_manual_num_cycle | String | No | Triggering Trans-to-Agent Customers MoM |
trigger_to_manual_num_proportion | String | No | Triggering Trans-to-Agent Customer % |
trigger_to_manual_num_proportion_cycle | String | No | Triggering Trans-to-Agent Customer % MoM |
transfer_to_staff_num | String | No | Trans-to-Agent Customers |
transfer_to_staff_num_cycle | String | No | Trans-to-Agent Customers MoM |
robot_to_staff_trigger_key_word | String | No | Keyword-Triggering Trans-To-Agent |
robot_to_staff_trigger_key_word_cycle | String | No | Keyword-Triggering Trans-To-Agent MoM |
robot_to_staff_trigger_key_word_proportion | String | No | Keyword-Triggering Trans-To-Agent % |
robot_to_staff_trigger_key_word_proportion_cycle | String | No | Keyword-Triggering Trans-To-Agent % MoM |
Request example:
curl --location --request POST '/chat-static-api/api/online/custom/getRobotReception' \
--header 'token: 3a9da6809b0c4daebe4706d17e4bcf89' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"start_date": "2025-04-01 00:00",
"end_date": "2025-07-09 23:59",
"search_way": 1
}'
2
3
4
5
6
7
8
9
10
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"item": {
"robot_reception_num": "1496",
"robot_reception_valid_num": "300",
"robot_self_reception_num": "66",
"robot_self_reception_num_proportion": "22.00%",
"transfer_to_staff_num": "1452",
"robot_to_staff_active": "1441",
"robot_to_staff_active_proportion": "99.24%",
"trigger_to_manual_num": "6",
"trigger_to_manual_num_proportion": "0.41%",
"robot_to_staff_trigger_key_word": "1",
"robot_to_staff_trigger_key_word_proportion": "0.07%",
"robot_reception_num_cycle": "-53.24%",
"robot_reception_valid_num_cycle": "-64.03%",
"robot_self_reception_num_cycle": "450.00%",
"robot_self_reception_num_proportion_cycle": "20.56%",
"transfer_to_staff_num_cycle": "-54.64%",
"robot_to_staff_active_cycle": "-54.87%",
"robot_to_staff_active_proportion_cycle": "-0.51%",
"trigger_to_manual_num_cycle": "500.00%",
"trigger_to_manual_num_proportion_cycle": "0.38%",
"robot_to_staff_trigger_key_word_cycle": "0.00%",
"robot_to_staff_trigger_key_word_proportion_cycle": "0.07%"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# ● Customer Statistics-Agent Reception Data
Request method:
POST
Request URL:
/chat-static-api/api/online/custom/getStaffReception
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
start_date | String | Yes | Time of Chat Connecting | pattern:yyyy-MM-dd HH:mm |
end_date | String | Yes | Chat End Time | pattern:yyyy-MM-dd HH:mm |
search_way | Integer | Yes | 1-Department 2-Skill Group 3-Channel | Default: search_way=2 |
source | String | No | Channel Type | In case of two or more, separate by ",", such as "1,2" |
channel_flag | String | No | channel_flag_key | In case of two or more, separate by ",", such as "1,2" |
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
group_ids_param | String | No | Skill Group IDs | In case of two or more, separate by ",", such as "1,2" |
robot_ids_param | String | No | Robot flags | In case of two or more, separate by ",", such as "1,2" |
staff_ids_param | String | No | Agent IDs | In case of two or more, separate by ",", such as "1,2" |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
item | Object | No | Return object |
item object:
Param | Type | Required | Description |
---|---|---|---|
staff_reception_num | String | No | Received Customers |
staff_reception_num_cycle | String | No | Received Customers MoM |
staff_self_reception_num | String | No | Agent Independently Received Customers |
staff_self_reception_num_cycle | String | No | Agent Independently Received Customers MoM |
staff_self_reception_num_proportion | String | No | Agent Independently Received Customer % |
staff_self_reception_num_proportion_cycle | String | No | Agent Independently Received Customer % MoM |
staff_valid_reception_num | String | No | Valid Receptions |
staff_valid_reception_num_cycle | String | No | Valid Receptions MoM |
staff_valid_reception_num_proportion | String | No | Agent Validly Received Customer % |
staff_valid_reception_num_proportion_cycle | String | No | Agent Validly Received Customer % MoM |
Request example:
curl --location --request POST '/chat-static-api/api/online/custom/getStaffReception' \
--header 'token: 3a9da6809b0c4daebe4706d17e4bcf89' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"start_date": "2025-04-01 00:00",
"end_date": "2025-07-09 23:59",
"search_way": 1
}'
2
3
4
5
6
7
8
9
10
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"item": {
"staff_reception_num": "704",
"staff_self_reception_num": "700",
"staff_self_reception_num_proportion": "99.43%",
"staff_valid_reception_num": "700",
"staff_valid_reception_num_proportion": "99.43%",
"staff_reception_num_cycle": "-69.14%",
"staff_self_reception_num_cycle": "-69.05%",
"staff_self_reception_num_proportion_cycle": "-0.31%",
"staff_valid_reception_num_cycle": "-69.23%",
"staff_valid_reception_num_proportion_cycle": "-0.31%"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# ● Customer Statistics-Region Distribution
Request method:
POST
Request URL:
/chat-static-api/api/online/custom/getGeographicalDistribution
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
start_date | String | Yes | Time of Chat Connecting | pattern:yyyy-MM-dd HH:mm |
end_date | String | Yes | Chat End Time | pattern:yyyy-MM-dd HH:mm |
search_way | Integer | Yes | 1-Department 2-Skill Group 3-Channel | Default: search_way=2 |
source | String | No | Channel Type | In case of two or more, separate by ",", such as "1,2" |
channel_flag | String | No | channel_flag_key | In case of two or more, separate by ",", such as "1,2" |
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
group_ids_param | String | No | Skill Group IDs | In case of two or more, separate by ",", such as "1,2" |
robot_ids_param | String | No | Robot flags | In case of two or more, separate by ",", such as "1,2" |
staff_ids_param | String | No | Agent IDs | In case of two or more, separate by ",", such as "1,2" |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
id | String | No | No. |
country | String | No | Country |
province | String | No | Region |
visitor_total | String | No | Total Visitors |
new_visitor_num | String | No | New Visitors |
old_visitor_num | String | No | Regular Visitors |
Request example:
curl --location --request POST '/chat-static-api/api/online/custom/getGeographicalDistribution' \
--header 'token: 3a9da6809b0c4daebe4706d17e4bcf89' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"start_date": "2025-04-01 00:00",
"end_date": "2025-07-09 23:59",
"search_way": 1
}'
2
3
4
5
6
7
8
9
10
Return example:
{
"ret_code": "000000",
"ret_msg": "Success",
"items": [
{
"id": "6",
"country": "China",
"province": "Beijing",
"visitor_total": "1445",
"new_visitor_num": "1402",
"old_visitor_num": "43"
},
{
"id": "1",
"country": "United States",
"province": "California",
"visitor_total": "2",
"new_visitor_num": "2",
"old_visitor_num": "0"
},
{
"id": "4",
"country": "Netherlands",
"province": "",
"visitor_total": "1",
"new_visitor_num": "0",
"old_visitor_num": "1"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# Agent Statistics API
# ● Agent Workload Statistics (Paging)
Request method:
POST
Request URL:
https://sg.sobot.io/chat-static-api/api/customerService/staffWorkStatis
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
search_way | Integer | Yes | 1- Department 2- Group | Default: search_way=2 |
start_date | String | Yes | Operation Start Time | pattern:yyyy-MM-dd |
end_date | String | Yes | Operation End Time | pattern:yyyy-MM-dd |
staff_id_list | List | No | Agent ID | ["staffId1","staffId2"] |
group_id_list | List | No | Group ID | ["groupId1","groupId2"] |
page_no | String | No | Page | Default 1 |
page_size | String | No | Number on each page | Default 15,The maximum allowed is 100, and if it exceeds 100, it will be reset to 100. |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
page_no | String | Yes | Current page |
page_count | String | Yes | Total pages |
page_size | String | Yes | Page Number |
total_count | String | Yes | Total Pieces of Data |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
service_nick | String | No | Agent Nickname |
service_email | String | No | Agent Email |
group_name | String | No | Agent Skill Group |
human_consult | Integer | No | Total Chats |
human_self | Integer | No | Bot Reception Chats |
human_valid | Integer | No | Valid Chats |
human_invalid | Integer | No | Invalid Chats |
human_invalid_recep | Integer | No | Invalid Reception Chats |
first_response_time_set | Integer | No | 1st Reception-1st Response Chats |
transfer_first_res_duration | Long | No | Transferred 1st-Response Chats |
valid_recep_rate_str | String | No | Valid Reception Chat % |
not_recep_rate_str | String | No | Unreceived Chat % |
max_conv_num | String | No | Max received chats |
human_consult_duration_str | String | No | Agent Inquiry Duration |
valid_information | Integer | No | Valid Info-Collecting Chats |
human_valid_recep | Integer | No | Valid Reception Chats |
valid_response_counts | Long | No | Valid interactive chats |
avg_human_confirm_duration_transfer_str | String | No | Transfer Duration |
total_human_message | Integer | No | Total Chats |
msg_staff | Integer | No | Agent Messages |
msg_visitor_tostaff | Integer | No | No. of Message From Customer |
answer_than_str | String | No | A&Q % |
msg_staff_wordcount | Integer | No | Agent Chars |
human_visitor_consult | Long | No | Valid Inquiry Chats |
roll_in | Integer | No | Transfer-in Chats |
roll_out | Integer | No | Transfer-out Chats |
human_not_recep | Integer | No | Unreceived Chats |
last_staff_consult | Long | No | Last Reception Chats |
quiet_after_session_count | Long | No | 24h FCR |
quiet_after_session_rate_str | String | No | 24h FCR % |
human_initiative | Integer | No | Proactive Chats |
avg_session_duration_str | String | No | Avg. Agent Reception Time |
avg_total_session_duration_str | String | No | Avg. Total Chat Duration |
avg_first_response_time_str | String | No | Avg. 1st Response Time |
transfer_first_response_rate_str | String | No | Transferred 1st Response % |
response_time_avg_str | String | No | Avg. Response Time |
response_duration_max_str | String | No | Max Response Time |
first_response_rate_str | String | No | 1st Response % |
first_response_in30s_rate_str | String | No | 30s Response % |
first_response_in60s_rate_str | String | No | 60s Response % |
solve_not_mark | Integer | No | Chats not Tagged as Resolved or Unresolved |
snatch_out | Integer | No | Taken-Away Chats |
response_counts | Integer | No | Agent chat round level |
summary_solved | Integer | No | Resolved Chats |
summary_not_solved | Integer | No | Unresolved Chats |
snatch_in | Integer | No | Taken-Away Chats |
response_rate_str | String | No | Agent final response % |
staff_connect_rate_str | String | No | Agent Connection % |
human_res_warn_count | Integer | No | Agent chat response alert round level |
human_res_warn_rate_str | String | No | Agent chat response alert rate |
total_times | Integer | No | Chat Feedback |
comment_rate_str | String | No | Feedback % |
initiative | Integer | No | Proactive Customer Feedback |
customer_initiative_rate_str | String | No | Proactive Customer Feedback % |
invite_counts | Integer | No | Invitations |
invite_counts_rate_str | String | No | Invitation % |
invites | Integer | No | Agent-Invited Feedback |
staff_invite_rate_str | String | No | Agent-Invited Feedback % |
level2_score5_rate_str | String | No | Satisfication % (level 2 evaluation) |
level2_score1_rate_str | String | No | Dissatisfication % (level 2 evaluation) |
avg_comment_score | Double | No | Avg. Score (5 Stars) |
good_rate_str | String | No | Positive Feedback % (5 Stars) |
middle_rate_str | String | No | Moderate Feedback % (5 Stars) |
bad_rate_str | String | No | Neg. Feedback % (5 Stars) |
score5_rate_str | String | No | 5 Stars % |
score4_rate_str | String | No | 4 Stars % |
score3_rate_str | String | No | 3 Stars % |
score2_rate_str | String | No | 2 Stars % |
score1_rate_str | String | No | 1 Stars % |
avg_nps_score | Double | No | Avg. Score (10 Scores) |
good_nps_rate_str | String | No | Positive Feedback % (10 Scores) |
middle_nps_rate_str | String | No | Moderate Feedback % (10 Scores) |
bad_nps_rate_str | String | No | Neg. Feedback % (10 Scores) |
nps_score10_rate_str | String | No | 10 Scores % |
nps_score9_rate_str | String | No | 9 Scores % |
nps_score8_rate_str | String | No | 8 Scores % |
nps_score7_rate_str | String | No | 7 Scores % |
nps_score6_rate_str | String | No | 6 Scores % |
nps_score5_rate_str | String | No | 5 Scores % |
nps_score4_rate_str | String | No | 4 Scores % |
nps_score3_rate_str | String | No | 3 Scores % |
nps_score2_rate_str | String | No | 2 Scores % |
nps_score1_rate_str | String | No | 1 Scores % |
level2_score5 | Integer | No | Satisfication Chats (level 2 evaluation) |
level2_score1 | Integer | No | Dissatisfication Chats (level 2 evaluation) |
good | Integer | No | Chats with Positive Feedback (5 Stars) |
middle | Integer | No | Chats with Moderate Feedback (5 Stars) |
bad | Integer | No | Chats with Neg. Feedback (5 Stars) |
score5 | Integer | No | 5-Star Chats |
score4 | Integer | No | 4-Star Chats |
score3 | Integer | No | 3-Star Chats |
score2 | Integer | No | 2-Star Chats |
score1 | Integer | No | 1-Star Chats |
nps_good | Integer | No | Chats with Positive Feedback (10 Scores) |
nps_middle | Integer | No | Chats with Moderate Feedback (10 Scores) |
nps_bad | Integer | No | Chats with Neg. Feedback (10 Scores) |
nps_score10 | Integer | No | 10-Score Chats |
nps_score9 | Integer | No | 9-Score Chats |
nps_score8 | Integer | No | 8-Score Chats |
nps_score7 | Integer | No | 7-Score Chats |
nps_score6 | Integer | No | 6-Score Chats |
nps_score5 | Integer | No | 5-Score Chats |
nps_score4 | Integer | No | 4-Score Chats |
nps_score3 | Integer | No | 3-Score Chats |
nps_score2 | Integer | No | 2-Score Chats |
nps_score1 | Integer | No | 1-Score Chats |
remark | Integer | No | Remarks |
Request example:
curl--location'https://sg.sobot.io/chat-static-api/api/customerService/staffWorkStatis'\
--header 'token: c84f8b6f5885434da40d8449eb15c7f1' \
--header 'language: en' \
--header 'timezoneid: Asia/Shanghai' \
--header 'Content-Type: application/json' \
--data '{
"search_way":"1",
"start_date": "2023-04-01",
"end_date": "2023-06-30",
"staff_id_list": ["staff_id1","staff_id2"],
"group_id_list": ["group_id1","group_id2"],
"page_no": "1",
"page_size": "15"
}'
2
3
4
5
6
7
8
9
10
11
12
13
14
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"page_no": 1,
"page_count": 1,
"total_count": 5,
"page_size": 15,
"items": [
{
"start_date": "2025-03-19",
"end_date": "2025-04-17",
"group_id": "5a06cfe6bdac42419c56ec7e15dd64e9",
"group_name": "group1",
"staff_id": "0a8c83731fd04728ac2ed13e9ef180dc",
"service_email": "staff1@zhichi.com",
"service_nick": "staff1",
"human_consult": 7,
"human_self": 0,
"human_valid": 4,
"valid_information": 0,
"human_invalid": 3,
"human_valid_recep": 0,
"human_invalid_recep": 0,
"first_response_time_set": 0,
"transfer_first_res_duration": 0,
"human_visitor_consult": 4,
"valid_recep_rate_str": "0.00%",
"roll_in": 1,
"roll_out": 1,
"human_not_recep": 4,
"not_recep_rate_str": "100.00%",
"last_staff_consult": 6,
"quiet_after_session_count": 2,
"quiet_after_session_rate_str": "33.33%",
"human_initiative": 0,
"human_consult_duration": 2099106,
"human_consult_duration_str": "00:34:59",
"avg_session_duration": 301885.75,
"avg_session_duration_str": "00:05:01",
"avg_total_session_duration": 299872.2857,
"avg_total_session_duration_str": "00:04:59",
"summary_solved": 0,
"summary_not_solved": 0,
"solve_not_mark": 7,
"lastmsg_staff": 0,
"snatch_in": 0,
"snatch_out": 0,
"staff_connect_rate_str": "0.00%",
"avg_human_confirm_duration_transfer": 9073,
"avg_human_confirm_duration_transfer_str": "00:00:09",
"total_human_message": 9,
"msg_staff": 0,
"msg_visitor_tostaff": 9,
"answer_than_str": "0.00%",
"msg_staff_wordcount": 0,
"avg_first_response_time": 353669.5,
"avg_first_response_time_str": "00:05:53",
"first_response_rate_str": "0.00%",
"transfer_first_response_rate_str": "0.00%",
"response_time_avg": 353669.5,
"response_time_avg_str": "00:05:53",
"response_duration_max": 818770,
"response_duration_max_str": "00:13:38",
"first_response_in30s_rate_str": "0.00%",
"first_response_in60s_rate_str": "0.00%",
"total_times": 1,
"comment_rate_str": "25.00%",
"initiative": 0,
"customer_initiative_rate_str": "0.00%",
"invite_counts": 0,
"invite_counts_rate_str": "0.00%",
"invites": 1,
"staff_invite_rate_str": "100.00%",
"avg_comment_score": 0,
"good_rate_str": "0.00%",
"middle_rate_str": "0.00%",
"bad_rate_str": "0.00%",
"score5_rate_str": "0.00%",
"score4_rate_str": "0.00%",
"score3_rate_str": "0.00%",
"score2_rate_str": "0.00%",
"score1_rate_str": "0.00%",
"avg_nps_score": 10,
"good_nps_rate_str": "100.00%",
"middle_nps_rate_str": "0.00%",
"bad_nps_rate_str": "0.00%",
"nps_score10_rate_str": "100.00%",
"nps_score9_rate_str": "0.00%",
"nps_score8_rate_str": "0.00%",
"nps_score7_rate_str": "0.00%",
"nps_score6_rate_str": "0.00%",
"nps_score5_rate_str": "0.00%",
"nps_score4_rate_str": "0.00%",
"nps_score3_rate_str": "0.00%",
"nps_score2_rate_str": "0.00%",
"nps_score1_rate_str": "0.00%",
"nps_score0_rate_str": "0.00%",
"good": 0,
"middle": 0,
"bad": 0,
"score5": 0,
"score4": 0,
"score3": 0,
"score2": 0,
"score1": 0,
"nps_good": 1,
"nps_middle": 0,
"nps_bad": 0,
"nps_score10": 1,
"nps_score9": 0,
"nps_score8": 0,
"nps_score7": 0,
"nps_score6": 0,
"nps_score5": 0,
"nps_score4": 0,
"nps_score3": 0,
"nps_score2": 0,
"nps_score1": 0,
"nps_score0": 0,
"level2_score1": 0,
"level2_score5": 0,
"level2_score1_rate_str": "0.00%",
"level2_score5_rate_str": "0.00%",
"remark": 0,
"valid_response_counts": 0,
"response_rate_str": "0.00%",
"max_conv_num": "1",
"human_res_warn_count": 3,
"response_counts": 4,
"human_res_warn_rate_str": "75.00%"
},
{
"start_date": "2025-03-19",
"end_date": "2025-04-17",
"group_id": "5a06cfe6bdac42419c56ec7e15dd64e9",
"group_name": "group2",
"staff_id": "903965b75366482dbc95a4322538e2c8",
"service_email": "staff2@zhichi.com",
"service_nick": "staff2",
"human_consult": 9,
"human_self": 1,
"human_valid": 6,
"valid_information": 0,
"human_invalid": 3,
"human_valid_recep": 1,
"human_invalid_recep": 0,
"first_response_time_set": 0,
"transfer_first_res_duration": 0,
"human_visitor_consult": 6,
"valid_recep_rate_str": "16.67%",
"roll_in": 0,
"roll_out": 0,
"human_not_recep": 5,
"not_recep_rate_str": "83.33%",
"last_staff_consult": 9,
"quiet_after_session_count": 2,
"quiet_after_session_rate_str": "22.22%",
"human_initiative": 0,
"human_consult_duration": 4363974,
"human_consult_duration_str": "01:12:43",
"avg_session_duration": 228155.6667,
"avg_session_duration_str": "00:03:48",
"avg_total_session_duration": 484886,
"avg_total_session_duration_str": "00:08:04",
"summary_solved": 0,
"summary_not_solved": 0,
"solve_not_mark": 9,
"lastmsg_staff": 1,
"snatch_in": 0,
"snatch_out": 0,
"staff_connect_rate_str": "16.67%",
"avg_human_confirm_duration_transfer": 0,
"avg_human_confirm_duration_transfer_str": "00:00:00",
"total_human_message": 14,
"msg_staff": 7,
"msg_visitor_tostaff": 7,
"answer_than_str": "100.00%",
"msg_staff_wordcount": 50,
"avg_first_response_time": 392346,
"avg_first_response_time_str": "00:06:32",
"first_response_rate_str": "0.00%",
"transfer_first_response_rate_str": "0.00%",
"response_time_avg": 392346,
"response_time_avg_str": "00:06:32",
"response_duration_max": 572595,
"response_duration_max_str": "00:09:32",
"first_response_in30s_rate_str": "0.00%",
"first_response_in60s_rate_str": "0.00%",
"total_times": 0,
"comment_rate_str": "0.00%",
"initiative": 0,
"customer_initiative_rate_str": "0.00%",
"invite_counts": 0,
"invite_counts_rate_str": "0.00%",
"invites": 0,
"staff_invite_rate_str": "0.00%",
"avg_comment_score": 0,
"good_rate_str": "0.00%",
"middle_rate_str": "0.00%",
"bad_rate_str": "0.00%",
"score5_rate_str": "0.00%",
"score4_rate_str": "0.00%",
"score3_rate_str": "0.00%",
"score2_rate_str": "0.00%",
"score1_rate_str": "0.00%",
"avg_nps_score": 0,
"good_nps_rate_str": "0.00%",
"middle_nps_rate_str": "0.00%",
"bad_nps_rate_str": "0.00%",
"nps_score10_rate_str": "0.00%",
"nps_score9_rate_str": "0.00%",
"nps_score8_rate_str": "0.00%",
"nps_score7_rate_str": "0.00%",
"nps_score6_rate_str": "0.00%",
"nps_score5_rate_str": "0.00%",
"nps_score4_rate_str": "0.00%",
"nps_score3_rate_str": "0.00%",
"nps_score2_rate_str": "0.00%",
"nps_score1_rate_str": "0.00%",
"nps_score0_rate_str": "0.00%",
"good": 0,
"middle": 0,
"bad": 0,
"score5": 0,
"score4": 0,
"score3": 0,
"score2": 0,
"score1": 0,
"nps_good": 0,
"nps_middle": 0,
"nps_bad": 0,
"nps_score10": 0,
"nps_score9": 0,
"nps_score8": 0,
"nps_score7": 0,
"nps_score6": 0,
"nps_score5": 0,
"nps_score4": 0,
"nps_score3": 0,
"nps_score2": 0,
"nps_score1": 0,
"nps_score0": 0,
"level2_score1": 0,
"level2_score5": 0,
"level2_score1_rate_str": "0.00%",
"level2_score5_rate_str": "0.00%",
"remark": 0,
"valid_response_counts": 0,
"response_rate_str": "16.67%",
"max_conv_num": "1",
"human_res_warn_count": 2,
"response_counts": 6,
"human_res_warn_rate_str": "33.33%"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# ● Work Status(Paging)
Request method:
POST
Request URL:
/chat-static-api/api/online/staff/getWorkLogList
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
start_date | String | Yes | Time of Chat Connecting | pattern:yyyy-MM-dd |
end_date | String | Yes | Chat End Time | pattern:yyyy-MM-dd |
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
staff_ids_param | String | No | Agent IDs | In case of two or more, separate by ",", such as "1,2" |
page | String | Yes | Current page | Default 1 |
size | String | Yes | Page Number | 15 by default |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
page_no | String | Yes | Current page |
page_count | String | Yes | Total pages |
page_size | String | Yes | Page Number |
total_count | String | Yes | Total Pieces of Data |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
staff_id | String | No | Agent ID |
staff_name | String | No | Agent Name |
department_id | String | No | Department ID |
department_name | String | No | Department |
start_login_time | Long | No | First login time (millisecond-level timestamp) |
first_login_time | Long | No | First online time (millisecond-level timestamp) |
online_duration | Long | No | Online duration (milliseconds) |
busy_counts | Integer | No | Number of busy times |
busy_all_duration | Long | No | Busy duration (milliseconds) |
rest_duration | Long | No | Break duration (milliseconds) |
eat_duration | Long | No | Meal duration (milliseconds) |
active_duration | Long | No | Activity duration (milliseconds) |
train_duration | Long | No | Training duration (milliseconds) |
meet_duration | Long | No | Meeting duration (milliseconds) |
last_leave_time | Long | No | Last offline time (millisecond-level timestamp) |
Request example:
curl --location '/chat-static-api/api/online/staff/getWorkLogList' \
--header 'token: c84f8b6f5885434da40d8449eb15c7f1' \
--header 'language: en' \
--header 'timezoneid: Asia/Shanghai' \
--header 'Content-Type: application/json' \
--data '{
"start_date": "2025-04-01",
"end_date": "2025-06-30",
"staff_id_list": ["staff_id1","staff_id2"],
"group_id_list": ["group_id1","group_id2"],
"page": "1",
"size": "2"
}'
2
3
4
5
6
7
8
9
10
11
12
13
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"page_no": 1,
"page_count": 5,
"total_count": 9,
"page_size": 2,
"items": [
{
"staff_id": "e6d913b5c1e346558b55e4720f7f49b2",
"staff_name": "[]",
"department_id": "913d909e3a194598ba61cf904b5dc12a|11b97b04eaea4f89b84fcbb75e41a3d6",
"department_name": "Headquarters",
"group_id": "135cbdc489f9412881ae97781bc0999a,2a5171b2a85d49bda666f1569588d12e,18634c519b134cce9cd3a663297ba9e9,284a84325e504b5489179b925ec01e54",
"group_name": "Super Admin1, Session Statistics Test, Super Admin Group, lzc",
"start_login_time": "1747893918830",
"free_duration": "11529665",
"app_free_duration": "0",
"online_duration": "11529665",
"busy_counts": "1",
"busy_duration": "2059",
"app_busy_duration": "0",
"busy_all_duration": "2059",
"rest_duration": "0",
"eat_duration": "0",
"active_duration": "0",
"train_duration": "0",
"meet_duration": "0",
"last_leave_time": "1747898942095",
"first_login_time": "1743478293005",
"result_month": "2025-04",
"result_week": "14",
"result_date": "2025-04-01",
"result_year": "2025",
"company_id": "913d909e3a194598ba61cf904b5dc12a",
"start_date": "2025-04-01",
"end_date": "2025-07-09"
},
{
"staff_id": "642d296772cf45ca99bc2a280bef6c10",
"staff_name": "Zhao Chen",
"department_id": "913d909e3a194598ba61cf904b5dc12a|11b97b04eaea4f89b84fcbb75e41a3d6",
"department_name": "Headquarters",
"group_id": "3b4a3eb565f74558a0b746023a85e0ad,284a84325e504b5489179b925ec01e54,135cbdc489f9412881ae97781bc0999a",
"group_name": "Test, lzc, Super Admin 1",
"start_login_time": "1751953173368",
"free_duration": "273494425",
"app_free_duration": "0",
"online_duration": "273494425",
"busy_counts": "1",
"busy_duration": "1637",
"app_busy_duration": "0",
"busy_all_duration": "1637",
"rest_duration": "0",
"eat_duration": "0",
"active_duration": "0",
"train_duration": "0",
"meet_duration": "0",
"last_leave_time": "1751953702117",
"first_login_time": "1743481451524",
"result_month": "2025-04",
"result_week": "14",
"result_date": "2025-04-01",
"result_year": "2025",
"company_id": "913d909e3a194598ba61cf904b5dc12a",
"start_date": "2025-04-01",
"end_date": "2025-07-09"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# Satisfaction Statistics API
# ● Query for Session Satisfaction Statistics
Request method:
POST
Request URL:
/chat-static-api/api/online/satisfaction/getSatisfactionSurvey
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
start_date | String | Yes | Time of Chat Connecting | pattern:yyyy-MM-dd |
end_date | String | Yes | Chat End Time | pattern:yyyy-MM-dd |
search_way | Integer | Yes | 1-Department 2-Skill Group 3-Channel | Default: search_way=1 |
source | String | No | Channel Type | In case of two or more, separate by ",", such as "1,2" |
channel_flag | String | No | channel_flag_key | In case of two or more, separate by ",", such as "1,2" |
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
group_ids_param | String | No | Skill Group IDs | In case of two or more, separate by ",", such as "1,2" |
staff_ids_param | String | No | Agent IDs | In case of two or more, separate by ",", such as "1,2" |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
item | Object | No | Return object |
item object:
Param | Type | Required | Description |
---|---|---|---|
Overview Data | |||
human_valid | Integer | No | Valid Agent Chats |
human_valid_ratio | String | No | Valid Agent Chats MoM |
total_times | Integer | No | Chat Feedback |
total_times_ratio | String | No | Chat Feedback MoM |
comment_rate_str | String | No | Feedback % |
comment_rate_str_ratio | String | No | Feedback % MoM |
valid_reception_comment_rate_str | String | No | Valid Reception Chat Feedback % |
valid_reception_comment_rate_str_ratio | String | No | Valid Reception Chat Feedback % MoM |
initiative | Integer | No | Proactive Customer Feedback |
initiative_ratio | String | No | Proactive Customer Feedback MoM |
customer_initiative_rate_str | String | No | Proactive Customer Feedback % |
customer_initiative_rate_str_ratio | String | No | Proactive Customer Feedback % MoM |
invite_counts_rate_str | String | No | Agent Invitation % |
invite_counts_rate_str_ratio | String | No | Agent Invitation % MoM |
invite_counts | Integer | No | Agent Invitations |
invite_counts_ratio | String | No | Agent Invitations MoM |
staff_invite_rate_str | String | No | Invited Feedback % |
staff_invite_rate_str_ratio | String | No | Invited Feedback % MoM |
invites | Integer | No | Agent-Invited Feedback |
invites_ratio | String | No | Agent-Invited Feedback MoM |
not_solved | Integer | No | Unresolved Evaluation |
not_solved_ratio | Integer | No | Unresolved Evaluation MoM |
not_solved_rate_str | String | No | Unresolved Evaluation % |
not_solved_rate_str_ratio | String | No | Unresolved Evaluation % MoM |
solved | Integer | No | Resolved Evaluation |
solved_ratio | String | No | Resolved Evaluation MoM |
solved_rate_str | String | No | Resolved Evaluation % |
solved_rate_str_ratio | String | No | Resolved Evaluation % MoM |
solved_count | Integer | No | Total Resolved Evaluation |
solved_count_ratio | Integer | No | Total Resolved Evaluation MoM |
Level 2 Evaluation Data | |||
level2_score5 | Integer | No | Number Of Satisfied Chats |
level2_score5_ratio | String | No | Number Of Satisfied Chats MoM |
level2_score5_rate_str | String | No | Satisfaction Rate |
level2_score5_rate_str_ratio | String | No | Satisfaction Rate MoM |
level2_score1 | Integer | No | Number Of Dissatisfied Chats |
level2_score1_ratio | String | No | Number Of Dissatisfied Chats MoM |
level2_score1_rate_str | String | No | Dissatisfaction Rate |
level2_score1_rate_str_ratio | String | No | Dissatisfaction Rate MoM |
Rating Data | |||
avg_comment_score | String | No | Avg. Score (5 Stars) |
avg_comment_score_ratio | String | No | Avg. Score MoM(5 Stars) |
good | Integer | No | Chats with Positive Feedback |
good_ratio | String | No | Chats with Positive Feedback MoM |
good_rate_str | String | No | Positive Feedback % |
good_rate_str_ratio | String | No | Positive Feedback % MoM |
middle | Integer | No | Chats with Moderate Feedback |
middle_ratio | String | No | Chats with Moderate Feedback MoM |
middle_rate_str | String | No | Moderate Feedback % |
middle_rate_str_ratio | String | No | Moderate Feedback % MoM |
bad | Integer | No | Chats with Neg. Feedback |
bad_ratio | String | No | Chats with Neg. Feedback MoM |
bad_rate_str | String | No | Neg. Feedback % |
bad_rate_str_ratio | String | No | Neg. Feedback % MoM |
score5 | Integer | No | 5 Stars Chats |
score5_ratio | String | No | 5 Stars Chats MoM |
score4 | Integer | No | 4 Stars Chats |
score4_ratio | String | No | 4 Stars Chats MoM |
score3 | Integer | No | 3 Stars Chats |
score3_ratio | String | No | 3 Stars Chats MoM |
score2 | Integer | No | 2 Stars Chats |
score2_ratio | String | No | 2 Stars Chats MoM |
score1 | Integer | No | 1 Stars Chats |
score1_ratio | String | No | 1 Stars Chats MoM |
score5_rate_str | String | No | 5 Stars Chat % |
score5_rate_str_ratio | String | No | 5 Stars Chat % MoM |
score4_rate_str | String | No | 4 Stars Chat % |
score4_rate_str_ratio | String | No | 4 Stars Chat % MoM |
score3_rate_str | String | No | 3 Stars Chat % |
score3_rate_str_ratio | String | No | 3 Stars Chat % MoM |
score2_rate_str | String | No | 2 Stars Chat % |
score2_rate_str_ratio | String | No | 2 Stars Chat % MoM |
score1_rate_str | String | No | 1 Stars Chat % |
score1_rate_str_ratio | String | No | 1 Stars Chat % MoM |
Scoring Data | |||
avg_nps_score | String | No | Avg. Score (10 Scores) |
avg_nps_score_ratio | String | No | Avg. Score MoM(10 Scores) |
nps_good | Integer | No | Chats with Positive Feedback |
nps_good_ratio | String | No | Chats with Positive Feedback MoM |
good_nps_rate_str | String | No | Positive Feedback % |
good_nps_rate_str_ratio | String | No | Positive Feedback % MoM |
nps_middle | Integer | No | Chats with Moderate Feedback |
nps_middle_ratio | String | No | Chats with Moderate Feedback MoM |
middle_nps_rate_str | String | No | Moderate Feedback % |
middle_nps_rate_str_ratio | String | No | Moderate Feedback % MoM |
nps_bad | Integer | No | Chats with Neg. Feedback |
nps_bad_ratio | String | No | Chats with Neg. Feedback |
bad_nps_rate_str | String | No | Neg. Feedback % |
bad_nps_rate_str_ratio | String | No | Neg. Feedback % MoM |
nps_score10 | Integer | No | 10 Scores Chats |
nps_score10_ratio | String | No | 10 Scores Chats MoM |
nps_score9 | Integer | No | 9 Scores Chats |
nps_score9_ratio | String | No | 9 Scores Chats MoM |
nps_score8 | Integer | No | 8 Scores Chats |
nps_score8_ratio | String | No | 8 Scores Chats MoM |
nps_score7 | Integer | No | 7 Scores Chats |
nps_score7_ratio | String | No | 7 Scores Chats MoM |
nps_score6 | Integer | No | 6 Scores Chats |
nps_score6_ratio | String | No | 6 Scores Chats MoM |
nps_score5 | Integer | No | 5 Scores Chats |
nps_score5_ratio | String | No | 5 Scores Chats MoM |
nps_score4 | Integer | No | 4 Scores Chats |
nps_score4_ratio | String | No | 4 Scores Chats MoM |
nps_score3 | Integer | No | 3 Scores Chats |
nps_score3_ratio | String | No | 3 Scores Chats MoM |
nps_score2 | Integer | No | 2 Scores Chats |
nps_score2_ratio | String | No | 2 Scores Chats MoM |
nps_score1 | Integer | No | 1 Scores Chats |
nps_score1_ratio | String | No | 1 Scores Chats MoM |
nps_score0 | Integer | No | 0 Scores Chats |
nps_score0_ratio | String | No | 0 Scores Chats MoM |
nps_score10_rate_str | String | No | 10 Scores Chat % |
nps_score10_rate_str_ratio | String | No | 10 Scores Chat % MoM |
nps_score9_rate_str | String | No | 9 Scores Chat % |
nps_score9_rate_str_ratio | String | No | 9 Scores Chat % MoM |
nps_score8_rate_str | String | No | 8 Scores Chat % |
nps_score8_rate_str_ratio | String | No | 8 Scores Chat % MoM |
nps_score7_rate_str | String | No | 7 Scores Chat % |
nps_score7_rate_str_ratio | String | No | 7 Scores Chat % MoM |
nps_score6_rate_str | String | No | 6 Scores Chat % |
nps_score6_rate_str_ratio | String | No | 6 Scores Chat % MoM |
nps_score5_rate_str | String | No | 5 Scores Chat % |
nps_score5_rate_str_ratio | String | No | 5 Scores Chat % MoM |
nps_score4_rate_str | String | No | 4 Scores Chat % |
nps_score4_rate_str_ratio | String | No | 4 Scores Chat % MoM |
nps_score3_rate_str | String | No | 3 Scores Chat % |
nps_score3_rate_str_ratio | String | No | 3 Scores Chat % MoM |
nps_score2_rate_str | String | No | 2 Scores Chat % |
nps_score2_rate_str_ratio | String | No | 2 Scores Chat % MoM |
nps_score1_rate_str | String | No | 1 Scores Chat % |
nps_score1_rate_str_ratio | String | No | 1 Scores Chat % |
nps_score0_rate_str | String | No | 0 Scores Chat % |
nps_score0_rate_str_ratio | String | No | 0 Scores Chat % MoM |
Request example:
curl --location --request POST '/chat-static-api/api/online/satisfaction/getSatisfactionSurvey' \
--header 'token: 3a9da6809b0c4daebe4706d17e4bcf89' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"start_date": "2025-04-01",
"end_date": "2025-07-09",
"search_way": 1
}'
2
3
4
5
6
7
8
9
10
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"item": {
"human_valid": 1282,
"human_valid_ratio": "-46.18%",
"total_times": 687,
"total_times_ratio": "-70.60%",
"score_total_times": 684,
"nps_total_times": 0,
"comment_rate_str": "53.59%",
"comment_rate_str_ratio": "-45.38%",
"valid_reception_comment_rate_str": "93.72%",
"valid_reception_comment_rate_str_ratio": "-5.24%",
"initiative": 375,
"initiative_ratio": "-70.60%",
"customer_initiative_rate_str": "54.59%",
"customer_initiative_rate_str_ratio": "-0.34%",
"invite_counts_rate_str": "24.49%",
"invite_counts_rate_str_ratio": "-44.91%",
"invite_counts": 314,
"invite_counts_ratio": "-70.35%",
"staff_invite_rate_str": "45.41%",
"staff_invite_rate_str_ratio": "0.41%",
"invites": 312,
"invites_ratio": "-70.48%",
"not_solved": 312,
"not_solved_ratio": "-70.45%",
"not_solved_rate_str": "45.61%",
"not_solved_rate_str_ratio": "0.47%",
"solved": 372,
"solved_ratio": "-70.71%",
"solved_rate_str": "54.39%",
"solved_rate_str_ratio": "-0.39%",
"solved_count": 684,
"solved_count_ratio": "-70.59%",
"avg_comment_score": "3.00",
"avg_comment_score_ratio": "-0.99%",
"good": 156,
"good_ratio": "-66.95%",
"good_rate_str": "22.81%",
"good_rate_str_ratio": "12.49%",
"middle": 253,
"middle_ratio": "-73.06%",
"middle_rate_str": "36.99%",
"middle_rate_str_ratio": "-8.30%",
"bad": 275,
"bad_ratio": "-70.01%",
"bad_rate_str": "40.20%",
"bad_rate_str_ratio": "2.07%",
"score5": 156,
"score5_ratio": "-66.95%",
"score4": 112,
"score4_ratio": "-77.42%",
"score3": 141,
"score3_ratio": "-68.17%",
"score2": 125,
"score2_ratio": "-73.46%",
"score1": 150,
"score1_ratio": "-66.37%",
"score5_rate_str": "22.81%",
"score5_rate_str_ratio": "12.49%",
"score4_rate_str": "16.37%",
"score4_rate_str_ratio": "-23.15%",
"score3_rate_str": "20.61%",
"score3_rate_str_ratio": "8.33%",
"score2_rate_str": "18.27%",
"score2_rate_str_ratio": "-9.67%",
"score1_rate_str": "21.93%",
"score1_rate_str_ratio": "14.47%",
"avg_nps_score": "0.00",
"avg_nps_score_ratio": "NA",
"nps_good": 0,
"nps_good_ratio": "NA",
"good_nps_rate_str": "0.00%",
"good_nps_rate_str_ratio": "NA",
"nps_middle": 0,
"nps_middle_ratio": "NA",
"middle_nps_rate_str": "0.00%",
"middle_nps_rate_str_ratio": "NA",
"nps_bad": 0,
"nps_bad_ratio": "NA",
"bad_nps_rate_str": "0.00%",
"bad_nps_rate_str_ratio": "NA",
"nps_score10": 0,
"nps_score10_ratio": "NA",
"nps_score9": 0,
"nps_score9_ratio": "NA",
"nps_score8": 0,
"nps_score8_ratio": "NA",
"nps_score7": 0,
"nps_score7_ratio": "NA",
"nps_score6": 0,
"nps_score6_ratio": "NA",
"nps_score5": 0,
"nps_score5_ratio": "NA",
"nps_score4": 0,
"nps_score4_ratio": "NA",
"nps_score3": 0,
"nps_score3_ratio": "NA",
"nps_score2": 0,
"nps_score2_ratio": "NA",
"nps_score1": 0,
"nps_score1_ratio": "NA",
"nps_score0": 0,
"nps_score0_ratio": "NA",
"nps_score10_rate_str": "0.00%",
"nps_score10_rate_str_ratio": "NA",
"nps_score9_rate_str": "0.00%",
"nps_score9_rate_str_ratio": "NA",
"nps_score8_rate_str": "0.00%",
"nps_score8_rate_str_ratio": "NA",
"nps_score7_rate_str": "0.00%",
"nps_score7_rate_str_ratio": "NA",
"nps_score6_rate_str": "0.00%",
"nps_score6_rate_str_ratio": "NA",
"nps_score5_rate_str": "0.00%",
"nps_score5_rate_str_ratio": "NA",
"nps_score4_rate_str": "0.00%",
"nps_score4_rate_str_ratio": "NA",
"nps_score3_rate_str": "0.00%",
"nps_score3_rate_str_ratio": "NA",
"nps_score2_rate_str": "0.00%",
"nps_score2_rate_str_ratio": "NA",
"nps_score1_rate_str": "0.00%",
"nps_score1_rate_str_ratio": "NA",
"nps_score0_rate_str": "0.00%",
"nps_score0_rate_str_ratio": "NA",
"level2_score1": 0,
"level2_score1_ratio": "NA",
"level2_score5": 3,
"level2_score5_ratio": "-66.67%",
"level2_score1_rate_str": "0.00%",
"level2_score1_rate_str_ratio": "NA",
"level2_score5_rate_str": "100.00%",
"level2_score5_rate_str_ratio": "0.00%"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# ● Query for Customer Satisfaction Statistics
Request method:
POST
Request URL:
/chat-static-api/api/online/satisfaction/getCustomerSatisfaction
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
start_date | String | Yes | Time of Chat Connecting | pattern:yyyy-MM-dd |
end_date | String | Yes | Chat End Time | pattern:yyyy-MM-dd |
search_way | Integer | Yes | 1-Department 2-Skill Group 3-Channel | Default: search_way=1 |
source | String | No | Channel Type | In case of two or more, separate by ",", such as "1,2" |
channel_flag | String | No | channel_flag_key | In case of two or more, separate by ",", such as "1,2" |
depart_ids_param | String | No | Department IDs | In case of two or more, separate by ",", such as "1,2" |
group_ids_param | String | No | Skill Group IDs | In case of two or more, separate by ",", such as "1,2" |
staff_ids_param | String | No | Agent IDs | In case of two or more, separate by ",", such as "1,2" |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
item | Object | No | Return object |
item object:
Param | Type | Required | Description |
---|---|---|---|
Overview Data | |||
human_valid | Integer | No | Agent Valid Customers |
human_valid_change | String | No | Agent Valid Customers MoM |
human_in_valid_recep | Integer | No | Agent Validly Received Customers |
human_in_valid_recep_change | String | No | Agent Validly Received Customers MoM |
evaluate | String | No | Feedback Customers |
evaluate_change | String | No | Feedback Customers MoM |
solved | String | No | Resolved Evaluation Customers |
solved_change | String | No | Resolved Evaluation Customers MoM |
active_evaluate | Integer | No | Proactive Feedback Customers |
active_evaluate_change | String | No | Proactive Feedback Customers MoM |
staff_invite | String | No | Customers Invited by Agent |
staff_invite_change | String | No | Customers Invited by Agent MoM |
invite_evaluate | String | No | Customers Invited by Agent to Evaluate |
invite_evaluate_change | String | No | Customers Invited by Agent to Evaluate MoM |
Level 2 Evaluation Data | |||
level2_score5 | Integer | No | Number of Satisfied Chats |
level2_score5_change | String | No | Number of Satisfied Chats MoM |
level2_score1 | String | No | Number of Dissatisfied Chats |
level2_score1_change | String | No | Number of Dissatisfied Chats MoM |
Rating Data | |||
score5_average | String | No | Avg. Score (5 Stars) |
score5_average_change | String | No | Avg. Score MoM(5 Stars) |
score5 | String | No | 5-Star Rating |
score5_change | String | No | 5-Star Rating MoM |
score4 | String | No | 4-Star Rating |
score4_change | String | No | 4-Star Rating MoM |
score3 | String | No | 3-Star Rating |
score3_change | String | No | 3-Star Rating MoM |
score2 | String | No | 2-Star Rating |
score2_change | String | No | 2-Star Rating MoM |
score1 | String | No | 1-Star Rating |
score1_change | String | No | 1-Star Rating MoM |
Scoring Data | |||
nps10_average | String | No | Avg. Score (10 Scores) |
nps10_average_change | String | No | Avg. Score MoM(10 Scores) |
nps10 | String | No | 10 Score Rating |
nps10_change | String | No | 10 Score Rating MoM |
nps9 | String | No | 9 Score Rating |
nps9_change | String | No | 9 Score Rating MoM |
nps8 | String | No | 8 Score Rating |
nps8_change | String | No | 8 Score Rating MoM |
nps7 | String | No | 7 Score Rating |
nps7_change | String | No | 7 Score Rating MoM |
nps6 | String | No | 6 Score Rating |
nps6_change | String | No | 6 Score Rating MoM |
nps5 | String | No | 5 Score Rating |
nps5_change | String | No | 5 Score Rating MoM |
nps4 | String | No | 4 Score Rating |
nps4_change | String | No | 4 Score Rating MoM |
nps3 | String | No | 3 Score Rating |
nps3_change | String | No | 3 Score Rating MoM |
nps2 | String | No | 2 Score Rating |
nps2_change | String | No | 2 Score Rating MoM |
nps1 | String | No | 1 Score Rating |
nps1_change | String | No | 1 Score Rating MoM |
nps0 | String | No | 0 Score Rating |
nps0_change | String | No | 0 Score Rating MoM |
Request example:
curl --location --request POST '/chat-static-api/api/online/satisfaction/getCustomerSatisfaction' \
--header 'token: 3a9da6809b0c4daebe4706d17e4bcf89' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"start_date": "2025-04-01",
"end_date": "2025-07-09",
"search_way": 1
}'
2
3
4
5
6
7
8
9
10
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"item": {
"score5_average": "3.02",
"score5_average_change": "-0.27%",
"score5": "253",
"score5_change": "-66.71%",
"score4": "208",
"score4_change": "-73.23%",
"score3": "228",
"score3_change": "-68.60%",
"score2": "208",
"score2_change": "-73.02%",
"score1": "244",
"score1_change": "-66.02%",
"nps10_average": "0.00",
"nps10_average_change": "-100.00%",
"nps10": "0",
"nps10_change": "-100.00%",
"nps9": "0",
"nps9_change": "-100.00%",
"nps8": "0",
"nps8_change": "-100.00%",
"nps7": "0",
"nps7_change": "-100.00%",
"nps6": "0",
"nps6_change": "-100.00%",
"nps5": "0",
"nps5_change": "-100.00%",
"nps4": "0",
"nps4_change": "-100.00%",
"nps3": "0",
"nps3_change": "-100.00%",
"nps2": "0",
"nps2_change": "-100.00%",
"nps1": "0",
"nps1_change": "-100.00%",
"nps0": "0",
"nps0_change": "-100.00%",
"human_valid": "1672",
"human_valid_change": "-66.50%",
"human_in_valid_recep": "1156",
"human_in_valid_recep_change": "-75.33%",
"evaluate": "1149",
"evaluate_change": "-76.74%",
"solved": "622",
"solved_change": "-76.77%",
"active_evaluate": "632",
"active_evaluate_change": "-76.39%",
"staff_invite": "517",
"staff_invite_change": "-76.65%",
"invite_evaluate": "517",
"invite_evaluate_change": "-77.17%",
"level2_score1": "0",
"level2_score1_change": "-100.00%",
"level2_score5": "8",
"level2_score5_change": "100.00%"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.
# Service Summary Statistics API
# ● Service Summary Statistics Query
Request method:
POST
Request URL:
/chat-static-api/api/online/summary/search
Request param:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
start_date | String | Yes | Time of Chat Connecting | pattern:yyyy-MM-dd HH:mm:ss |
end_date | String | Yes | Chat End Time | pattern:yyyy-MM-dd HH:mm:ss |
summary_way | Integer | No | 0-Summary 1-Daily 2-Weekly 3-Monthly | Default: summary_way=0 |
group_ids_param | String | No | Skill Group IDs | In case of two or more, separate by ",", such as "1,2" |
page | Integer | No | Page | Default 1 |
size | Integer | No | Number on each page | Default 15,The maximum allowed is 100, and if it exceeds 100, it will be reset to 100. |
level_classifys | List | No | Service Classification | In case of two or more, separate by ",", such as "1,2" |
Level_classifys object:
Param | Type | Required | Description | Remarks |
---|---|---|---|---|
classify_id | String | Yes | Category ID | id |
level | Integer | Yes | Category level | classify_level |
Return param:
Param | Type | Required | Description |
---|---|---|---|
ret_code | String | Yes | Return code |
ret_msg | String | Yes | Return message |
page_no | String | Yes | Current page |
page_count | String | Yes | Total pages |
page_size | String | Yes | Page Number |
total_count | String | Yes | Total Pieces of Data |
items | List | No | Return object |
items object:
Param | Type | Required | Description |
---|---|---|---|
level | Integer | No | Category level |
classify_id | String | No | Category ID |
classify_show_name | String | No | Service Category |
details | List | No | Details of classified aggregate metrics |
details object:
Param | Type | Required | Description |
---|---|---|---|
show_date | String | No | Display time |
real_date | String | No | time |
total_conversation_num | Integer | No | Total Chats |
service_invited_num | Integer | No | Agent Invitations |
initiative_comment_num | Integer | No | Proactive Customer Feedback |
comment_type_total_num | Integer | No | Chat Feedback |
star_level_num5 | Integer | No | 5 Star Rating |
star_level_num4 | Integer | No | 4 Star Rating |
star_level_num3 | Integer | No | 3 Star Rating |
star_level_num2 | Integer | No | 2 Star Rating |
star_level_num1 | Integer | No | 1 Star Rating |
score_num10 | Integer | No | 10 Score Rating |
score_num9 | Integer | No | 9 Score Rating |
score_num8 | Integer | No | 8 Score Rating |
score_num7 | Integer | No | 7 Score Rating |
score_num6 | Integer | No | 6 Score Rating |
score_num5 | Integer | No | 5 Score Rating |
score_num4 | Integer | No | 4 Score Rating |
score_num3 | Integer | No | 3 Score Rating |
score_num2 | Integer | No | 2 Score Rating |
score_num1 | Integer | No | 1 Score Rating |
score_num0 | Integer | No | 0 Score Rating |
Request example:
curl --location --request POST '/chat-static-api/api/online/summary/search' \
--header 'token: dce986ca86bf4244ac179d996b85023a' \
--header 'timezoneid: Asia/Shanghai' \
--header 'language: en' \
--header 'Content-Type: application/json' \
--data-raw '{
"summary_way": 2,
"start_date": "2024-11-04 00:00:00",
"end_date": "2024-11-05 23:59:59",
"group_ids_param": "",
"level_classifys": [
{
"classify_id": "1675771496144510978",
"level": 1
},
{
"classify_id": "1853733211749933058",
"level": 1
}
],
"page": 1,
"size": 15
}'
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Return example:
{
"ret_code": "000000",
"ret_msg": "Succeed",
"page_no": 1,
"page_count": 1,
"total_count": 2,
"page_size": 15,
"items": [
{
"details": [
{
"show_date": "45 week 2024-11-04-2024-11-10",
"real_date": "2024-45",
"total_conversation_num": 2,
"service_invited_num": 0,
"initiative_comment_num": 0,
"comment_type_total_num": 0,
"star_level_num1": 0,
"star_level_num2": 0,
"star_level_num3": 0,
"star_level_num4": 0,
"star_level_num5": 0,
"score_num0": 0,
"score_num1": 0,
"score_num2": 0,
"score_num3": 0,
"score_num4": 0,
"score_num5": 0,
"score_num6": 0,
"score_num7": 0,
"score_num8": 0,
"score_num9": 0,
"score_num10": 0
}
],
"level": "1",
"classify_id": "1675771496144510978",
"classify_show_name": "Category 2"
},
{
"details": [
{
"show_date": "45 week 2024-11-04-2024-11-10",
"real_date": "2024-45",
"total_conversation_num": 2,
"service_invited_num": 0,
"initiative_comment_num": 0,
"comment_type_total_num": 0,
"star_level_num1": 0,
"star_level_num2": 0,
"star_level_num3": 0,
"star_level_num4": 0,
"star_level_num5": 0,
"score_num0": 0,
"score_num1": 0,
"score_num2": 0,
"score_num3": 0,
"score_num4": 0,
"score_num5": 0,
"score_num6": 0,
"score_num7": 0,
"score_num8": 0,
"score_num9": 0,
"score_num10": 0
}
],
"level": "1",
"classify_id": "1853733211749933058",
"classify_show_name": "Category 3"
}
]
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Description:
- Currently, there is rate limiting for the API. When ret_code=229000, it indicates that the API has been rate-limited, with a current maximum allowance of 20 calls per minute.