Skip to main content
This article serves as a technical reference for the Voucherify validation rules builder. It describes the rules, limits, and contexts available when configuring validation logic for promo campaigns, loyalty earning rules, and distributions. Use this reference to secure your campaigns from fraud, define specific buying conditions, and control how and when customers can redeem incentives or earn loyalty points.

Glossary

This glossary explains Voucherify terminology and key definitions required to work with validation rules.
Segments group customers based on standard attributes (such as email or postal code) and custom attributes added as metadata.
External actions performed by customers that are tracked and sent to Voucherify using the API.
A rule that defines how and when loyalty points are assigned to a customer’s loyalty card.
A customer becomes the holder of a unique code (for example, a coupon, gift card, referral code, or loyalty card) once it has been assigned to them. Assigned codes are visible in the customer profile under the Wallet tab.
Also known as custom attributes. Metadata allows you to store custom key-value data on Voucherify objects such as customers, orders, redemptions, products, and events. Metadata is commonly used to build validation rules and for reporting.
A redeeming user refers to a team member or affiliate invoking a redemption. Validation rules using redeeming users can restrict which project members are allowed to perform successful redemptions.
A single use of a promo code or an in-cart discount. In loyalty programs, a redemption represents exchanging loyalty points for a reward.
The interface used to create validation rules. The rules builder is available in the campaign manager and in the validation rules section of the Voucherify dashboard.

Rules and limits reference

This section describes the rules and limits available in the campaign manager and the validation rules builder.
Rules and limits depend on the selected context. Some rules are not available for specific campaign types or use cases.
Validation rules can be rearranged using drag and drop. Rules and brackets can be moved freely. After moving a rule, an AND junction is added automatically and rule numbering updates.

Audience

Audience rules define conditions customers must meet to receive or redeem an incentive.
  • Customer segment
    Target or exclude specific customer segments.
  • Customer loyalty tier
    Target or exclude customers based on their loyalty tier.
  • Redemption only by code holder
    Restrict code usage to the customer to whom the code was published.

Products

Product rules define validation based on the structure of the customer’s order. You can further refine these rules using subrules related to order structure or order volume.

Any order item

At least one item in the cart must match the defined criteria.
  • is – specified products or collections must be present in the cart
  • from – the matched products must also belong to a specified collection
You can add subrules such as:
  • Metadata of matched items
  • Subtotal of matched items
  • Quantity of matched items
  • Unit price of a matching order line
  • Item quantity in a matching order line

Every order item

Every item in the cart must match the defined criteria.
  • is – specified products or collections must be present
  • from – matched products must also belong to a specified collection
Available subrules mirror those of Any order item, but conditions must be met by all order line items.

None of the order items

Excludes the cart from validation if specified products or collections are present.

Most expensive item

Defines rules for the most expensive item in the cart or the most expensive item within a specific collection.
  • is – products or collections that must be the most expensive
  • from – collection from which the most expensive item is selected
Available subrules include metadata, subtotal, quantity, unit price, and item quantity.

Cheapest item

Defines rules for the cheapest item in the cart or the cheapest item within a specific collection.
  • is – products or collections that must be the cheapest
  • from – collection from which the cheapest item is selected
Available subrules mirror those of the most expensive item rule.

Prices and quantities

These rules define validation based on order volume and pricing.
  • Total amount
    Required total cart value.
  • Initial amount
    Cart value before discounts are applied.
  • Items quantity
    Required number of products in the cart.
  • Price of each item
    Required price for every product in the cart.
  • Price of any item
    Required price for at least one product in the cart.

Metadata

Metadata rules define validation based on custom attributes.
  • Customer metadata
    Create limits using metadata defined in the customer schema.
  • Order metadata
    Require specific metadata to be present on the order.
  • Custom event metadata
    Require metadata on custom events passed during validation.
  • Redemption metadata
    Require metadata values in the redemption request.

Budget constraints

Budget constraints limit campaign usage and help prevent abuse.
  • Total orders value
  • Total discounted amount
  • Total number of redemptions
  • Total number of redemptions per day
  • Total number of redemptions per month
  • Redemptions per incentive per day
  • Redemptions per incentive per month
  • Redemptions per customer per incentive
  • Redemptions per customer per incentive per day
  • Redemptions per customer per incentive per month
  • Redemptions per customer in a campaign
  • Redemptions per customer in a campaign per day
  • Redemptions per customer in a campaign per month
  • Total redeemed gift amount
  • Maximum pay with points
Once a budget limit is reached, customers can no longer redeem incentives from that campaign.

Redemptions

Redemption rules define technical constraints on how redemptions are executed.
  • Redeeming user
    Restrict which team members or affiliates can invoke redemptions.
  • Redeeming API key
    Restrict redemption requests to specific API keys.
  • Redeeming code holder
    Restrict redemptions to the customer the code was published to.

Context

Context defines the purpose and scope of validation rules.
  • General usage
    Used when rules should apply across multiple campaign types or use cases.
  • Specific contexts
    Restrict available rules to a specific resource, such as redeeming discount codes or earning loyalty points. As a result, some rules are unavailable in certain contexts.