HITL: Alerting agent when the conversation is paused

Hello,

I have some issue to alerting an agent when the conversation is on pause.
I effectivelly put the conversation in pause but the alert for the agent doesn’t work.
I use botpress web.

const axiosConfig = await bp.http.getAxiosConfigForBot(event.botId)
try {
      await axios.post('/mod/hitl/channel/web/user/zZMULJNebPu0oh3Bb3RdD/pause', {}, axiosConfig)

      const { botId } = event
      const message = user.first_name + ' wants to talk to a human'
      bp.notifications.create(botId, { message, level: 'info', url: '/modules/hitl' })
    }

url: ‘/modules/hitl’ is underlying and that said url doesn’ exist in type
Notification

How I can alert an agent when the conversation is pause.

Hi @kevin21,

The last version to implement the notification bell, in the bottom tray icons, is 12.8.6:
image

In later versions, you would have to use another mechanism; either read from the notifications table (still using bp.notifications.create), or forgo the notification creation and use a send email action instead, for example.

Feel free to post in the Product Feedback category for any idea to bring back notifications in a better, seamless way that will be viable for HITL users!

Happy building :robot:

So, How can I read the notifications table ?

You can look into the SQL language and its variants for each DBMS to query the database directly. By default, you have a SQLite database in the data/storage folder.

From Botpress, in an action or hook, you may use knex to query the database.