How to build validation rules?

There are two ways of building validation rules in Voucherify:

Build a rule while creating a new campaign 

Firstly you need to run the Campaign Manager and choose a campaign type you'd like to create:

Choosing the campaign type

Go through the first two stages of a campaign creation process.

In the third step, you can add validation rules and define what criteria customers and their orders have to meet to make a valid redemption.

How to build a rule?

1. Add a name for your validation rule/set of rules (they will be automatically saved in the Validation Rules Dashboard section).

2. Expand the available rules from the category you're interested in and build a restriction using available operators.

Building a restriction

3. Confirm with ADD. All active rules will be visible on the grey background below each category. 

Already applied validation rules

Build a rule via the Validation Rules Dashboard section

This way of creating rules comes in handy when you want to prepare limits for future campaigns. Go to the Validation Rules section in the dashboard and choose Plus to create a new rule.

Validation rules

Add a name for your new rule/set of rules. The rules builder in this section is the same engine that you use while creating limits in the Campaign Manager. There are six categories of rules to choose from:

Val rules categories

A Friendly Reminder 💡

Visit this article for more information on limits that you can create with the Validation Rules Builder.

In the 1st category, you can choose a customer segment who can/cannot redeem the codes. To build a rule, you need to add an operator is/is not in the first input and choose the desired customer segment from the list of segments in the 2nd input.

Adding a new validation rule

All active rules that you have confirmed are visible in the grey background below the category.

You can save each rule or set of rules and use them later while creating campaigns in the Campaign Manager. 

Choosing existing validation rules

A Friendly Reminder 💡

You can define custom error messages per Validation Rule which are going to be returned via an API when code redemption fails due to the request not meeting validation rule criteria. Additionally, you can specify a fallback error message that will be used when there is no error message defined for the particular rule.

Still need help? Contact Us Contact Us