代理活动日志是在 widget 状态发生变化时创建的记录。这可能是登录 widget、收到 deltacast 通话通知或接听电话等状态。每项活动都会创建一个新的对象。请参考以下模型,验证哪些字段可能包含 (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 | 当最终用户来电时,系统会向客服人员提供多播或增量广播来电提醒,此时会发生此事件。 |
| call_pick_up_attempt | 当座席尝试接听多播或 deltacast 呼叫时发生的事件。 |
| call_picked_up | 当代理接听多播或 deltacast 调用时发生的事件。 |
| deltacast_call_notification_offered | 一种事件,用于记录最终用户已拨入具有多播功能的队列,然后将 deltacast 调用广播到该队列中的代理。 |
| deltacast_call_pick_up_attempt | 当代理尝试接听 delta-casted 呼叫时发生的事件 |
| deltacast_call_picked_up | 当代理成功接听增量广播的通话时发生的事件。 |
| deltacast_call_missed | 当客服人员未接听其增量广播通话时发生的事件 |
| multicast_call_notification_offered | 一种事件,用于记录最终用户已拨入具有多播功能的队列,然后系统将多播呼叫广播给该队列中的座席 |
| multicast_call_pick_up_attempt | 当客服人员尝试接听多方广播式来电时发生的事件 |
| multicast_call_picked_up | 当多播呼叫被客服人员接听时发生的事件 |
| call_outbound_dialing | 当客服人员使用 widget 中的拨号键盘拨打最终用户的电话时发生的事件。 |
| user_status_changed | 当客服人员更改 widget 的状态时发生的事件 |
| 登录 | 当客服人员退出 widget 时发生的事件 |
| 退出 | 代理登录 widget 时发生的事件 |
代理活动日志
| 参数 | 必需 | 数据类型 | 定义 |
|---|---|---|---|
| sort_column | FALSE | 字符串 | 根据响应对象中的任何字段对响应进行排序。 |
| sort_direction | FALSE | 升序或降序 | 指明排序方向,即升序或降序 |
| 页面 | FALSE | 字符串 | 与 per 搭配使用,用于指明记录的页数。例如,如果 per 设置为 200,page 设置为 2,则响应将包含记录 201-400,因为第 1 页将包含记录 1-200。 |
| 每 | FALSE | 字符串 | 与 page 配对,用于指明一个记录页面中包含的记录数量。例如,如果 per 设置为 200,page 设置为 2,则响应将包含记录 201-400,因为第 1 页将包含记录 1-200。 |
| started_at[from] | FALSE | 时间(世界协调时间) | 创建 started_at 字段的下限。返回的所有记录都将晚于输入的值。 |
| started_at[to] | FALSE | 时间(世界协调时间) | 创建 started at 字段的上限。返回的所有记录都将早于输入的值。 |
| ended_at[from] | FALSE | 时间(世界协调时间) | 创建 ended_at 字段的下限。返回的所有记录都将晚于输入的值。 |
| ended_at[to] | FALSE | 时间(世界协调时间) | 创建 ended_at 字段的上限。返回的所有记录都将早于输入的值。 |
| duration[from] | FALSE | 数字 | 创建时长字段的下限。返回的所有记录都将晚于输入的值。 |
| duration[至] | FALSE | 数字 | 创建时长字段的上限。返回的所有记录都将早于输入的值。 |
| id[] | FALSE | Array[String] | Array[Strings]。要搜索和返回的记录的 ID |
| agent_id[] | FALSE | Array[String] | 按代理 ID 过滤响应 |
| activity[] | FALSE | Array[String] | 按代理完成的任务/活动过滤记录。可能的值包括: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 | Array[String] | 按代理 ID 过滤响应。Whodunnit 是代理对象的一个子集,使用相同的 agent_id 作为其主键 |
| call_id[] | FALSE | Array[String] | 按输入的通话 ID 过滤记录 |
| chat_id[] | FALSE | Array[String] | 按输入的聊天 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