Analytics

Filter values

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.

SecurityApiKeyAuth
Request
path Parameters
filterAttribute
required
string
query Parameters
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.

pageLimit
integer <int32>

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

Responses
200

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

400

Invalid value extracted from request context, Invalid value for: query parameter pageLimit, Invalid value for: query parameter pageKey

500

Internal Server Error

get/beta/analytics/filter/{filterAttribute}
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "value": "CALLBACK",
      • "label": "Callback"
      },
    • {
      • "value": "CONTACT_FORM",
      • "label": "Contact Form"
      }
    ]
}

Get Metric Data

Get data of a specific metric (aggregated)

SecurityApiKeyAuth
Request
Request Body schema: application/json
required

The available request filters and aggregations for fetching the metric data

One of:
aggregations
Array of strings
csidFilter
Array of integers <int64> non-empty
Array of objects (Filter)
id
required
string
timezone
required
string
Responses
200

The metric data

400

Invalid value extracted from request context, Invalid value for: body

500

Internal Server Error

post/beta/analytics/metrics
Request samples
application/json
{
  • "id": "closed_conversations",
  • "periodFilter": {
    • "value": {
      • "_type": "PreviousWeek"
      },
    • "_type": "Preset"
    },
  • "filters": [
    • {
      • "attribute": "channel",
      • "values": [
        • "email"
        ]
      }
    ],
  • "aggregations": [
    • "Count"
    ],
  • "timezone": "Europe/Copenhagen"
}
Response samples
application/json
{
  • "data": {
    • "id": "closed_conversations",
    • "aggregates": [
      • {
        • "value": 42,
        • "measure": "Count",
        • "_type": "LongAggregateValue"
        }
      ]
    }
}

Get Metric Records Data

Get data of specific metric records (unaggregated)

SecurityApiKeyAuth
Request
query Parameters
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.

pageLimit
integer <int32>

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

Request Body schema: application/json
required

The available request filters for fetching the metric records data

One of:
csidFilter
Array of integers <int64> non-empty
Array of objects (Filter)
id
required
string
timezone
required
string
Responses
200

The metric records data

400

Invalid value extracted from request context, Invalid value for: query parameter pageLimit, Invalid value for: query parameter pageKey, Invalid value for: body

500

Internal Server Error

post/beta/analytics/records
Request samples
application/json
{
  • "id": "closed_conversations",
  • "periodFilter": {
    • "value": {
      • "_type": "PreviousWeek"
      },
    • "_type": "Preset"
    },
  • "filters": [
    • {
      • "attribute": "initial_direction",
      • "values": [
        • "INBOUND"
        ]
      }
    ],
  • "timezone": "Europe/Copenhagen"
}
Response samples
application/json
{
  • "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"
            }
          }
        ]
      }
    ]
}

Metric Description

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

SecurityApiKeyAuth
Request
path Parameters
metricId
required
string
Responses
200

The metric properties

400

Invalid value extracted from request context

500

Internal Server Error

get/beta/analytics/metrics/{metricId}
Request samples
Response samples
application/json
{
  • "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"
      ]
    }
}

Metric Record Description

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

SecurityApiKeyAuth
Request
path Parameters
recordId
required
string
Responses
200

The metric record properties

400

Invalid value extracted from request context

500

Internal Server Error

get/beta/analytics/records/{recordId}
Request samples
Response samples
application/json
{
  • "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
        }
      ]
    }
}

Metric Records Catalogue

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

SecurityApiKeyAuth
Request
query Parameters
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.

pageLimit
integer <int32>

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

Responses
200

The catalogue of metric records

400

Invalid value extracted from request context, Invalid value for: query parameter pageLimit, Invalid value for: query parameter pageKey

500

Internal Server Error

get/beta/analytics/records
Request samples
Response samples
application/json
{
  • "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
          }
        ]
      }
    ]
}

Metrics Catalogue

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

SecurityApiKeyAuth
Request
query Parameters
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.

pageLimit
integer <int32>

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

Responses
200

The catalogue of metrics

400

Invalid value extracted from request context, Invalid value for: query parameter pageLimit, Invalid value for: query parameter pageKey

500

Internal Server Error

get/beta/analytics/metrics
Request samples
Response samples
application/json
{
  • "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"
        ]
      }
    ]
}