Skip to content
This repository was archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
91 lines (75 loc) · 2.97 KB

File metadata and controls

91 lines (75 loc) · 2.97 KB

Get Analytics Overview

Get the overview of omnichannel analytics in your workspace.

{% hint style="info" %}

  • It requires the view-livechat-manager permission. {% endhint %}
HTTP MethodURLRequires Auth
GET/api/v1/livechat/analytics/overviewyes

Query Parameters

KeyExample ValueDescription
name*Conversations

The data that you want to get. The available options are:

  • Conversations
  • Productivity
from*2019-05-22T12:11:45.392ZThe start date
to*2023-05-22T12:11:45.392ZThe end date
departmentIdjsi9w0oakusssThe department ID to return results for.

Example Call

{% code overflow="wrap" %}

curl -L -X GET 'http://localhost:3000/api/v1/livechat/analytics/overview?name=Conversations&from=2019-05-22T12%3A11%3A45.392Z&to=2023-05-22T12%3A11%3A45.392Z' \
-H 'x-auth-token: qlHA60g5JQjJJG7C_8MgXoFnOiRQ8X9TWVVq4AcQeFb' \
-H 'x-user-id: rbAXPnMktTFbNpwtJ'

{% endcode %}

Example Response

[
    {
        "title": "Total_conversations",
        "value": 1086
    },
    {
        "title": "Open_conversations",
        "value": 119
    },
    {
        "title": "On_Hold_conversations",
        "value": 1
    },
    {
        "title": "Total_messages",
        "value": 4892
    },
    {
        "title": "Busiest_day",
        "value": "Tuesday"
    },
    {
        "title": "Conversations_per_day",
        "value": "0.74"
    },
    {
        "title": "Busiest_time",
        "value": "7AM- 8AM"
    }
]

Error

Any of the following errors can occur on the endpoint.

  • Authorization: Requires an authentication token for the request to be made.
  • No Permission: This occurs when the authenticated user doesn't have the view-livechat-manager permission.

{% tabs %} {% tab title=" Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="No Permission" %}

{
    "success": false,
    "error": "User does not have the permissions required for this action [error-unauthorized]"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
6.4.0 Added