Total Sessions, excluding 'Test' engagements


I would like to report on the total sessions, whilst excluding test engagements. Test engagements are any conversation containing _i_want_2_test

The current query I use to generate the count of interactive sessions is: distribute date : catd(model="date") s.beginTime as date, s.transactionCount > 1, s.beginTime == in {"now-1M/M"} order by date asc

I’d need to apply an adorner for sessions containing _i_want_2_test with a boolean and then add this to my query to remove any test engagements, however, would appreciate your support in how to go about this.

Thank you,

Hello Grant,

You are on the right track. Actually, you already completed most of the journey yourself. You are correct: an adorner would be the best way to go about it. The easiest type of adorner to create is a TQL adorner. You could call the adorner “IsTestSession” and specify this TQL statement to adorn all sessions that contain at least one user input equal to “_i_want_2_test”:

adorn s.a.b:IsTestSession = true : t.e.userInput == '_i_want_2_test'

The adornment key is “s.a.b:IsTestSession”. That is the property you can refer to in your TQL queries. For your final ‘distribute’ query, include this additional constraint:

s.a.b:IsTestSession != true

As you may have noticed, the sessions are not adorned with the absence of the test input, only with the presence. If you want an adorner that adorns sessions with “true” for a test session and with “false” for a regular session, you’d have to create a Groovy adorner. But I think for your use case the TQL adorner is good enough.


1 Like

Hi Paul,

Thank you very much for the comprehensive response, this sounds perfect!

Kind regards,