prod - 20261013-083619 - cb7f8b630deb7a27a85ea2f9e79ca9d2dcc1341f

Analytics API

The Analytics API provides API endpoints to retrieve all sorts of data and metrics regarding the conversations in your Seamly account. This allows you to interpret the data yourself, integrate the data in your data warehouse and, for example, create your own dashboards.

Overview

The Analytics API provides the following information in different endpoints.

Conversation

All conversations with their analytics events. This includes start times, end times, wether the user responded or not and the user environment. The events indicate when services and channels were attached during the conversation. Also hooks, translations and topics are tracked. A full overview can be found in the OpenApi Spec.

Availability

Contains all availability changes for all services and profile combinations. This means you can historically fetch all of your service availability in a certain time frame.

Agent escalations

Every time a user triggers an "escalation start" in the bot (only if set up correctly in the bot) a new escalation is started either with the status "offered" when the live chat has availability or with status "missed" when there was no availability. When and if the escalation progresses, the escalation status is updated.

Transactions

Information about transactions performed in the Seamly Transactional Platform. A  transaction  is a conversation session between a user and a bot, where the bot can retrieve information for the user or perform an action. In such a conversation, certain steps are taken, where the bot usually asks a question or answers a question. Each question in it is a  step . By putting steps together, a  dialog  is formed, for example, to request the user's address details. One or more dialogs form a  flow , which indicates the goal of the transaction.

This endpoint exposes all transactions performed including all steps, dialogs and the final result of the transaction.

Requirements

To access the API you need to provide your account's API key and the analytics API token. Both will be provided by your Seamly contact.

The Analytics API endpoint is (replacing  [analytics_key]  with your API key):

  • For production:  https://analytics.seamly-app.com/analytics/v1/[analytics_key]
  • For UAT:  https://analytics.uat.seamly-app.com/analytics/v1/[analytics_key]

The token must be provided on every request, see  Authentication  for details.

Retrieving data

All provided endpoints can be used to retrieve data from within a certain timeframe. The data is provided in  ndjson  format. This means every line contains a JSON object that is streamed out, and can be processed and stored by the client without having to buffer the data in its entirety.

Sample request:

curl -s https://analytics.seamly-app.com/analytics/v1/c92dbc5a-b167-45b5-a088-8586573c0f4e/conversations\?from_datetime=2022-11-01T13:00:37Z -H "Authorization: Bearer YOUR_API_TOKEN"

A complete list of available endpoints can be found in the OpenAPI specification.

OpenAPI specification

The Analytics API provides a REST API to retrieve data. An OpenAPI specification is provided  here .