{
    "componentChunkName": "component---src-templates-doc-page-js",
    "path": "/docs/en/analytics/dialog_logs/",
    "result": {"data":{"site":{"siteMetadata":{"title":"Gatsby-doc-engine"}},"markdownRemark":{"id":"86836891-db56-5b83-860b-fa40d8448ea1","excerpt":"Dialog statistics The statistics analysis platform provides access to daily logs. Users can download the previous day’s logs for the entire account. The logs…","html":"<h1>Dialog statistics</h1>\n<hr>\n<p>The statistics analysis platform provides access to daily logs. Users can download the previous day’s logs for the entire account. The logs are provided in the <code class=\"language-text\">.csv</code> file format.</p>\n</br>\n<h4>How can I download dialog logs?</h4>\n<ol>\n<li>\n<p>The account administrator should contact technical support with a request to activate the dialog log download option. If you use one of the business plans (<em>JAICP Business Standard</em>, <em>JAICP Business Pro</em>, <em>JAICP Business Pro+</em>, <em>JAICP Business Ultra</em>, <em>JAICP Business Enterprise</em>), the option was automatically activated when switching to this plan.</p>\n</li>\n<li>\n<p>After technical support has confirmed that the option has been enabled, the account administrator adds the <a href=\"/1.10.3/docs/en/platform_ux/role_model\"><em>RAWLOGS_ANALYTIC</em> role</a> to the users that should have permission to download <code class=\"language-text\">.csv</code> dialog log files.</p>\n</li>\n<li>\n<p>Any user with the role <em>RAWLOGS_ANALYTIC</em> is authorized on the platform and downloads dialog logs to the address:</p>\n</li>\n</ol>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">http(s)://hostname/restapi/rawlogs/dd-mm-yyyy.csv   // hostname – the platform address, dd – the day, mm – the month, yyyy – the year</code></pre></div>\n</br>\n<h4>When will the logs start to generate?</h4>\n<p>Note that the upload logs begin to be generated when the option is enabled. Dialog logs generated before the option is enabled are not available for download.</p>\n<p>Daily logs are written to a file for the previous day as counted from the start time of the log generation task. By default, logs for the previous day are generated at <code class=\"language-text\">00:01</code> <code class=\"language-text\">UTC-0</code>. When dialog logs for the same day are generated, the previously saved file is overwritten.</p>\n<p>Please note that dialog logs in the <a href=\"/1.10.3/docs/en/platform_ux/analytics_dialogs\"><em>Dialogs</em> section</a> are displayed in accordance with the time zone set in the <a href=\"/1.10.3/docs/en/platform_ux/user_profile#Timezone-setup\">user profile</a>. However, in the exported file the time zone is <code class=\"language-text\">UTC-0</code>.</p>\n</br>\n<h4>I have enabled removal of dialog logs</h4>\n<p>If the <a href=\"/1.10.3/docs/ru/security/log_removal\"><em>Cleanup dialogs</em></a> option is active for the account or for a project, then logs older than the specified date will be completely deleted for the entire account, regardless of the project.</p>\n</br>\n<h4>Is there another way to download logs?</h4>\n<p>You can also download the file with a GET request. The download is available only to authenticated users that have the <em>RAWLOGS_ANALYTIC</em> role. You can use <a href=\"https://en.wikipedia.org/wiki/Basic_access_authentication\" target=\"_blank\" rel=\"noopener noreferrer\">basic authentication</a> to authenticate. To do so, in the <code class=\"language-text\">Headers</code> specify <code class=\"language-text\">Product:botadmin</code>.</p>\n</br>\n<h4>Exported data</h4>\n<table>\n<thead>\n<tr>\n<th align=\"left\">Field</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\"><code class=\"language-text\">session_id</code></td>\n<td>session ID</td>\n<td><code class=\"language-text\">20a8444a-e1dd-5865-5ee7-b03fcb65e19b.732196de-2de6-455f-b751-e2c9a4700c62</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">session_start_time</code></td>\n<td>the session start time</td>\n<td><code class=\"language-text\">28.01.2019 17:18:45</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">session_end_time</code></td>\n<td>the session end time</td>\n<td><code class=\"language-text\">28.01.2019 21:18:45</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">session_questions_count</code></td>\n<td>the overall number of phrases in the session</td>\n<td><code class=\"language-text\">14</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">session_tag</code></td>\n<td>the tag of the session</td>\n<td><code class=\"language-text\">The request has been fulfilled</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">channel_type</code></td>\n<td>the type of the channel</td>\n<td><code class=\"language-text\">Telegram</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">channel_name</code></td>\n<td>the name of the channel</td>\n<td><code class=\"language-text\">demo_bot</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">client_id</code></td>\n<td>the user ID</td>\n<td><code class=\"language-text\">telegram-118460129-demobot-118460129-XLA-160021967-294227430</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">client_name</code></td>\n<td>the name of the client</td>\n<td><code class=\"language-text\">John</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">project_name</code></td>\n<td>the name of the project</td>\n<td><code class=\"language-text\">Demobot</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">msg_rt</code></td>\n<td>the time the phrase was written by the server</td>\n<td><code class=\"language-text\">13.02.2019 13:41:12</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">msg_question</code></td>\n<td>the user request</td>\n<td><code class=\"language-text\">Find the nearest ATM</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">msg_answer</code></td>\n<td>the bot reply</td>\n<td><code class=\"language-text\">The nearest ATM is located at the Chkalovskaya subway station</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">state_before</code></td>\n<td>the state before processing the request</td>\n<td><code class=\"language-text\">/Menu</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">state_after</code></td>\n<td>the state after processing the request</td>\n<td><code class=\"language-text\">/CatchAll/Switch/NoOperatorsOnline</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">msg_switched</code></td>\n<td><code class=\"language-text\">true</code>: a transfer to another operator took place after this request </br></br> <code class=\"language-text\">false</code>: no switching occurred</td>\n<td><code class=\"language-text\">true</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">msg_operator</code></td>\n<td><code class=\"language-text\">true</code>: the operator replied </br></br> <code class=\"language-text\">false</code>: the bot replied</td>\n<td><code class=\"language-text\">false</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">msg_comment</code></td>\n<td>comment to the phrase</td>\n<td><code class=\"language-text\">ATM search</code></td>\n</tr>\n<tr>\n<td align=\"left\"><code class=\"language-text\">msg_tags</code></td>\n<td>tags for the phrase</td>\n<td><code class=\"language-text\">ATMs</code></td>\n</tr>\n</tbody>\n</table>","frontmatter":{"title":"","description":null},"headings":[{"value":"Dialog statistics"}]}},"pageContext":{"slug":"/docs/en/analytics/dialog_logs/","previous":{"fields":{"slug":"/docs/en/analytics/custom_fields/"},"frontmatter":{"title":"","description":null}},"next":{"fields":{"slug":"/docs/en/Patterns/pattern_weight/"},"frontmatter":{"title":"","description":null}}}},
    "staticQueryHashes": ["1209419333"]}