Regulating the use of a chatbot
# 🤝help
m
Hi, I would like to know if it is possible to limit the number of interactions per week for a chatbot?
a
Depends on how u wanna go about it, there is no inbuilt method yet. Personally, I try to limit every phone number with 10 queries per day. So first I store user phone number input in a table. I let them ask first question .then when they say they have more questions, I increment a table value called query count by 1 that's associated with their phone number in same table. This way when the query count reaches 10, the bot is programmed to say sorry query count reached.
Next time same user enters the same phone number, it checks the table for query count. If it is already 10, it will say the same message, query count reached
And I added a trigger that clears the query count values at the end of every day
. But that's still a very lacking method. I have no way to confirm if the user simply decides to enter a random phone number
Maybe u can add 2 step verification with OTP using botpress integration. That might make it more solid
h
hey, if you are using WhatsApp you can use their number in {{ event.tags.conversation['whatsapp:userPhone'] }} Users can't really change this You can even just check extract this yourself and use it without asking the user to enter their number
a
Yeah makes sense. I haven't done any integrations other than webchat yet. I'll keep that in mind. Thanks
f
@hundreds-battery-97158 @astonishing-napkin-74260 good answers 🙂
@mammoth-tailor-5827 What do you think?
2 Views