El siguiente es un modelo del recurso de chat. Consulta este modelo para determinar qué campos pueden contener PII.
[
{
"id": 31354,
"lang": "en",
"chat_type": "Messaging Inbound (App Chat)",
"status": "finished",
"sub_status": "Disconnected by end user",
"created_at": "2019-07-17T07:27:14.000Z",
"assigned_at": "2019-07-17T07:27:20.000Z",
"ends_at": "2019-07-17T07:29:02.000Z",
"updated_at": "2019-07-17T07:29:02.000Z",
"first_msg_sent_at": "2019-07-17T07:27:26.000Z",
"last_msg_sent_at": "2019-07-17T07:27:28.000Z",
"wait_duration": 0, //Deprecated, use queue_duration instead
"queue_duration": 0,
"chat_duration": 0,
"verified": false,
"rating": 0,
"has_feedback": false,
"out_ticket_id": "string",
"out_ticket_url": "string",
"finish_reason": "finish_reason_none",
"fail_reason": null,
"message_count": 3,
"average_response_time": 0,
"longest_response_time": 0,
"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": 1,
"name": "Ringo",
"materialized_path": "3389"
},
"agent_info": {
"id": 0,
"name": "string",
"last_name": "string",
"first_name": "string",
"agent_number": "string",
"avatar_url": "string"
},
"end_user": {
"id": 0,
"identifier": "string",
"out_contact_id": "string"
},
"photos": [
{
"id": 0,
"photo_type": "photo",
"url": "string"
}
],
"videos": [
{
"id": 0,
"url": "string"
}
],
"transfers": [
{
"id": 0,
"status": "transferring",
"fail_reason": "nothing",
"created_at": "2018-06-07T19:49:52.896Z",
"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",
"last_name": "string",
"first_name": "string",
"agent_number": "string",
"avatar_url": "string"
},
"to_agent": {
"id": 0,
"name": "string",
"last_name": "string",
"first_name": "string",
"agent_number": "string",
"avatar_url": "string"
}
}
],
"handle_durations": [
{
"agent_id": 0,
"acw_duration": 0,
"chat_duration" 0,
"wait_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",
"event": "chat_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,
"end_user_id": 0,
"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"
}
]
}
"offer_type": "cascade",
"offer_events": [
{
"casting_time": "2019-07-17T07:27:15.000Z",
"group": "Group 1"
}
]
},
El campo service_level_event solo puede tener uno de los siguientes valores:
| Evento de nivel de servicio | Descripción |
|---|---|
| in_sla | Se respondió la llamada dentro del ANS. |
| not_in_sla | No se respondió la llamada dentro del ANS definido. |
| excluidos | La llamada no se incluyó en el cálculo del ANS (p. ej., si se abandonó). |
Chats
| Parámetro | Obligatorio | Tipo de datos | Definición |
|---|---|---|---|
| sort_column | FALSO | String | Ordena la respuesta según cualquier campo del objeto de respuesta. |
| sort_direction | FALSO | ASC o DESC | Indica la dirección de la ordenación, ya sea ascendente o descendente. |
| página | FALSO | String | Se combina con per para indicar qué página de registros. Por ejemplo, si per se establece en 200 y la página es 2, la respuesta contendrá los registros 201-400, ya que la página 1 contendrá 1-200. |
| por | FALSO | String | Se combina con la página para indicar cuántos registros se incluirán en una página de registros. Por ejemplo, si per se establece en 200 y la página es 2, la respuesta contendrá los registros 201-400, ya que la página 1 contendrá 1-200. |
| assigned_at[from] | FALSO | Hora en UTC | Crea un límite inferior del campo assigned at. Todos los registros que se muestran serán posteriores al valor ingresado. |
| assigned_at[to] | FALSO | Hora en UTC | Crea un límite superior del campo assigned at. Todos los registros que se muestran serán anteriores al valor ingresado. |
| ends_at[from] | FALSO | Hora en UTC | Crea un límite inferior del campo ends at. Todos los registros que se muestran serán posteriores al valor ingresado. |
| ends_at[to] | FALSO | Hora en UTC | Crea un límite superior del campo ends at. Todos los registros que se muestran serán anteriores al valor ingresado. |
| updated_at[from] | FALSO | Hora en UTC | Crea un límite inferior del campo updated at. Todos los registros que se muestran serán posteriores al valor ingresado. |
| updated_at[to] | FALSO | Hora en UTC | Crea un límite superior del campo updated at. Todos los registros que se muestran serán anteriores al valor ingresado. |
| created_at[from] | FALSO | Hora en UTC | Crea un límite inferior del campo created at. Todos los registros que se muestran serán posteriores al valor ingresado. |
| created_at[to] | FALSO | Hora en UTC | Crea un límite superior del campo created at. Todos los registros que se muestran serán anteriores al valor ingresado. |
| rating[from] | FALSO | Número del 1 al 5 o nulo | Crea un límite inferior del campo rating. Todos los registros que se muestran serán posteriores al valor ingresado. |
| rating[to] | FALSO | Número del 1 al 5 o nulo | Crea un límite superior del campo rating. Todos los registros que se muestran serán anteriores al valor ingresado. |
| first_msg_sent_at[from] | FALSO | Hora en UTC | Crea un límite inferior del campo first msg sent at. Todos los registros que se muestran serán posteriores al valor ingresado. |
| first_msg_sent_at[to] | FALSO | Hora en UTC | Crea un límite superior del campo first msg sent at. Todos los registros que se muestran serán anteriores al valor ingresado. |
| last_msg_sent_at[from] | FALSO | Hora en UTC | Crea un límite inferior del campo last msg sent at. Todos los registros que se muestran serán posteriores al valor ingresado. |
| last_msg_sent_at[to] | FALSO | Hora en UTC | Crea un límite superior del campo last msg sent at. Todos los registros que se muestran serán anteriores al valor ingresado. |
| chat_duration[from] | FALSO | Número | Crea un límite inferior del campo chat duration. Todos los registros que se muestran serán posteriores al valor ingresado. |
| chat_duration[to] | FALSO | Número | Crea un límite superior del campo chat duration. Todos los registros que se muestran serán anteriores al valor ingresado. |
| message_count[from] | FALSO | Número | Crea un límite inferior del campo message count. Todos los registros que se muestran serán posteriores al valor ingresado. |
| message_count[to] | FALSO | Número | Crea un límite superior del campo message count. Todos los registros que se muestran serán anteriores al valor ingresado. |
| average_response_time[from] | FALSO | Número | Crea un límite inferior del campo average response time. Todos los registros que se muestran serán posteriores al valor ingresado. |
| average_response_time[to] | FALSO | Número | Crea un límite superior del campo average response time. Todos los registros que se muestran serán anteriores al valor ingresado. |
| longest_response_time[from] | FALSO | Número | Crea un límite inferior del campo longest response time. Todos los registros que se muestran serán posteriores al valor ingresado. |
| longest_response_time[to] | FALSO | Número | Crea un límite superior del campo longest response time. Todos los registros que se muestran serán anteriores al valor ingresado. |
| wait_duration[from] | FALSO | Número | Crea un límite inferior del campo wait duration. Todos los registros que se muestran serán posteriores al valor ingresado. |
| wait_duration[to] | FALSO | Número | Crea un límite superior del campo wait duration. Todos los registros que se muestran serán anteriores al valor ingresado. |
| id[] | FALSO | Array[String] | Array[Strings]. Es el ID de los registros que se deben buscar y mostrar. |
| agent_id[] | FALSO | Array[String] | Filtra la respuesta por el ID del agente. |
| end_user_id[] | FALSO | Array[String] | Filtra la respuesta según el ID del usuario final. |
| chat_type[] | FALSO | Array[String] | Muestra registros según la forma en que el usuario final accedió al chat. Valores posibles: Messaging Inbound (App Chat), Messaging Inbound (Web Chat), Messaging (SMS) |
| chat_status[] | FALSO | Array[String] | Muestra registros según la ubicación del usuario en el ciclo de vida del chat. Valores posibles: queued, assigned, finished, canceled, failed, no_response |
| verified[] | FALSO | Booleano | Muestra registros que se verificaron (True) o no (False). |
| chat_fail_reason[] | FALSO | Array[String] | Muestra registros según el motivo por el que pudo haber fallado un chat. Valores posibles: nothing, unknown, no_response, expired |
El valor service_level_event puede tener los siguientes valores.
| Evento de nivel de servicio | Descripción |
|---|---|
| in_sla | Se respondió la llamada dentro del ANS. |
| not_in_sla | No se respondió la llamada dentro del ANS definido. |
| excluidos | La llamada no se incluyó en el cálculo del ANS (p. ej., si se abandonó). |
Extremo:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/chats
Más ejemplos de solicitudes y respuestas:
Solicitud de ejemplo: Chats
Consulta:
| Clave | Valor | Descripción |
|---|---|---|
| updated_at[from] | \{updated_at\[from\]\} | Hora en UTC. Crea un límite inferior del campo updated at. Todos los registros que se muestran serán posteriores al valor ingresado. |
| updated_at[to] | \{updated_at\[to\]\} | Hora en UTC. Crea un límite superior del campo updated at. Todos los registros que se muestran serán anteriores al valor ingresado. |
Cuerpo: Ninguno
Respuesta de ejemplo: Chats
[
{
"id": 1,
"lang": "en",
"chat_type": "Messaging Inbound (App Chat)",
"status": "finished",
"created_at": "2016-02-26T18:35:54.000Z",
"assigned_at": "2016-02-26T18:36:05.000Z",
"ends_at": "2016-02-26T18:37:24.000Z",
"updated_at": "2016-02-26T18:37:24.000Z",
"first_msg_sent_at": null,
"last_msg_sent_at": null,
"chat_duration": 11,
"wait_duration": 22,
"queue_duration": 22,
"verified": true,
"rating": 5,
"has_feedback": false,
"out_ticket_id": "209",
"out_ticket_url": null,
"fail_reason": null,
"message_count": 0,
"average_response_time": 0,
"longest_response_time": 0,
"selected_menu": null,
"menu_path": null,
"agent_info": {
"id": 4,
"agent_number": "007",
"name": "Storm Trooper 1",
"last_name": "Storm",
"first_name": "Trooper 1",
},
"end_user": {
"id": 1,
"identifier": "Death Star Carpentry",
"out_contact_id": "360949501087"
},
"photos": [
{
"id": 3,
"photo_type": "photo",
"url": "true"
}
],
"consumer_handle_durations": [
{
"id": 100,
"chat_duration": 314,
"message_count": 10,
"response_count": 6,
"response_time_total": 85,
"response_time_max": 25,
"response_time_avg": 12,
"started_at": "2016-02-19T18:50:08.000Z",
"ended_at": "2016-02-19T18:55:22.000Z"
}
],
"consumer_event_durations": [
{
"id": 11,
"type": "csat",
"event": "finished",
"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": 30001,
"agent_id": 4,
"acw_duration": 0,
"chat_duration": 11,
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"transfer": 0,
"transfer_id": null,
"started_at": "2016-03-02T23:24:08.000Z",
"ended_at": "2016-03-02T23:24:42.000Z",
"response_count": 11,
"response_time_total": 259,
"response_time_max": 29,
"response_time_avg": 24,
"assigned_connection_duration": 10
}
],
"queue_durations": [
{
"id": 41234,
"agent_id": 5,
"queue_duration": 22,
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"transfer": 0,
"transfer_id": null,
"transfer_cold": 0,
"started_at": "2016-03-02T23:23:56.000Z",
"ended_at": "2016-03-02T23:24:08.000Z",
"service_level_abandon_time_threshold": 10,
"service_level_event": "not_in_sla",
"service_level_target_percent": 90,
"service_level_target_time": 60
}
]
"videos": [],
"transfers": [],
"participants": [],
"virtual_agent": null,
"virtual_agent_deflected_escalations": [],
"virtual_agent_handle_durations": []
},
{
"id": 2,
"lang": "en",
"chat_type": "in-app",
"status": "finished",
"created_at": "2016-03-02T23:24:05.000Z",
"assigned_at": "2016-03-02T23:24:08.000Z",
"ends_at": "2016-03-02T23:24:42.000Z",
"updated_at": "2016-03-02T23:24:42.000Z",
"first_msg_sent_at": null,
"last_msg_sent_at": null,
"wait_duration": 12,
"queue_duration": 12,
"chat_duration": 34,
"verified": false,
"rating": 2,
"has_feedback": false,
"out_ticket_id": "214",
"out_ticket_url": null,
"fail_reason": null,
"message_count": 0,
"average_response_time": 0,
"longest_response_time": 0,
"selected_menu": null,
"menu_path": null,
"agent_info": null,
"end_user": {
"id": 1,
"identifier": "Death Star Carpentry",
"out_contact_id": "360949501087"
},
"photos": [],
"videos": [],
"transfers": [],
"participants": [],
"handle_durations": [
{
"id": 30001,
"agent_id": 4,
"acw_duration": 0,
"chat_duration": 34,
"menu_path_id": 11,
"menu_path": "Deathstar/Shipping",
"lang": "en",
"transfer": 0,
"transfer_id": null,
"started_at": "2016-03-02T23:24:08.000Z",
"ended_at": "2016-03-02T23:24:42.000Z",
"response_count": 11,
"response_time_total": 259,
"response_time_max": 29,
"response_time_avg": 24,
"assigned_connection_duration": 10
}
],
"queue_durations": [
{
"id": 41234,
"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-03-02T23:23:56.000Z",
"ended_at": "2016-03-02T23:24:08.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_reason": "by_end_user_message",
"escalated_at": "2016-03-02T23:23:56.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"
},
"chat_duration": 11,
"escalation_reason": "by_end_user_message",
"response_count": 11,
"response_time_total": 34,
"response_time_max": 4,
"response_time_avg": 3,
"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-03-02T23:23:16.000Z",
"ended_at": "2016-03-02T23:23:56.000Z"
}
]
}
]
Código de estado: 200