- 26 Feb 2024
- 1 Minute to read
- DarkLight
Customers cannot sign up to the same plan twice
- Updated on 26 Feb 2024
- 1 Minute to read
- DarkLight
This rule is designed to prevent any customer from being signed to the same plan more than once.
For example, you offer a free trial plan and don't want customers to be able to sign up to it more than once on the Members Portal or the Passport app while also preventing admins from doing the same on the Admin Panel.
All you need is the ID of the plan that customers shouldn't be able to sign up to more than once.
Find your plan ID before you get started.
Log in to dashboard.nexudus.com if you aren't already.
Click Settings > Validation rules.
Click Add rule.
Click on Manual entry.
Name your validation rule.
Add a Description for your rule to let other admins know what it does at a glance.
Toggle on This rule is active.
Select Contracts in the Record Type drop-down list.
Add the Error message to display if the validation rule is not met.
Add the following code snippet to the Formula field.
record.Tariff.Id <> 123 OR WasInPlan(record, 123) = false OR userHasAnyRoles = true
- Replace 123 with your plan ID.
Your validation rule should look similar to the example below, with your own plan ID instead of 123456789.
Click the Save Changes button.
All done! We recommend testing your rule by trying to sell the relevant plan to a dummy customer who's already signed up to this plan. If you receive the error message defined in the rule, you're good to go!