I'm working on adding a new feature to my chatbot: storing and analyzing the questions users ask.
Currently, I have a table in Botpress called questionTable, which stores user questions in a column named questions using a specific action card called Insert Record.
Now, I want to enhance this functionality with two main goals:
1. Log each unique user question in the questions column.
If the same question has already been recorded, instead of duplicating it, I want to increment a counter that tracks how often that question is asked.
2. Add an additional column to the table (either a computed column or an equivalent dynamic solution in Botpress) to record the frequency of each question in an integer column called frequency.
I would like some advice I don't know the best way to implement this feature.
https://cdn.discordapp.com/attachments/1394833453907705967/1394833454167756840/3.png?ex=68783f62&is=6876ede2&hm=b9e1f34c61ccd9bac69ffb71f2e5b2493925c218705ee61666294863ee954cf2&