API - Relatório - Histórico de Chamadas



Disponível a partir da versão 6.16.0

Requisição de relatórios.

Nos cabeçalhos dos requests, é necessário incluir uma chave "token" cujo valor seja um token de API.



Gerar relatório de histórico de chamadas

Enpoint

/api/v1/report/calls_history

Método

GET

Query String

Obs1: Todos os parâmetros são opcionais.

Obs2: Uma query string vazia gera um relatório de todas as chamadas de todas filas no dia atual.

Nome

Valor Padrão

Valor Máximo

Observações

Nome

Valor Padrão

Valor Máximo

Observações

limit

50

50

-

page

1

-

-

start_date

Dia atual

-

Formato AAAA-MM-DD

end_date

Dia atual

-

Formato AAAA-MM-DD

entity

queues

-

Valores possíveis:

queues, active_queues, queue_groups

queue_ids

all

-

Aceita mutiplos, ex:

queue_ids=1&queue_ids=2&queue_ids=3...

queue_group_ids

all

-

Usado somente se entity=queue_groups

agent_id

all

-

-

state

'' (empty)

-

-

city

'' (empty)

-

-

call_type

both

-

Valores possíveis:

in, out, both

start_hour

0

23

-

end_hour

23

23

A hora final considera todo o intervalo da hora, ex:

end_hour=14 considera chamadas até 14:59

phone_number

'' (empty)

-

-

csat

'' (empty)

-

Valores possíveis:

1, 2

protocol_number

'' (empty)

-

-

end_by_id

all

-

Valores possíveis:

all, 1,2,...,9



Exemplo de requisicão

curl -X GET \ --url https://example.evolux.net.br/api/v1/report/calls_history \ -H 'Content-Type: application/json' \ -H 'token: <EVOLUX_TOKEN>'

Exemplo de resposta

{ "pagination": { "max_limit": 50, "limit": 50, "first_url": "http://example.evolux.net.br/api/v1/report/calls_history=page=1", "next_url": "http://example.evolux.net.br/api/v1/report/calls_history&page=2", "items": 50, "last_url": "http://example.evolux.net.br/api/v1/report/calls_history&page=3", "total": 122, "current_url": "http://example.evolux.net.br/api/v1/report/calls_history&page=1", "prev_url": null }, "meta": { "status": 200, "message": "OK" }, "data": { "queue_group_map": "{}", "start_date_input": {}, "zendesk_enabled": false, "end_by_id": null, "entity": null, "selected_agent": "all", "queue_groups": [], "city": null, "selected_queues": { "1": { "selected": "selected" }, "2": { "selected": "selected" }, "3": { "selected": "selected" } }, "protocol_number": null, "end_hour": null, "state": null, "queue_agents": "{ \"1\": [[53, \"example1\"], [48, \"example2\"], [60, \"example3\"]], \"2\": [[40, \"example4\"], [48, \"example2\"]] }", "start_date": "2019-04-07T00:00:00+00:00", "phone_number": "", "end_date": "2019-04-04T23:59:59+00:00", "hour_options": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ], "start_hour": null, "selected_queue_groups": {}, "active_queues": [ { "public_number": null, "slug": "qex1", "number": "1003", "id": 1, "name": "queue example1" }, { "public_number": null, "slug": "gex3", "number": "2122", "id": 3, "name": "queue example3" } ], "queue_names": [ "queue example1", "queue example2", "queue example3" ], "call_type": "both", "end_date_input": {}, "selected_entity": "All Agents", "checked_entity": { "null": { "checked": "checked" } }, "calls": [ { "agent_name": "", "download_audio": "Not Available", "trunk_name": "", "caller_number": "1111", "caller_area": "", "caller_name": "", "queue_slug": "teste", "receiver_number": "post-queue-teste", "receicer_name": "", "receiver_area": "", "nps": "", "call_reason": "", "end_by_description": "Empty", "call_type_description": "In", "time_leave": "16:38:57", "call_duration": 0, "protocol_number": "", "flag": "", "asa": "-", "date_join": "04/08/2019", "wait_duration": 2, "time_join": "16:38:55", "did_number": "", "time_connect": "-", "csat": "", "agent_login": "" }, { "agent_name": "", "download_audio": "Not Available", "trunk_name": "", "caller_number": "1111", "caller_area": "", "caller_name": "", "queue_slug": "teste2", "receiver_number": "post-queue-teste2", "receicer_name": "", "receiver_area": "", "nps": "", "call_reason": "", "end_by_description": "Empty", "call_type_description": "In", "time_leave": "16:44:58", "call_duration": 0, "protocol_number": "", "flag": "", "asa": "-", "date_join": "04/08/2019", "wait_duration": 2, "time_join": "16:44:56", "did_number": "", "time_connect": "-", "csat": "", "agent_login": "" }, { "agent_name": "test", "download_audio": "https://edev-tyrone/callcenter/report/download_audio/78667", "trunk_name": "", "caller_number": "1111", "caller_area": "", "caller_name": "", "queue_slug": "teste2", "receiver_number": "1113", "receicer_name": "", "receiver_area": "", "nps": "", "call_reason": "", "end_by_description": "Agent", "call_type_description": "In", "time_leave": "16:53:28", "call_duration": 12, "protocol_number": "", "flag": "", "asa": "Yes", "date_join": "04/08/2019", "wait_duration": 13, "time_join": "16:53:03", "did_number": "", "time_connect": "16:53:16", "csat": "", "agent_login": "test" }, { "agent_name": "", "download_audio": "Not Available", "trunk_name": "", "caller_number": "1111", "caller_area": "", "caller_name": "", "queue_slug": "teste", "receiver_number": "post-queue-teste", "receicer_name": "", "receiver_area": "", "nps": "", "call_reason": "", "end_by_description": "Empty", "call_type_description": "In", "time_leave": "16:35:10", "call_duration": 0, "protocol_number": "", "flag": "", "asa": "-", "date_join": "04/08/2019", "wait_duration": 2, "time_join": "16:35:08", "did_number": "", "time_connect": "-", "csat": "", "agent_login": "" }, { "agent_name": "test", "download_audio": "https://edev-tyrone/callcenter/report/download_audio/78676", "trunk_name": "", "caller_number": "1111", "caller_area": "", "caller_name": "", "queue_slug": "teste", "receiver_number": "1113", "receicer_name": "", "receiver_area": "", "nps": "", "call_reason": "Aposentado", "end_by_description": "Agent", "call_type_description": "In", "time_leave": "11:27:30", "call_duration": 48, "protocol_number": "", "flag": "", "asa": "Yes", "date_join": "04/09/2019", "wait_duration": 14, "time_join": "11:26:28", "did_number": "", "time_connect": "11:26:42", "csat": "", "agent_login": "test" }, { "agent_name": "test", "download_audio": "https://edev-tyrone/callcenter/report/download_audio/78682", "trunk_name": "", "caller_number": "1113", "caller_area": "", "caller_name": "", "queue_slug": "teste", "receiver_number": "1111", "receicer_name": "", "receiver_area": "", "nps": "", "call_reason": "Aposentado", "end_by_description": "Agent", "call_type_description": "Out", "time_leave": "13:18:37", "call_duration": 90, "protocol_number": "", "flag": "", "asa": "Yes", "date_join": "04/09/2019", "wait_duration": 4, "time_join": "13:17:03", "did_number": "", "time_connect": "13:17:07", "csat": "", "agent_login": "test" }, ], "notes": [], "queue_call_services": {}, "CSAT_SCORES": { "1": "Satisfieds", "2": "Unsatisfieds" }, "csat": null, "all_agents": "[[53, \"example1\"], [40, \"example2\"], [48, \"example3\"]]", "queues": [ { "public_number": null, "slug": "qex1", "number": "1003", "id": 1, "name": "queue example1" }, { "public_number": null, "slug": "gex2", "number": "1234",