How to make subscription teirs

How would i give access to my web app but only to certain areas. For example i have a calendar module which is in the basic subscription and then i have a video calling feature which is only for premium subscribers.

Im sorry if the answer is straight forward but i cant seem to get my head around it and did not see any similar answers in the forum.

You’ll have to set this from the database. What I do is to create an option set for the user levels…I.e(free, basic, premium) for example.
Link this option set to the user datatype.
Then you’d put conditional saying “when this user’s role is free”…something like this.

What I do is to create an option set for the user levels…I.e(free, basic, premium) for example.
Link this option set to the user datatype.
Then you’d put conditional saying “when this user’s role is free”

I’d second this, but to plan for future changes / scaling up, you might also want to add a number value to that option set.

For example, let’s say I have five tiers: Free, Starter, Growth, Team, and Enterprise :wink: There are features that I only want to give to Growth customers and up.

If I just create an option set with the names of the tiers, to create a condition for Growth and up, I’d have to write Current user's Tier is Growth or Current user's Tier is Team or Current user's Tier is Enterprise for each condition. If I want to remove one of those tiers at a later date, I’d need to edit every single condition; if I want to add additional tiers with access to this feature, I’d add that tier to every condition.

If I assign a number field to each entry in that option set, it’s easier to make changes. In this example, let’s say I assign 2 to the Free tier, 4 to the Starter tier, 6 to Growth, 8 to Team, and 10 to Enterprise. Then, instead of the complex condition as above, I can create a condition for Growth and up to be Current user's Tier's number ≥ 6. This allows me to remove tiers without causing errors, and I can add tiers in between based on conditions I’ve written for other features (e.g. I could create a tier between Growth and Team and assign it a ‘7’ without having to rewrite every relevant conditional in my app).

Being able to scale like this is something I’ve found really useful when building apps, so hopefully you will too!

3 Likes

Oh wow!
Learnt something new today…
Thanks so much for this Greg.

Thankyou so much guys amazing information

The approach I use is to have an option set (or data type) of plans.

Each plan has a list of permissions (option set) e.g can create X, can see Y. I use Current User’s plan’s permissions contains (the relevant permission). For numbers e.g can send messages X times, that’s obviously just a number field on the plan.

That gives more flexibility than numbers and more granular permissions per plan (e.g where plans aren’t necessary hierarchal but provide different features all together)

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.