https://discord.gg/botpress logo
Botpress: Should I use user_variables, an external...
# 🤝help
s
I'm building a bot that works like a SaaS product entirely via chat, running 24/7. There's no dashboard — everything happens inside the conversation: from purchase to onboarding, setup, and usage. It's not a temporary chatbot; it's a continuous service. The bot switches between two modes: - A sales mode, where it introduces the product and handles payment; - An assistant mode, where it helps users configure and use the service they've bought. The challenge I'm facing now is user data management. The bot needs to: - Keep track of each user over time (even if they leave and return days later); - Distinguish clearly between prospects and paying users; - Store custom settings per user, unlocking or hiding flows based on what they’ve paid for. - I'm trying to decide how to structure this state and data. I know Botpress offers user_variables, which are useful for session/user context. But considering the long-term nature of the service, I'm wondering if relying solely on them is a mistake — maybe I need an external database for stability and scale. Have you built something similar? How did you approach this kind of persistent architecture? If you've used both user_variables and a database together, how did you decide what goes where? Open to ideas, best practices — or even collaborations if this kind of project resonates with you.
g
user variables arent 100 percent persistant, if the user clears browsing data they will reset. so i recommend using an external data base serverside.
p
User variables are also affected by the browsers used aka same person but on two different browsers will generate two users. I would also recommend using an external service for your project. Happy Bot Building!
w
Hi! There are also bot variables, but you need a custom table with your user data, along with a flow to register and a flow to log in (so you can identify users on any platform). You can do this using the Botpress Table (https://botpress.com/docs/guides/studio/interface/tables) or other database providers, or you can use your own system with an API for CRUD operations