Check if the user asked a question before requesting support


Is it possible to check using a script that a user has already submitted at least one question before starting our “helpline” dialog task ?

Hello @clement.guilbert_ext :smiley:,

Welcome to Kore Community :clap:

If I understand correctly, at some point of time in the dialog flow, users will have the option to choose helpline option (dialog). You want to ensure that users have talked to the bot with at least one question (apart from smalltalk) before processing the helpline task.

There are two ways to work on this usecase:

In the first you can control the dialog flow by ensuring users are asked for an input query - through a welcome dialog for example, before directing the flow to other tasks. If you need to capture that utterance that can be done through context variables.
I.e, setting context.queryinput = {{session.entities.EntityName}}
You can find the following documentation helpful -

The second option is to use Conversation History API to pull the messages based on session id and user id. The linked documentation should be helpful.

Hope this helps!

Thank you for stopping by!!

Hello, I will be using the conversation API. Do you know how to fix error 4002 invalid credentials ? I deployed my bot as web client, used postman and provided the bot Id, user Id and JWT (generated using clientId and bot secret) to get this error.

Update, I managed to get it to work, the JWT was not properly configured. Now I want to use the session ID as filter in the query. When I use it, the parameter is applied but doesn’t work as a filter. Is this a known issue ?

Hello Clement,

Thank you for the feedback on the API. We have created a ticket on your behalf to track this issue.

Hello, any news on this issue ?
Also, is it possible to contact this API via teams channel ?

Hello @clement.guilbert_ext ,

We have worked with our developer for clarify on the usage of sessionId as filter. Couple of things to note:

  • By default only last 7 days data is pulled. If session ID is mentioned without from and to date the filter will apply only to the last 7 days data, which may not include that sessionId. So you will need to include the from and to dates.

  • If the session is developer session we need to include “isDeveloper”: true as part of the body to ensure we get developer records.

Test with the recommended changes and let us know if any issues.

For your question on contacting API via teams channel: If this API is defined as a service node in the bot dialog, and teams channel is enables, yes it can be triggered from the channel. If the data retrieved should be displayed to the user that too can be defined in the dialog task.

Let us know if this clarifies your query.

Yes thank you it is more clear now, we need to use post request not get when working with session ID.