How to Build Validation Rules?

This article covers the New Validation Rules Builder and shows how to build validation rules for campaigns.

Contents

  1. General information about validation Rules
  2. Managing validation rules in the Campaign manager
  3. Create validation rules with validation rules manager – alternative

General information about validation rules

Validation rules create limits that must be met to make a successful redemption, earn loyalty points, or trigger a distribution.

Validation rules can be assigned to incentives (discounts, coupons, gift cards, digital rewards, referral codes) and earning rules. 

  • If you assign a validation rule to discounts or campaign codes, it will limit their redemptions. These can be time limitations, publication limitations, or discount amount limitations.
  • If you assign a validation rule to an earning rule in a loyalty campaign, it will define circumstances that trigger the assignment of new loyalty points.

Validation rules and product discounts

For product discounts in the Campaign manager, Voucherify creates a validation rule that includes all discounted products. The validation rule is assigned to the campaign, but you will not be able to remove it in the Campaign manager or in the campaign details. However, you can freely edit the rule to add new conditions or remove old ones.

The Validation Rules and Campaign Limits article includes a complete list of limits and rules in the Validation Rules Builder.

You can access the Validation Rule Builder:

  • In the Campaign manager, which is the primary option for creating validation rules. When a campaign is saved, all the validation rules created will be automatically assigned to it and added to the Validation rules tab in the Campaign Hub section.
  • In the Validation rules tab in the campaign details.
  • In the Validation rule manager, which is in the Validation rule tab in the Campaign Hub section. You can create validation rules for future use there.

Managing validation rules in the Campaign manager

In the campaign manager for a given campaign type, go to the validation rules step. There, you can:
  • Create a new validation rule,
  • Select and optionally edit an existing validation rule,
  • Clone and optionally edit an existing validation rule,
  • View an assigned validation rule by clicking Show rules,
  • Remove an assigned existing validation rule.

The same options are available in the Validation rules tab in campaign details.

When you create a validation rule or edit an existing one, a pop-over window opens, where you can configure the conditions.

You can set up the following:

  • Name – optional; Voucherify creates a default name,
  • Error message – optional; it is a message that will be displayed in an API response if the validation rule is not met,
  • Rules – various conditions that influence the validation.

Select a campaign type you wish to create and move to the validation rules within the campaign creation process. There, you can choose to create a new rule from scratch or use an existing predefined rule from your validation rules section in the dashboard. 

Rules

Click Add rules to Select validation rule. You can use the search field to find a validation rule by name.

The validation rules available in the validation rule builder are divided into the following categories:

When you add a validation rule, you can specify conditions, e.g. "is", "is more than", "after", and many more. You can add several conditions within one validation rule.

Junctions and Brackets

When building more complex scenarios with multiple validation rules, you can use junctions and brackets. 
A junction separates each pair of rules. Click the junction to change it. There are two junctions available:
  • AND – both rules have to be met for the discount to be applied,
  • OR – only one rule has to be met for the discount to be applied.

You can use brackets to group conditions together.

Additional options

You can further configure added rules:
  • Error message – adds a message that is returned to the customer in the API response when a condition for the promotion is not met,
  • Edit rule – opens the pop-over window for the modification of the existing rule,
  • Add subrule – adds a rule within the rule if additional requirements have to be met (subrules are available only for Any order item and Every order item validation rules),
  • Duplicate rule – creates the same rule next to the selected one,
  • Add next rule – adds a new validation rule,
  • Add next brackets – creates brackets after the selected rule,
  • Remove rule – removes the currently selected validation rule,
  • Surround with brackets – creates brackets around the selected validation rule.

Create validation rules with validation rules manager – alternative

Validation rules can also be created in the validation rules manager. The validation rules manager is available in the Campaign Hub -> Validation Rules tab. The process is nearly identical to the one described in the campaign manager section. The only difference is within the first step, where you have to choose the context for your validation rule.
The context defines which rules are available in the next step depending on the type of discount. Creating validation rules in the validation rules manager is advised only for advanced users.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us