Analytics

Metrics Catalogue

GET
/v1/analytics/metrics

This endpoint lists all available metric IDs that can be used to fetch data in Get Metric Data

Authorization

ApiKeyAuth
headerAuthorization<token>

Query Parameters

pageLimit?integer

Maximum number of results per page. May be used in combination with pageKey to change the number of results in between page requests.

Formatint32
pageKey?string

Base64 encoded form of pagination query parameters. Do not try to construct or change programmatically as the internal structure may change without notice.

Response Body

The catalogue of metrics

application/json
  1. response
data?array<>
meta?
Example Request
curl -X GET 'https://dev.dixa.io/v1/analytics/metrics' \  -H 'Authorization: <API token>'
{
"data": [
{
"id": "csat",
"description": "(Number of satisfied customers (4 and 5)/ Number of survey responses) x 100 = % of satisfied customers",
"filters": [
{
"filterAttribute": "agent_id",
"description": "Used to filter by the agent_id"
},
{
"filterAttribute": "queue_id",
"description": "Used to filter by the queue_id"
},
{
"filterAttribute": "channel",
"description": "Used to filter by the channel"
},
{
"filterAttribute": "initial_direction",
"description": "Used to filter by the initial_direction"
},
{
"filterAttribute": "tag_id",
"description": "Used to filter by the tag_id"
},
{
"filterAttribute": "contact_point",
"description": "Used to filter by the contact_point"
}
],
"aggregations": [
{
"measure": "Percentage",
"description": "Calculated Percentage"
}
],
"relatedRecordIds": [
"ratings"
]
},
{
"id": "closed_conversations",
"description": "Closed conversation data",
"filters": [
{
"filterAttribute": "queue_id",
"description": "Used to filter by the queue_id"
},
{
"filterAttribute": "channel",
"description": "Used to filter by the channel"
},
{
"filterAttribute": "initial_direction",
"description": "Used to filter by the initial_direction"
},
{
"filterAttribute": "tag_id",
"description": "Used to filter by the tag_id"
},
{
"filterAttribute": "contact_point",
"description": "Used to filter by the contact_point"
}
],
"aggregations": [
{
"measure": "Count",
"description": "Conversation closed count"
}
],
"relatedRecordIds": [
"closed_conversations"
]
}
]
}

Get Metric Data

POST
/v1/analytics/metrics

Get data of a specific metric (aggregated)

Authorization

ApiKeyAuth
headerAuthorization<token>

Request Body

The available request filters and aggregations for fetching the metric data

application/json
  1. body
id*string
csidFilter?array<>
Items1 <= items
filters?array<>
aggregations?array<>
timezone*string

Response Body

The metric data

application/json
  1. response
data*
curl -X POST 'https://dev.dixa.io/v1/analytics/metrics' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "id": "closed_conversations",  "periodFilter": {    "value": {      "_type": "PreviousWeek"    },    "_type": "Preset"  },  "filters": [    {      "attribute": "channel",      "values": [        "email"      ]    }  ],  "aggregations": [    "Count"  ],  "timezone": "Europe/Copenhagen"}'
{
"data": {
"id": "closed_conversations",
"aggregates": [
{
"value": 42,
"measure": "Count",
"_type": "LongAggregateValue"
}
]
}
}

Metric Description

GET
/v1/analytics/metrics/{metricId}

This endpoint lists all available properties of a metric to use for querying its data

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

metricId*string

Response Body

The metric properties

application/json
  1. response
data*
Example Request
curl -X GET 'https://dev.dixa.io/v1/analytics/metrics/{metricId}' \  -H 'Authorization: <API token>'
{
"data": {
"id": "csat",
"description": "(Number of satisfied customers (4 and 5)/ Number of survey responses) x 100 = % of satisfied customers",
"filters": [
{
"filterAttribute": "agent_id",
"description": "Used to filter by the agent_id"
},
{
"filterAttribute": "queue_id",
"description": "Used to filter by the queue_id"
},
{
"filterAttribute": "channel",
"description": "Used to filter by the channel"
},
{
"filterAttribute": "initial_direction",
"description": "Used to filter by the initial_direction"
},
{
"filterAttribute": "tag_id",
"description": "Used to filter by the tag_id"
},
{
"filterAttribute": "contact_point",
"description": "Used to filter by the contact_point"
}
],
"aggregations": [
{
"measure": "Percentage",
"description": "Calculated Percentage"
}
],
"relatedRecordIds": [
"ratings"
]
}
}

Filter values

GET
/v1/analytics/filter/{filterAttribute}

Get possible values to be used with a given filter attribute. Filter attributes are not metric or record specific, so one filter attribute can be used with multiple metrics/records. When a filter value is not relevant for a specific metric/record, it is simply ignored.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

filterAttribute*string

Query Parameters

pageLimit?integer

Maximum number of results per page. May be used in combination with pageKey to change the number of results in between page requests.

Formatint32
pageKey?string

Base64 encoded form of pagination query parameters. Do not try to construct or change programmatically as the internal structure may change without notice.

Response Body

The possible filter values to be used when fetching metrics or records

application/json
  1. response
data?array<>
meta?
Example Request
curl -X GET 'https://dev.dixa.io/v1/analytics/filter/{filterAttribute}' \  -H 'Authorization: <API token>'
{
"data": [
{
"value": "CALLBACK",
"label": "Callback"
},
{
"value": "CONTACT_FORM",
"label": "Contact Form"
}
]
}

Metric Records Catalogue

GET
/v1/analytics/records

This endpoint lists all available record IDs that can be used to fetch data in Get Metric Records Data

Authorization

ApiKeyAuth
headerAuthorization<token>

Query Parameters

pageLimit?integer

Maximum number of results per page. May be used in combination with pageKey to change the number of results in between page requests.

Formatint32
pageKey?string

Base64 encoded form of pagination query parameters. Do not try to construct or change programmatically as the internal structure may change without notice.

Response Body

The catalogue of metric records

application/json
  1. response
data?array<>
meta?
Example Request
curl -X GET 'https://dev.dixa.io/v1/analytics/records' \  -H 'Authorization: <API token>'
{
"data": [
{
"id": "ratings",
"description": "Conversation Ratings",
"filters": [
{
"filterAttribute": "agent_id",
"description": "Used to filter by the agent_id"
},
{
"filterAttribute": "queue_id",
"description": "Used to filter by the queue_id"
},
{
"filterAttribute": "channel",
"description": "Used to filter by the channel"
},
{
"filterAttribute": "initial_direction",
"description": "Used to filter by the initial_direction"
},
{
"filterAttribute": "tag_id",
"description": "Used to filter by the tag_id"
},
{
"filterAttribute": "contact_point",
"description": "Used to filter by the contact_point"
}
],
"relatedMetricIds": [
"csat"
],
"fieldsMetadata": [
{
"field": "conversation_id",
"description": "Conversation ID",
"nullable": false
},
{
"field": "agent_id",
"description": "The agent assigned to the conversation",
"nullable": true
},
{
"field": "queue_id",
"description": "The queue which the conversation was part of when the conversation was offered",
"nullable": true
}
]
},
{
"id": "closed_conversations",
"description": "Closed conversation data",
"filters": [
{
"filterAttribute": "queue_id",
"description": "Used to filter by the queue_id"
},
{
"filterAttribute": "channel",
"description": "Used to filter by the channel"
},
{
"filterAttribute": "initial_direction",
"description": "Used to filter by the initial_direction"
},
{
"filterAttribute": "tag_id",
"description": "Used to filter by the tag_id"
},
{
"filterAttribute": "contact_point",
"description": "Used to filter by the contact_point"
}
],
"relatedMetricIds": [
"closed_conversations"
],
"fieldsMetadata": [
{
"field": "closed_at",
"description": "Timestamp of when the conversation was closed",
"nullable": false
},
{
"field": "conversation_id",
"description": "Conversation ID",
"nullable": false
},
{
"field": "agent_id",
"description": "The agent closing the conversation",
"nullable": true
},
{
"field": "queue_id",
"description": "The queue which the conversation was part of when the conversation was closed",
"nullable": true
},
{
"field": "closed_by",
"description": "User closing the conversation (Agent, Enduser or Unknown)",
"nullable": false
}
]
}
]
}

Get Metric Records Data

POST
/v1/analytics/records

Get data of specific metric records (unaggregated)

Authorization

ApiKeyAuth
headerAuthorization<token>

Query Parameters

pageLimit?integer

Maximum number of results per page. May be used in combination with pageKey to change the number of results in between page requests.

Formatint32
pageKey?string

Base64 encoded form of pagination query parameters. Do not try to construct or change programmatically as the internal structure may change without notice.

Request Body

The available request filters for fetching the metric records data

application/json
  1. body
id*string
csidFilter?array<>
Items1 <= items
filters?array<>
timezone*string

Response Body

The metric records data

application/json
  1. response
data?array<>
meta?
curl -X POST 'https://dev.dixa.io/v1/analytics/records' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "id": "closed_conversations",  "periodFilter": {    "value": {      "_type": "PreviousWeek"    },    "_type": "Preset"  },  "filters": [    {      "attribute": "initial_direction",      "values": [        "INBOUND"      ]    }  ],  "timezone": "Europe/Copenhagen"}'
{
"data": [
{
"primaryTimestampField": {
"name": "created_at",
"timestamp": "2023-04-21T10:23:14.293Z"
},
"fields": [
{
"name": "csid",
"field": {
"value": 184472,
"_type": "LongField"
}
},
{
"name": "initial_direction",
"field": {
"value": "INBOUND",
"label": "Inbound",
"_type": "StringField"
}
},
{
"name": "initial_channel",
"field": {
"value": "PSTN_PHONE",
"label": "Phone",
"_type": "StringField"
}
},
{
"name": "contact_point",
"field": {
"value": "+4511223344",
"label": "+4511223344",
"_type": "StringField"
}
}
]
},
{
"primaryTimestampField": {
"name": "created_at",
"timestamp": "2023-04-21T10:24:04.259Z"
},
"fields": [
{
"name": "csid",
"field": {
"value": 184473,
"_type": "LongField"
}
},
{
"name": "initial_direction",
"field": {
"value": "INBOUND",
"label": "Inbound",
"_type": "StringField"
}
},
{
"name": "initial_channel",
"field": {
"value": "EMAIL",
"label": "Email",
"_type": "StringField"
}
},
{
"name": "contact_point",
"field": {
"value": "dixa@email.com",
"label": "dixa@email.com",
"_type": "StringField"
}
}
]
}
]
}
GET
/v1/analytics/records/{recordId}

This endpoint lists all available properties of a record to use for querying its data

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

recordId*string

Response Body

The metric record properties

application/json
  1. response
data*
Example Request
curl -X GET 'https://dev.dixa.io/v1/analytics/records/{recordId}' \  -H 'Authorization: <API token>'
{
"data": {
"id": "ratings",
"description": "Conversation Ratings",
"filters": [
{
"filterAttribute": "agent_id",
"description": "Used to filter by the agent_id"
},
{
"filterAttribute": "queue_id",
"description": "Used to filter by the queue_id"
},
{
"filterAttribute": "channel",
"description": "Used to filter by the channel"
},
{
"filterAttribute": "initial_direction",
"description": "Used to filter by the initial_direction"
},
{
"filterAttribute": "tag_id",
"description": "Used to filter by the tag_id"
},
{
"filterAttribute": "contact_point",
"description": "Used to filter by the contact_point"
}
],
"relatedMetricIds": [
"csat"
],
"fieldsMetadata": [
{
"field": "conversation_id",
"description": "Conversation ID",
"nullable": false
},
{
"field": "agent_id",
"description": "The agent assigned to the conversation",
"nullable": true
},
{
"field": "queue_id",
"description": "The queue which the conversation was part of when the conversation was offered",
"nullable": true
}
]
}
}