Skip to main content
Validation rules define the conditions that must be met to successfully redeem incentives, earn loyalty points, or trigger distributions in Voucherify. All validation logic is configured in the validation rule builder.
Validation rules – descriptionRead the Validation rules article to learn how each rule works.

Access the validation rule builder

You can open the validation rule builder from:
  • Campaign builder: Create a validation rule while configuring a campaign. A validation rule is then automatically assigned to the campaign.
  • Campaign details: Open an existing campaign and go to the Rules tab. Enable edit mode to create a validation rule or edit an existing one.
  • Validation rules in the Campaign hub: Create reusable rules for future use across campaigns.

Build a validation rule

Follow these steps to create or edit a validation rule. The builder looks slightly different when it’s opened in different places.
1

Name the rule

Name your validation rule.If left unchanged, Voucherify uses the default name.
Builder in Validation rulesWhen creating a validation rule in Validation rules section of the dashboard, you can also select Context.Use Context to prepare a rule for validating a specific resource. Context determines which rule types are available and it’s recommended for advanced use cases.
2

Add rules

Add rules to choose conditions from available categories:
  • Audience: Customer segments, loyalty tiers, or customer metadata.
  • Products: Specific products, SKUs, collections, or prices of items.
  • Prices & quantities: Order value, item quantity, or price thresholds.
  • Budget constraints: Campaign spend restrictions, like total order or discount values, number of redemptions per period or customer.
  • Redemptions: Limits for redeeming users and API keys.
  • Metadata: Limits related to custom attributes covering customer, order, redemption, or custom event metadata.
Some rules also have subrules that can set additional conditions.Edit rule by clicking the three-dot menu.
Context-dependent rulesDepending on the Context defined in the Name the rule step or the dashboard context (campaign builder, earning rule, distribution, and so on), the number and types of rules will vary.
3

Define operators and conditions

For each rule, select operators such as is, is more than, after, and so on.
You can add multiple conditions within a single rule to refine the logic.For example, you can create a rule where the order initial amount is more than $100 and less than $150.
4

Configure junctions and brackets

Combine rules using logical connectors:
  • AND: All rules must be met.
  • OR: At least one rule must be met.
Click the junction to change it.Use brackets to group conditions into complex logic. You can nest rules by dragging them into bracket groups.
5

Set error messages

Add error message to define a custom message returned in the API response when a specific rule is not met.You can also Add fallback error message to the whole validation rule when an error is not specified for a particular rule.
If no validation rule error message and no fallback message are defined, the API response will not include the error object for validation rule violations in some cases.
6

Save

Save your validation rule.
Builder differencesIf you configure validation rules through the Validation rules section in the dashboard, you will have a Summary step where you can Save the validation rule.
The rule is assigned to the campaign once the campaign builder is saved or added to the validation rule list.

Using existing validation rules

In the campaign manager and campaign details, you can:
  • Create a new validation rule
  • Select an existing validation rule
  • Clone and edit an existing rule
  • Remove an assigned validation rule
Changes made to assigned rules are applied immediately.

Validation rules with bundles and product discounts

For bundle campaigns and product discount campaigns, Voucherify automatically creates a validation rule that includes the configuration of the bundle and discounted products.
This auto-generated validation rule cannot be removed from the campaign in the campaign manager or campaign details. You can, however, edit the rule to add or remove conditions.
Validation rules connect to other Voucherify features. Use the resources below to prepare data and apply rules effectively.
Customer segments group customers based on shared attributes or behavior. Use segments in Audience rules to target specific customer groups.Segments update dynamically, so a rule that targets a segment always checks the current membership.
Product collections group products based on attributes or filters. Use collections in Products rules to define required or excluded cart items.Dynamic collections update automatically when products match the defined filters.
Metadata lets you store custom attributes on customers, orders, products, and redemptions. Use metadata in validation rules to create conditions based on any custom data.Define metadata schemas in Project Settings to ensure consistent data types across rules.
Custom events track customer actions sent via API. Use custom event metadata in validation rules for distributions or earning rules.For example, trigger a distribution only when a custom event includes specific metadata.
Validation rules control eligibility for:Each campaign type supports different rule categories based on its context.
Developers can manage validation rules using the Validation Rules API.The API supports creating rules, assigning them to campaigns, and listing all assignments.
Because validation rules often include complicated logic and many rules, it’s recommended to create validation rules through the dashboard to avoid any misconfiguration.
Last modified on February 19, 2026