Having trouble with the database (Please Help)

I’m going to get straight to it. I would really appreciate the help. My app has 2 user types: general customers who can shop on the platform, and brands that can put up listings. basically a market place.

I’m not sure how to differentiate between these 2 user types. So brands are in a different data type and customers are in a separate one so that they are not mixed together, if that makes sense.

This way, I can have a custom user interface set up for customers; for example, if a customer logs in, they will have the shopping cart and other features customers have on marketing apps, etc. And so brands have their own user interface. Like having a dashboard to view their sales, uploading listings, etc.

If I had both of these user types in the same datatype mixed together, it would be very messy, and I’m not sure how to make these different UI’s applicable to these 2 user types if they are in the same datatype.

For more context, I will provide some screenshots to make it more clear.
In this screen shot I created the sign up form, one for general customers to sign up on and the other for brands to sign up on:

And regardless of the user type, all users show up in the all users data type:

And I need them to be separated.

I would greatly appreciate it if someone walked me through it or referred me to a topic that already goes over this.

You focus too much on the user datatype. User will need to login into your app and in Bubble this authentication is done using user DB.
To differentiate them, you have two options, and it’s all based on the type of login. You should have a different login for customer VS brands. At this moment, you will set a field “type” in user DB to know which type is this user and you can redirect them to a different page according to the type.
You could also instead of setting type, create another DB “customer” or “brands” related to the current user depending of the type they are. And according to this, you can redirect them to a different page dashboard.

Very helpful, thanks! If your still around today ill reply with any questions I may pick up along the way if that’s alright.

When you mention creating a new database, as I have, if you look at the second screenshot, you can see users and brands. When I go to sign the user up in the workflows, it automatically signs them up into the users DB, even if they use the Brands sign-up. Is there a way to direct this data?

No. User signup will always create user item. Create a brand if this is for brand item and create customer item if this is customer direvtly after signup workflow. In login wf look if current user have a brand or a customer item to redirect them to the correct dashboard.

Okay, that makes sense. I thought that was what you meant, but I wanted to make sure. Thanks again!

1 Like