Teneo Developers

Locate and view a session

When users interact with your published bot, session logs are generated. In these set of steps we want to show you how to,

  • have a test chat with your bot
  • locate the session in the LDS session viewer for a closer look at what happened

The retention time for data in the Log Data Source (LDS) is 12 weeks by default for sandbox environments. This can be adjusted in the Teneo Manager.

In the Session Viewer you can inspect the questions and answers as well as view information about the user input's path through the solution to a response.

Find the latest session

  1. Navigate to Optimization and select the tab 'Log Data'.
  2. Open the 'LDS' window (select the option Open under Manage Source).
  3. Click the button New Session Viewer Tab.
  4. Under Order By select the options Start Date and Descending.
  5. Click the Run Query button.
  6. Double click the topmost session in the query results to view the details of the session.

Note: if you haven't yet published your bot you will not find a 'Log Data Source' listed under Optimization. In case you have published your bot, and no one has chatted with it, the LDS will exist but be empty. Please refer to the section on how to generate session logs.

Locate a particular session

You may want to examine a particular session you discover while running queries against the LDS. In general, your query should display the 'session ID', which you can then copy and use in a more detailed query focused on that session, as well as for locating the session directly in the session viewer for a more detailed examination. We will show you how to do that in these sections.

Display general session information

The following steps show you how to run a query that returns a list of all sessions along with some associated information.

  1. Open the Longberry Baristas solution.
  2. Click on the 'Solution' tab, located in the top left corner. Navigate to 'Optimization' and select the tab 'Log Data'.
  3. Open the LDS window (select the option Open under Manage Source).
  4. Run a query to display sessions: la s.beginTime as beginTime, s.id as sessionId, s.transactionCount as numberOfInputs order by beginTime.
  5. Select a session that looks interesting (due to start time or length) and copy out the session ID.

Run a query to display a transcript of the session

Now that we have a session to explore, we can run a query to show a simple transcript of that session (inputs and outputs). Try this:


1la t.id, t.time, t.e1.userInput, t.e2.answerText: s.id == "<copy your session ID here>"

Now you should see a report of each transaction, along with the user input and bot response, for an easy reading of what happened.

TQL - First Query

Find a session in the session viewer

Sometimes you may want additional detailed information about the session, such as which listeners were active, which variables were set, etc. Perhaps you want to verify that something new that you built is working as expected. In this case, you can view a detailed report of the session, including all events of each of the individual transactions, in the session viewer.

  1. Open the session viewer by clicking the button New Session Viewer Tab.
  2. Enter a query: s.id == "<paste in the session ID here>".
  3. Click into the session via the result.

TQL - Session Viewer

From this view, you can expand or hide transaction and event details. Viewing the session in such detail can also be helpful when constructing queries you need to discover more sessions in which something particular happened, e.g. a variable changing while a particular flow is active, etc.