Looking to setup an app that has businesses as the core customer and then their customers also as users.
I’m new to Adalo and couldn’t find anything on this specifically (apologies if there is), so thought I’d ask the question here instead.
Is there a way that you can have the following:
- Users to only see the info for the one business when they login (if so, how do you restrict the others in the database hierarchy?)
- Businesses to be able to send push notifications to only their users, not all the users on the platform
- The possibility of one user having access to multiple businesses listings
Hey there @MLowry, Welcome to the community!
Can do all 3 like so:
Add 2 true/false parameters to your user collection.
1 called “Business Owner”
1 called “Customer”
Set those to check automatically on the signup forms for said users to specify who is a business owner and who is a customer.
Create a collection of “Businesses” with a one-to-many relationship to users where a user can have many businesses but businesses can only be owned by 1 user. Rename the parameter in the user collection to “user businesses”.
Add a many-to-many relationship with users and businesses and rename both of the parameters. In the business collection, rename this new user parameter to “Customers” and then rename the user collection business parameter to “Customer businesses”
On the screen where you want the business owners to see their business, add a list of businesses and set it to “logged-in user > businesses” and set the visibility of this list to only visible when “logged-in user > business owner > is equal to > true”
On the screen where you want to send push notifications, add an input and a button. Set the action on the button to trigger notification to “All Users” and add a filter where “Logged-in user > Businesses > Customer Businesses > All” to send push notifications to only customers of the businesses that are owned by logged-in user.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.