query count
# 🤝help
v
I’m developing a bot using Botpress, and one of the requirements is that after a user asks two queries, the bot should promote products. How can I implement this logic to automatically trigger product promotions after every two queries? I’d appreciate any guidance you can provide.
f
Hey there, You can use the
After Incoming Message
hook, which can be found on the left side in the studio. You would then create a variable in Botpress, and then add 1 to it in the hook. Then you can use an expression card in your flow to transition the a separate workflow that promotes the desired products. You can also just do it at a specific point in your workflow, up to you 🙂 https://cdn.discordapp.com/attachments/1241344812247027724/1241761562289766441/image.png?ex=664b6013&is=664a0e93&hm=c889e1273f1791d48fa9849bb534a812035340e1563ab8420777319cd6953426&