Skip to main content

Dialog log export

JAICP provides access to daily logs to analyze dialog statistics. You can download logs for the necessary day in a CSV or XLSX file.

Download logs from the interface

To download logs from the JAICP interface to an XLSX file:

  1. Go to the appropriate subsection of the Analytics section: either Dialogs or Clients.
  2. Apply the necessary filters.
  3. Select the Session log button in Dialogs or Download report in Clients.
  4. Watch the real-time progress of log generation in the task list. There you can cancel the export prematurely if you need to.
  5. Download the report as a table in an XLSX file.

A notification that the logs are ready

caution
The generated report results depend on the filters applied. To download the full report, reset the filters you applied earlier.

Exported data

In Dialogs section

ColumnDescriptionExample
ProjectProject name.test-1234567-ABC
Channel typetelegram
Channel ID1234567-test-1234567-ABC-987654
Client ID098765432
Client nameThe user’s name that they specified in the channel.Alex
Session IDtelegram-1234567-test-1234567-ABC-987654-449950996.38ea0050-b792-4c52-9021-104dd322ab08
Session startSession start date and time are displayed according to the time zone set in the user profile.03.03.2023 10:53:07
Session endSession end date and time.03.03.2023 13:02:47
First phraseUser’s first phrase in this session.hi
Last phraseUser’s last phrase in this session.bye
DurationSession length.02:09:39
Phrase countThe number of messages from the user in this session.9
Session labelsLabels are set manually in the Analytics section or in the script code.The request is granted
Session resultThe result is specified in the script code or in state labels in J‑Graph.Refused to take the survey
Transfer to an agentA user was transferred to an agent or not.Yes or No
Call directionInbound or outbound call (only for voice bots).Outbound
Call campaign ID1234567890

In Clients section

ColumnDescriptionExample
Client ID098765432
Client nameThe user’s name that they specified in the channel.Alex
Channel typetelegram
Join dateThe date and time when the dialog started. It is displayed according to the time zone set in the user profile.03.03.2023 10:53:07
Last active dateThe date and time when the user last contacted the bot.13.03.2023 17:00:00
Channel ID1234567-test-1234567-ABC-987654
ActiveIf the user is blocked, they are not active.Yes or No

Download logs via a GET request

To download logs via a GET request to a CSV file:

  1. The project group owner should contact support with a request to activate the option to download dialog logs.

    tip
    If you have an Enterprise plan, you can already download dialogs in this way. This option is automatically activated when you upgrade to a paid plan.
  2. Then the project group owner adds the RAWLOGS_ANALYTIC role to the users that should have the permission to download dialog logs.

  3. The user with the RAWLOGS_ANALYTIC role logs in to the platform and downloads dialog logs using this URL:

http(s)://{'<hostname>'}/restapi/rawlogs/dd-mm-yyyy.csv

Where:

  • hostname is the name of the platform host. For example, app.jaicp.com.
  • dd, mm, and yyyy are the date, month, and year respectively.
caution
If you don’t send a request from a browser, use the basic access authentication:

`curl -H 'Authorization: Basic <...>' http(s)://<hostname>/restapi/rawlogs/dd-mm-yyyy.csv`

Exported data

The exported CSV file contains the columns below. The column separator is ;.

ColumnDescriptionExample
session_idSession ID.20a8444a-e1dd-5865-5ee7-b03fcb65e19b.732196de-2de6-455f-b751-e2c9a4700c62
session_start_timeSession start time.28.01.2019 17:18:45
session_end_timeSession end time.28.01.2019 21:18:45
session_questions_countThe total number of phrases in this session.14
session_tagSession labels.The request has been fulfilled
channel_typeChannel type.Telegram
channel_nameChannel name.demo_bot
client_idUser ID.telegram-118460129-demobot-118460129-XLA-160021967-294227430
client_nameUser name.John
project_nameProject name.Demobot
msg_rtThe time when the phrase was processed by the server.13.02.2019 13:41:12
msg_questionUser request.Find the nearest ATM
msg_answerBot reply.The nearest ATM is located at the Queens Plaza subway station
state_beforeState before processing the request./Menu
state_afterState after processing the request./CatchAll/Switch/NoOperatorsOnline
msg_switchedIf true, the user was transferred to an agent after the request.
If false, there was no transfer to an agent.
msg_operatorIf true, the request was answered by an agent.
If false, the bot responded.
false
msg_commentPhrase comment.ATM search
msg_tagsPhrase labels.ATMs

When does log generation start?

Log generation starts when the option is first enabled. Earlier dialog logs cannot be downloaded.

Daily logs are written to a file for the previous day. By default, logs for the previous day are generated at 00:01 in the UTC−0 time zone. When dialog logs for the same day are generated, the previously saved file is overwritten.

caution
In the CSV file, the time is displayed by UTC-0, regardless of the time that is specified in the user profile.

How can I regenerate the log report?

The account owner or the user with the RAWLOGS_ANALYTIC role can regenerate log reports using a GET request with the force=true parameter:

http(s)://<hostname>/restapi/rawlogs/run/{'accountId'}/dd-MM-yyyy?force=true
tip
The new log report will be available for download in 10 minutes at the former address.

Removal of dialog logs

If the Cleanup dialogs option is active for a project, the logs older than the specified date will be completely removed.