智能体活动日志是指每当小部件的状态发生变化时创建的记录。这些记录可能是智能体登录小部件、收到 deltacast 通话通知或接听通话等状态。每项活动都会创建一个新的 new 对象。请参阅以下模型,以验证哪些字段可能包含 (PII):
[
{
"id": 0,
"agent_id": 0,
"whodunnit": {
"id": 0,
"name": "string",
"last_name": "string",
"first_name": "string",
"agent_number": "string",
"avatar_url": "string"
},
"status": {
"id": 0,
"name": "string",
"color": "string"
},
"started_at": "2018-06-06T21:12:24.766Z",
"ended_at": "2018-06-06T21:12:24.766Z",
"duration": 0,
"activity": "login",
"call_id": 0,
"chat_id": 0
}
]
下表汇总了每项可能导致创建活动日志的活动。
| 活动 | 说明 |
|---|---|
| chat_picked_up | 智能体接听智能体时发生的事件 |
| chat_pick_up_attempt | 智能体尝试成为响应智能体时发生的事件 |
| chat_notification_offered | 最终用户请求聊天会话后,系统会向分配给该队列的智能体发送通知,此时会发生此事件。 |
| call_notification_offered | 最终用户拨打电话时,系统会向智能体提供多播或 deltacast 通话通知,此时会发生此事件。 |
| call_pick_up_attempt | 智能体尝试接听多播或 deltacast 通话时发生的事件。 |
| call_picked_up | 智能体接听多播或 deltacast 通话时发生的事件。 |
| deltacast_call_notification_offered | 此事件表示最终用户已拨入具有多播功能的队列,然后系统会向该队列中的智能体广播 deltacast 通话。 |
| deltacast_call_pick_up_attempt | 智能体尝试接听 deltacsted 通话时发生的事件 |
| deltacast_call_picked_up | 智能体成功接听 deltacasted 通话时发生的事件。 |
| deltacast_call_missed | 智能体未接听 deltacasted 通话时发生的事件 |
| multicast_call_notification_offered | 此事件表示最终用户已拨入具有多播功能的队列,然后系统会向该队列中的智能体广播多播通话 |
| multicast_call_pick_up_attempt | 智能体尝试接听多播通话时发生的事件 |
| multicast_call_picked_up | 智能体已接听多播通话时发生的事件 |
| call_outbound_dialing | 智能体使用小部件中的拨号盘拨打最终用户电话时发生的事件。 |
| user_status_changed | 智能体更改小部件所处状态时发生的事件 |
| login | 智能体退出小部件时发生的事件 |
| logout | 智能体登录小部件时发生的事件 |
智能体活动日志
| 参数 | 必需 | 数据类型 | 定义 |
|---|---|---|---|
| sort_column | FALSE | 字符串 | 根据响应对象中的任何字段对响应进行排序。 |
| sort_direction | FALSE | ASC 或 DESC | 记录排序方向,无论是升序还是降序 |
| page | FALSE | 字符串 | 与 per 配对,用于记录记录的页码。例如,如果 per 设置为 200,page 设置为 2,则响应将包含记录 201-400,因为第 1 页将包含记录 1-200。 |
| per | FALSE | 字符串 | 与 page 配对,用于记录一页记录中包含的记录数。例如,如果 per 设置为 200,page 设置为 2,则响应将包含记录 201-400,因为第 1 页将包含记录 1-200。 |
| started_at[from] | FALSE | UTC 时间 | 创建 started at 字段的下限。返回的所有记录都将晚于输入的值。 |
| started_at[to] | FALSE | UTC 时间 | 创建 started at 字段的上限。返回的所有记录都将早于输入的值。 |
| ended_at[from] | FALSE | UTC 时间 | 创建 ended at 字段的下限。返回的所有记录都将晚于输入的值。 |
| ended_at[to] | FALSE | UTC 时间 | 创建 ended at 字段的上限。返回的所有记录都将早于输入的值。 |
| duration[from] | FALSE | 数字 | 创建 duration 字段的下限。返回的所有记录都将晚于输入的值。 |
| duration[to] | FALSE | 数字 | 创建 duration 字段的上限。返回的所有记录都将早于输入的值。 |
| id[] | FALSE | 数组 [字符串] | 数组 [字符串]。要搜索和返回的记录的 ID |
| agent_id[] | FALSE | 数组 [字符串] | 按智能体 ID 过滤响应 |
| activity[] | FALSE | 数组 [字符串] | 按智能体完成的任务/活动过滤记录。可能的值包括:login、logout、call_outbound_dialing、deltacast_call_notification_offered、deltacast_call_pick_up_attempt、deltacast_call_picked_up、deltacast_call_projected、deltacast_call_missed、deltacast_call_bounced、multicast_call_notification_offered、multicast_call_pick_up_attempt、multicast_call_picked_up、user_status_changed、chat_notification_offered、chat_pick_up_attempt、chat_picked_up |
| whodunnit_id[] | FALSE | 数组 [字符串] | 按智能体 ID 过滤响应。Whodunnit 是智能体对象的一个子集,并使用相同的 agent_id 作为其主键 |
| call_id[] | FALSE | 数组 [字符串] | 按输入的通话 ID 过滤记录 |
| chat_id[] | FALSE | 数组 [字符串] | 按输入的聊天 ID 过滤记录 |
端点:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/agent_activity_logs
更多请求/响应示例:
请求示例:智能体活动日志示例
正文:无
响应示例:智能体活动日志示例
[
{
"id": 190578,
"agent_id": 118,
"status": {
"id": -10,
"name": "Offline",
"color": "grey",
},
"started_at": "2017-12-22T00:54:18.000Z",
"ended_at": null,
"duration": 0,
"call_id": null,
"chat_id": null,
"activity": "logout",
"whodunnit": null
},
{
"id": 199548,
"agent_id": 118,
"status": {
"id": -10,
"name": "Offline",
"color": "grey",
},
"started_at": "2018-01-09T22:54:26.000Z",
"ended_at": null,
"duration": 0,
"call_id": null,
"chat_id": null,
"activity": "logout",
"whodunnit": null
},
{
"id": 190577,
"agent_id": 118,
"status": {
"id": -10,
"name": "Offline",
"color": "grey",
},
"started_at": "2017-12-22T00:54:18.000Z",
"ended_at": "2018-01-08T22:54:22.000Z",
"duration": 1548004,
"call_id": null,
"chat_id": null,
"activity": "user_status_changed",
"whodunnit": null
},
{
"id": 199547,
"agent_id": 118,
"status": {
"id": -10,
"name": "Offline",
"color": "grey",
},
"started_at": "2018-01-09T22:54:26.000Z",
"ended_at": null,
"duration": 0,
"call_id": null,
"chat_id": null,
"activity": "user_status_changed",
"whodunnit": null
},
{
"id": 190270,
"agent_id": 118,
"status": {
"id": -1,
"name": "Unavailable",
"color": "red",
},
"started_at": "2017-12-21T21:34:14.000Z",
"ended_at": "2017-12-22T00:54:18.000Z",
"duration": 12004,
"call_id": null,
"chat_id": null,
"activity": "user_status_changed",
"whodunnit": null
},
{
"id": 198036,
"agent_id": 118,
"status": {
"id": -1,
"name": "Unavailable",
"color": "red",
},
"started_at": "2018-01-08T22:54:22.000Z",
"ended_at": "2018-01-09T22:54:26.000Z",
"duration": 86404,
"call_id": null,
"chat_id": null,
"activity": "user_status_changed",
"whodunnit": null
},
{
"id": 22249,
"agent_id": 129,
"status": {
"id": -10,
"name": "Offline",
"color": "grey",
},
"started_at": "2017-06-19T18:34:39.000Z",
"ended_at": null,
"duration": 0,
"call_id": null,
"chat_id": null,
"activity": "login",
"whodunnit": null
}
]
状态代码: 200