Downloading statistics via API

Downloading statistics via API

Warning
These instructions are intended for people with a basic understanding of the web programming language: JavaScript. If this doesn't apply to you, we recommend contacting your developers and providing them with these instructions. Installation will be very easy for them.

Oct8ne allows you to download information from all sessions stored on the platform to facilitate external data processing.
To do this, you must send a request to the Oct8ne servers using a security key and identifier provided by our technical team.
This request allows you to specify a date range, which must not exceed 31 days and cannot include dates older than the last year, as well as some additional filter criteria.

Info
LIMITATIONS
For performance reasons, the use of this API is limited to one request per minute. Dates older than the last year cannot be queried, and the query cannot exceed 31 days.
The downloaded data does not contain the conversation data. It only includes session duration, status, and other relevant information. The download does not include a transcript of the chat itself.

Example of a request:


  1. https://[OCT8NE-SERVER-HERE]/apidata/export/v2/sessions/[FORMAT]?apiToken=[YOUR- APIKEY-HERE]&domainId=[YOUR-DOMAIN-ID]&startTime=[DATE]&endTime=[DATE]&utcOffset=[UTC_OFFSET]

Info
 The variable [OCT8NE-STATIC-SERVER-HERE] refers to the Oct8ne server on which it is registered. Oct8ne works with different servers, in the USA and the EU.

Once you're in the Oct8ne control panel, check your browser's address (URL):
If it's something like 'backoffice.oct8ne.com', you're using the USA server.
If it's 'backoffice-eu.oct8ne.com', you're using the EU server.

The value of the variable depends on the server.
In EU,  [OCT8NE-STATIC-SERVER-HERE] → static-eu.oct8ne.com
In USA,  [OCT8NE-STATIC-SERVER-HERE] → static.oct8ne.com

Info
The data can be obtained in CSV or JSON format. Therefore, the [FORMAT] variable can be the value 'csv' or 'json', depending on the format you wish to export.

Regarding the request parameters:

apiToken: Domain security key provided by the technical team.  [YOUR- APIKEY-HERE
domainId: Domain identifier that is provided by the technical team. [YOUR-DOMAIN-ID]
startTime:  Start date of the sessions to be exported. The format must be mm/dd/yyyy [DATE]
endTime: End date of the sessions to be exported. The format must be mm/dd/yyyy and cannot exceed 31 days from the start date. [DATE]
utcOffset: Local time difference from UTC+0, in hours (for example, if we are in UTC+1, the value would be 1) [UTC_OFFSET]

agentFilter:  Optional. Agent ID by which we want to filter the data. By default, all agents are shown.
deptFilter:  Optional.  Department ID. By default, all departments are displayed.

attentionFilterOptional. Numerical value indicating the filter to apply according to the user's service status in the session:
1: Sessions that were handled by an agent.
2: Sessions in which the visitor requested help (default).
3: Sessions in which the visitor requested help but was not assisted.

durationFormat:  Optional. Numeric value indicating the format of the duration fields. Default value 0.
0: Time format (hh:mm:ss)
1: Total seconds

sale:  Optional. Numerical value indicating the filter to apply depending on whether a sale has been recorded in the session:
0: All sessions, regardless of whether a sale was recorded. (Default value).
1: Sessions in which a sale was recorded.
2: Sessions in which no sale was recorded.
If this field is not submitted, all sessions will be downloaded, regardless of whether a sale was recorded.

agentTypeOptional. Numerical value indicating the filter to apply depending on whether the last person who attended was a Human or a Bot:
0: All sessions, regardless of whether the agent is a Bot or Human. (default value).
1: Sessions where the agent is a Human.
2: Sessions where the agent is a Bot.
If this field is not submitted, all sessions will be downloaded, regardless of the agent type.

Final example of a GET request (json format):

Idea
If you do not have your apitoken and domainId information, please contact contact@oct8ne.com and they will provide you with the necessary details shortly.



You can also download the contacts generated in Oct8ne. In this case, the request changes and the path points to 'leads'.

Example of a request:
  1. https://[OCT8NE-SERVER HERE]/apidata/export/v2/leads/[FORMAT]?apiToken=[YOUR- APIKEY HERE]&domainId=[YOUR-DOMAIN-ID]&startTime=[DATE]&endTime=[DATE]&utcOffset=[UTC_OFFSET] 

* The parameters are the same, except that optional filters are not accepted at this endpoint.
    • Related Articles

    • Oct8ne API for custom CSM integration

      Oct8ne API documentation API version 2.4 Contents 1. Introduction 2. Architecture 3. Overview 3.1. Downloading and installing plug-ins and extensions 3.2. Registering as a developer and enabling the platform 3.3. Inserting the oct8ne widget 3.4. ...
    • API for sending transactional or bulk messages from WhatsApp

      Introduction WhatsApp Delivery API allows you to automate the delivery of WhatsApp templates via Oct8ne. The following operations are available: Send template to WhatsApp Get delivery status Get deliveries Get message details Security All API calls ...
    • Install Oct8ne via Google Tag Manager (GTM)

      Install Oct8ne via Google Tag Manager (GTM) To display the Oct8ne code on your page using Google Tag Manager (GTM), follow these steps: 1.- Open the GTM workspace, select Triggers from the main menu, and click the NEW button. 2.- Click on the Trigger ...
    • CONFIGURING PERMISSIONS WHEN INSTALLING MESSENGER AND INSTAGRAM (VIA ONE-CLICK)

      The issue arises when, upon initiating the one-click process, the user receives a message indicating they are not an admin of the page, causing the process to be canceled. Often, the user asserts that they are indeed an admin and demonstrates that ...
    • Cancelling a WhatsApp Business API (Waba) number

      This document describes the cancellation process, the different statuses that the number goes through both in the 360 Dialog hub and what the customer can continue to do or not do from the time we request the cancellation of a number until it is ...