How to efficiently retrieve user status by phone number using Firebase and Wized for testing new features without disrupting the production domain? Answered
Hey guys! I’ve built a WhatsApp chatbot using Webflow + memberstack. Here’s the current breakdown of the workflow, and the problem I have with the way memberstack allows me to interact with it:
- user signs up via webflow
- Get email + phone in a form
- User sends WhatsApp message
- fetch telephone number of user
- pull all of user base from memberstack once message received by trance of 100 users as api allows me to do
- Check if user phone number is anywhere in database
- Then finally get user status from the database (paid or not)
Reason I do something so inefficient is that I can’t look up with user email as I initially get the phone number only. It was fine until now but my service has passed 2k users, so fetching user status can take several seconds, and sends a ridiculous amount of queries to your api too.
I’m looking for a more efficient way to solve this. Do you have experience with that? Any way to get a way to quickly retrieve the info I need from a specific phone in memberstack api? Would be the easiest. Otherwise I could try to build my own db on the side that matches user email and user phone. I guess I’m not the only one building a WhatsApp bot so was worth asking!
Thanks guys!
Comments
2 comments
Due to Memberstack limitations, if you want to look for something other than email/memberstack_id, you'll have to have a mirrored database on the side for faster read queries just like you suggested 😅
Yep definitely felt like it haha, thanks for the info, will probably implement that!
Please sign in to leave a comment.