系统会为每次与 Contact Center AI 平台 (CCAI Platform) 之间的通话创建一个 call 对象。请参阅以下模型,确定哪些字段可能包含个人身份信息。
[
{
"id": 0,
"parent_id": 0,
"lang": "en",
"call_type": "Voice Inbound (App)",
"status": "scheduled",
"sub_status": "Scheduled: Disconnected by unknown",
"created_at": "2018-06-07T19:49:52.896Z",
"queued_at": "2018-06-07T19:49:52.896Z",
"assigned_at": "2018-06-07T19:49:52.896Z",
"connected_at": "2018-06-07T19:49:52.896Z",
"ends_at": "2018-06-07T19:49:52.896Z",
"scheduled_at": "2018-06-07T19:49:52.896Z",
"updated_at": "2018-06-07T19:49:52.896Z",
"wait_duration": 0, //Deprecated, use queue_duration instead
"queue_duration": 0,
"call_duration": 0,
"hold_duration": 0,
"rating": 0,
"has_feedback": true,
"voip_provider": "voip_provider_twilio",
"out_ticket_id": "string",
"out_ticket_url": "string",
"verified": true,
"recording_url": "string",
"recording_permission": "not_asked",
"voicemail_reason": "not_voicemail",
"deflection": "no_deflection",
"disconnected_by": "disconnected_by_unknown",
"finish_reason": "no_reason",
"fail_details": "string",
"fail_reason": "nothing",
"adapter_fail_code": null,
"adapter_fail_message": null,
"support_number": "string",
"selected_menu": {
"id": 0,
"name": "string",
"parent_id": 0,
"position": 0,
"deleted": true,
"hidden": "string",
"menu_type": "ivr_menu",
"output_msg": "string"
},
"menu_path": {
"items_count": 0,
"name": "string",
"materialized_path": "string"
},
"agent_info": {
"id": 0,
"name": "string", //This may be considered PII
"last_name": "string", //This may be considered PII
"first_name": "string", //This may be considered PII
"agent_number": "string",
"avatar_url": "string"
},
"end_user": {
"id": 0, //This may be considered PII
"identifier": "string", //This may be considered PII
"out_contact_id": "string" //This may be considered PII
},
"photos": [
{
"id": 0, //This may be considered PII
"photo_type": "photo", //This may be considered PII
"url": "string" //This may be considered PII
}
],
"videos": [
{
"id": 0, //This may be considered PII
"url": "string" //This may be considered PII
}
],
"transfers": [
{
"id": 0,
"status": "transferring",
"fail_reason": "nothing",
"created_at": "2018-06-07T19:49:52.896Z",
"call_duration": 300,
"wait_duration": 40,
"assigned_at": "2018-06-07T19:50:32.896Z",
"connected_at": "2018-06-07T19:50:35.896Z",
"updated_at": "2018-06-07T19:55:35.896Z",
"deflection": 0,
"from_menu": {
"items_count": 0,
"name": "string",
"materialized_path": "string"
},
"to_menu": {
"items_count": 0,
"name": "string",
"materialized_path": "string"
},
"from_agent": {
"id": 0,
"name": "string", //This may be considered PII
"last_name": "string", //This may be considered PII
"first_name": "string", //This may be considered PII
"agent_number": "string",
"avatar_url": "string"
},
"to_agent": {
"id": 0,
"name": "string", //This may be considered PII
"last_name": "string", //This may be considered PII
"first_name": "string", //This may be considered PII
"agent_number": "string",
"avatar_url": "string"
}
}
],
"handle_durations": [
{
"agent_id": 0,
"acw_duration": 0,
"call_duration" 0,
"menu_path_id": 0,
"wait_duration": 0,
"lang": "en",
"transfer": false,
"started_at": "2019-07-17T07:27:14.000Z",
"ended_at": "2019-07-17T07:27:20.000Z",
"event": "call_finished"
}
],
"queue_durations": [
{
"agent_id": 0,
"queue_duration" 0,
"menu_path_id": 0,
"lang": "en",
"transfer": false,
"started_at": "2019-07-17T07:27:14.000Z",
"ended_at": "2019-07-17T07:27:20.000Z",
"service_level_abandon_time_threshold": 10,
"service_level_event": "not_in_sla",
"service_level_target_percent": 90,
"service_level_target_time": 60,
"event": "answered"
}
]
"participants": [
{
"id": 0,
"type": "end_user",
"status": "waiting",
"call_id": 0,
"user_id": 0, //This may be considered PII
"end_user_id": 0, //This may be considered PII
"call_duration": 0,
"hold_duration": 0,
"connected_at": "2018-06-07T19:49:52.896Z",
"ended_at": "2018-06-07T19:49:52.896Z",
"fail_reason": "nothing",
"adapter_fail_code": null,
"adapter_fail_message": null
},
"offer_type": null,
"offer_events": [],
"answer_type": "manual",
"outbound_number": null,
"wait_time_sms": [],
"in_call_sms": []
]
}
]
状态字段可以处于以下任何一种状态:
| 通话状态 | 说明 |
|---|---|
| 正在选择 | 最终用户已致电联络中心,但在从叶节点请求通话之前仍在浏览菜单选项时所处的状态。 |
| 已加入队列 | 最终用户选择叶菜单节点并启动呼叫请求以广播或多播给客服人员后发生的状态。 |
| 已分配 | 当代理被选中来接听最终用户来电时发生的状态。当客服人员接听电话时,系统会触发此事件。 |
| 正在连接 | 在分配代理后发生的状态,表示正在等待在最终用户与代理之间建立连接。 |
| 已连接 | 通话已建立连接,并且客服人员和最终用户都已加入通话时所处的状态。 |
| 已完成 | 当客服人员与最终用户的对话结束通话且未发生任何错误时,就会出现此状态。 |
| 失败 | 因错误而导致通话结束时出现的状态。呈现此状态时,系统还会提供失败原因,以便您了解更多背景信息 |
| 正在切换 | 在尝试连接时调用失败,而 CCAI 平台尝试将调用与不同的 VOIP 提供商连接时发生的状态。 |
| 已恢复 | 在回拨失败的通话时发生的状态。新通话是原始通话的子通话。恢复了回调在完成时没有出现错误的注释。 |
| 已安排 | 最终用户选择在未来接听电话(作为分流选项的一部分),或者选择在未来通过网页内或应用内方式接听电话时出现的状态。 |
| 仅限行动号召广告系列 | 一种状态,指由客户自己的电话服务提供商处理的通话连接到我们的 iOS 或 Android SDK 时所处的状态。 |
| 仅行动号召广告系列已完成 | 当由客户自己的电话服务提供商处理的通话连接到我们的 iOS 或 Android SDK 并结束时发生的状态 |
| 折射 | 根据过量队列或下班后通话的配置而发生的状态。转接选项包括语音信箱、安排通话等。转接率因渠道(应用内、IVR、网站内)而异 |
| 语音信息 | 最终用户被转接到语音信息选项,并选择留言以供日后收听时发生的状况。当最终用户正在留言时,系统会处于此状态 |
| 收到了语音信息 | 最终用户留下语音信息后,客服人员尚未收听该语音信息时所处的状态 |
| 语音信息已读 | 代理已打开语音信息以进行收听时所处的状态。 |
call_type 字段只能是以下值之一
| 调用类型 | 说明 |
|---|---|
| 语音入站 (IVR) | 来自最终用户手机的入站 PSTN 呼叫。 |
| 语音入站(应用) | 通过使用我们移动 SDK 的 iOS 或 Android 应用发起的来电。 |
| 语音回拨(网页版) | 通过 Web SDK 发出的来电请求 |
| 语音安排(应用) | 通过移动 SDK 调度功能预先安排的从客服人员到最终用户的呼叫。 |
| Voice Scheduled(网页) | 通过我们的 Web SDK 安排功能预先安排的从客服人员到最终用户的通话 |
| 语音外呼 | 客服人员通过拨号键盘或其他方法拨打外部手机线路,向最终用户发起的呼叫。 |
service_level_event 字段只能是以下值之一:
| 服务等级事件 | 说明 |
|---|---|
| in_sla | 在 SLA 范围内接听了来电 |
| not_in_sla | 未在定义的 SLA 内接听来电 |
| 已排除 | 通话未纳入 SLA 计算范围(例如,通话被放弃) |
如果 adapter_fail_code 和 adapter_fail_message 字段不为 null,则只能是以下值之一:
| 适配器故障代码 | 适配器故障消息 |
|---|---|
| 10001 | 此通话遇到了意外错误。 |
| 11001 | 在排队等待时,此通话已过期。 |
| 20001 | 此通话已被客户取消。 |
| 20002 | 客户拒绝了此通话。 |
| 20003 | 此通话已被客户放弃。 |
| 20004 | 客户在选择菜单时放弃了此通话。 |
| 21001 | 无法接通电话;客户的线路正忙。 |
| 21002 | 拨打的手机号码无效。 |
| 21003 | 客户未接听此电话。 |
| 22001 | 未能发送开始此通话的推送通知。 |
| 30001 | 此通话已取消。 |
| 30002 | 此已过期的通话无人参加。 |
| 31001 | 无法检测到麦克风。请检查您的设备设置,然后重试。 |
| 31002 | 无法使用麦克风。请检查您的设备权限,然后重试。 |
| 32001 | 所选的拨出号码无效。 |
| 32002 | 无法将通话连接到拨打的手机号码。 |
| 41001 | 通话连接出现意外错误。 |
| 42001 | 通话连接出现意外错误。 |
| 43001 | 此通话遇到了意外错误。 |
| 44001 | 此通话遇到了意外错误。 |
| 44002 | 由于连接超时,此通话已终止。 |
| 44003 | 此通话遇到了意外错误。 |
| 90001 | 由于未检测到音频,此通话已终止。 |
| 90002 | 无法启动音频设备。请检查音频设备权限,然后重试。 |
通话
| 参数 | 必需 | 数据类型 | 定义 |
|---|---|---|---|
| connected_at[from] | FALSE | 时间(世界协调时间) | 创建 connected_at 字段的下限。返回的所有记录都将早于输入的值。 |
| connected_at[to] | FALSE | 时间(世界协调时间) | 创建 connected_at 字段的上限。返回的所有记录都将早于输入的值。 |
| updated_at[from] | FALSE | 时间(世界协调时间) | 创建了“updated at”字段的下限。返回的所有记录都将晚于输入的值。 |
| updated_at[to] | FALSE | 时间(世界协调时间) | 创建 connected_at 字段的上限。返回的所有记录都将早于输入的值。 |
| queued_at[from] | FALSE | 时间(世界协调时间) | 创建 queued_at 字段的下限。返回的所有记录都将晚于输入的值。 |
| queued_at[to] | FALSE | 时间(世界协调时间) | 创建了 queued_at 字段的上限。返回的所有记录都将早于输入的值。 |
| rating[from] | FALSE | 数字 1-5 或 null | 创建评分字段的下限。返回的所有记录都将晚于输入的值。 |
| rating[to] | FALSE | 数字 1-5 或 null | 创建评分字段的上限。返回的所有记录都将早于输入的值。 |
| call_duration[from] | FALSE | 数字 | 创建通话时长的下限。返回的所有记录都将晚于输入的值。 |
| call_duration[to] | FALSE | 数字 | 创建通话时长字段的上限。返回的所有记录都将早于输入的值。 |
| hold_duration[from] | FALSE | 数字 | 创建保留时长的下限。返回的所有记录都将晚于输入的值。 |
| hold_duration[to] | FALSE | 数字 | 创建搁置时长的上限字段。返回的所有记录都将早于输入的值。 |
| id[] | FALSE | Array[String] | 字符串数组。要搜索和返回的记录的 ID。 |
| agent_id[] | FALSE | Array[String] | 按代理 ID 过滤响应 |
| end_user_id[] | FALSE | Array[String] | 根据最终用户 ID 过滤响应 |
| call_status[] | FALSE | Array[String] | 返回通话生命周期中给定状态的记录。可能的值包括:scheduled、queued、assigned、connecting、switching、connected、finished、failed、recovered、deflected、selecting、action_only、action_only_finished、voicemail、voicemail_received、voicemail_read |
| call_fail_reason[] | FALSE | Array[String] | 返回以某种方式失败的记录。可能的值包括:nothing、unknown、expired、eu_canceled、eu_rejected、eu_abandoned、eu_in_menu_abandoned、eu_busy、eu_wrong_number、eu_no_answer、eu_noti_failed、ag_canceled、ag_ignored、ag_mic_no_device、ag_mic_denied、voip_twilio_error、voip_tokbox_error、voip_invalid_token、voip_conn_general、voip_conn_timeout、voip_conn_signal |
| verified[] | FALSE | 布尔值 | 返回已验证 (True) 或未验证 (False) 的记录 |
| call_type[] | FALSE | Array[String] | 返回指定通话类型的记录。可能的值包括:IncomingCallApp、ScheduledCallApp、OutboundCall、AgentScheduledCall、IvrCall、IncomingCallWeb、ScheduledCallWeb、ActionOnlyCall |
| support_number[] | FALSE | Array[String] | 按最终用户用于联系的手机号码过滤(仅适用于 IVR 通话) |
端点:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/calls
标头:
| 键 | 值 | 说明 |
|---|---|---|
| Content-Type | application/json |
更多请求/响应示例:
示例请求:通话
正文:无
示例回答:通话
[
{
"id": 1,
"lang": "en",
"call_type": "Voice Inbound (App)",
"status": "finished",
"created_at": "2016-02-19T18:53:56.000Z",
"queued_at": "2016-02-19T18:53:57.000Z",
"assigned_at": "2016-02-19T18:53:58.000Z",
"connected_at": "2016-02-19T18:54:18.000Z",
"ends_at": "2016-02-19T18:54:39.000Z",
"updated_at": "2016-02-19T18:54:39.000Z",
"scheduled_at": null,
"queue_duration": 22,
"wait_duration": 22,
"call_duration": 21,
"hold_duration": 0,
"rating": null,
"has_feedback": false,
"voip_provider": "voip_provider_twilio",
"out_ticket_id": null,
"out_ticket_url": null,
"verified": false,
"recording_url": null,
"recording_permission": "not_asked",
"voicemail_reason": "not_voicemail",
"deflection": "no_deflection",
"disconnected_by": "disconnected_by_unknown",
"fail_reason": "nothing",
"fail_details": null,
"recordings": [
{
"id": 7,
"call_id": 1,
"conference_sid": "CF50ec183fafcff801226b6fc332EC02ba7c4",
"duration": 20,
"recording_type": "default",
"redaction_times": [
{
"start": "2016-02-19T18:54:23.000Z",
"end": "2016-02-19T18:54:25.000Z",
"duration": 2.000,
"start_agent_id": 2,
"end_agent_id": 2
}
],
"started_at": "2016-02-19T18:54:18.000Z"
}
],
"support_number": "+12128675309",
"selected_menu": {
"id": 11,
"name": "Carpentry",
"parent_id": 1,
"position": 1,
"deleted": false,
"hidden": false,
"menu_type": "ivr_menu",
"output_msg": "Thanks for calling Death Star Carpentry"
},
"menu_path": {
"items_count": 1,
"name": "Carpentry",
"materialized_path": "Death Star/Carpentry"
},
"queue_priority_level": 0,
"end_user": {
"id": 3,
"identifier": "Death Star Carpentry Union",
"out_contact_id": "363876643527"
},
"photos": [{
"id": 0,
"photo_type": "photo",
"url": "www.photolocation.co/photo/123456868686"
}],
"videos": [{
"id": 0,
"url": "www.videolocation.co/video/123456868686"
}],
"transfers": [{
"id": 11,
"status": "transferring",
"fail_reason": "nothing",
"created_at": "2016-02-19T18:58:18.000Z",
"from_menu": {
"items_count": 2,
"name": "Cabinetry",
"materialized_path": "Death Star/Cabinetry"
},
"to_menu": {
"items_count": 2,
"name": "Carpentry",
"materialized_path": "Death Star/Carpentry"
},
"from_agent": {
"id": 2,
"name": "San Holo",
"last_name": "San",
"first_name": "Holo",
"agent_number": "6",
"avatar_url": "www.avatarurl.co/avatar/1234543"
},
"to_agent": {
"id": 0,
"name": "Farrison Hord",
"last_name": "Farrison",
"first_name": "Hord",
"agent_number": "12",
"avatar_url": "www.avatarurl.co/avatar/1234545"
}
}],
"participants": [
{
"id": 5,
"type": "end_user",
"status": "finished",
"call_id": 3,
"user_id": null,
"end_user_id": 3,
"call_duration": 21,
"hold_duration": null,
"connected_at": "2016-02-19T18:54:18.000Z",
"ended_at": "2016-02-19T18:54:39.000Z",
"fail_reason": "nothing"
},
{
"id": 3,
"type": "agent",
"status": "finished",
"call_id": 3,
"user_id": 5,
"end_user_id": null,
"call_duration": 21,
"hold_duration": null,
"connected_at": "2016-02-19T18:54:18.000Z",
"ended_at": "2016-02-19T18:54:39.000Z",
"fail_reason": "nothing"
},
{
"id": 6,
"type": "agent",
"status": "finished",
"call_id": 3,
"user_id": 12,
"end_user_id": null,
"call_duration": 21,
"hold_duration": null,
"connected_at": "2016-02-19T18:54:18.000Z",
"ended_at": "2016-02-19T18:54:39.000Z",
"fail_reason": "nothing"
}
],
"offer_type": "cascade",
"offer_events": [
{
"casting_time": "2018-11-12T15:52:38.000Z",
"group": "Group 1"
}
],
"answer_type": "manual",
"outbound_number": null,
"dispositions": [
{
"user_id": 3,
"participant_id": 225,
"code": "Product question"
},
{
"user_id": 3,
"transfer_id": 1,
"participant_id": 226,
"code": "Requires follow up"
}
],
"consumer_handle_durations": [
{
"id": 100,
"call_duration": 314,
"hold_duration": 3,
"started_at": "2016-02-19T18:50:08.000Z",
"ended_at": "2016-02-19T18:55:22.000Z"
}
],
"consumer_in_menu_durations": [
{
"id": 100,
"event": "finished",
"duration": 238,
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"started_at": "2016-02-19T18:50:08.000Z",
"ended_at": "2016-02-19T18:54:06.000Z"
}
],
"consumer_event_durations": [
{
"id": 10,
"type": "payment",
"event": "finished",
"duration": 20,
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"started_at": "2016-02-19T18:54:38.000Z",
"ended_at": "2016-02-19T18:54:58.000Z"
},
{
"id": 11,
"type": "csat",
"event": "abandoned",
"duration": 4,
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"started_at": "2016-02-19T18:54:39.000Z",
"ended_at": "2016-02-19T18:54:43.000Z"
}
],
"handle_durations": [
{
"id": 10001,
"agent_id": 5,
"acw_duration": 0,
"bcw_duration": 0,
"call_duration": 21,
"assigned_connection_duration": 10,
"hold_duration": 3,
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"barged": 0,
"transfer": 0,
"transfer_id": null,
"transfer_cold": 0,
"started_at": "2016-02-19T18:54:18.000Z",
"ended_at": "2016-02-19T18:54:39.000Z",
"scheduled_at": null
},
{
"id": 10002,
"agent_id": 5,
"acw_duration": 25,
"bcw_duration": 0,
"call_duration": 0,
"assigned_connection_duration": 0,
"hold_duration": 0,
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"barged": 0,
"transfer": 0,
"transfer_id": null,
"transfer_cold": 0,
"started_at": "2016-02-19T18:54:39.000Z",
"ended_at": "2016-02-19T18:55:04.000Z",
"scheduled_at": null
},
{
"id": 10003,
"agent_id": 12,
"acw_duration": 1,
"bcw_duration": 0,
"call_duration": 21,
"assigned_connection_duration": 5,
"hold_duration": 0,
"menu_path_id": 4,
"menu_path": "Deathstar/Returns",
"lang": "en",
"barged": 0,
"transfer": 1,
"transfer_id": 11,
"transfer_cold": 0,
"started_at": "2016-02-19T18:54:18.000Z",
"ended_at": "2016-02-19T18:54:39.000Z",
"scheduled_at": null
}
],
"queue_durations": [
{
"id": 20011,
"agent_id": 5,
"queue_duration": 12,
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"transfer": 0,
"transfer_id": null,
"transfer_cold": 0,
"started_at": "2016-02-19T18:54:06.000Z",
"ended_at": "2016-02-19T18:54:18.000Z",
"service_level_abandon_time_threshold": 10,
"service_level_event": "in_sla",
"service_level_target_percent": 90,
"service_level_target_time": 60
},
{
"id": 20012,
"agent_id": 12,
"queue_duration": 10,
"menu_path_id": 21,
"menu_path": "Deathstar/Returns",
"lang": "en",
"transfer": 1,
"transfer_id": 11,
"transfer_cold": 0,
"started_at": "2016-02-19T18:54:08.000Z",
"ended_at": "2016-02-19T18:54:18.000Z",
"service_level_abandon_time_threshold": 10,
"service_level_event": "not_in_sla",
"service_level_target_percent": 90,
"service_level_target_time": 60
}
],
"virtual_agent": {
"id": 10,
"name": "D2-R2"
},
"virtual_agent_deflected_escalations": [
{
"id": 1,
"deflection": "after_hours",
"escalation_id": 1,
"escalation_reason": "by_end_user_message",
"escalated_at": "2016-02-19T18:54:06.000Z",
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"virtual_agent": {
"id": 10,
"name": "D2-R2"
}
}
],
"virtual_agent_handle_durations": [
{
"id": 1,
"virtual_agent": {
"id": 10,
"name": "D2-R2"
},
"call_duration": 11,
"escalation_reason": "by_end_user_message",
"sentiment": 85,
"response_count": 11,
"fallback_response_count": 1,
"initiated_by": "end_user",
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"transfer": false,
"transfer_id": null,
"started_at": "2016-02-19T18:52:36.000Z",
"ended_at": "2016-02-19T18:54:06.000Z"
}
]
}
]
状态代码: 200