Validation Rules and Campaign Limits

This article covers all rules and limits that you can create in your promo campaigns. You'll learn how to secure your campaigns from fraud, crate specific buying circumstances that limit code usage and define criteria for earning loyalty points. 
This tutorial is divided into three parts:
  1. In the first part, the glossary explains Voucherify terminology and key definitions you need to know to create campaign rules easily. 
  2. The second part, Rules and limits reference, describes rules and limits that you can create depending on the chosen campaign type.
  3. The last part shows how to use the Rules Builder and other functionalities in your dashboard to create described campaign limits.

Contents

  1. Glossary
  2. Rules and limits reference:
    1. Limits for discounts and gift cards
    2. Limits for loyalty campaigns
    3. Limits for referral programs
  3. Create validation rules:
    1. Rules Builder overview
    2. Discounted and excluded products
    3. Redemption limits
    4. Custom validation rules with metadata
  4. Create time-related limits
  5. Create publication-related limits
  6. Add discount amount limit
  7. Create limits for earning loyalty points

Glossary

Glossary explains Voucherify terminology and key definitions you need to know to create campaign rules easily.

Campaign Manager

All campaigns and promotions are created in the Campaign Manager. You can open the Campaign Manager by clicking the plus in the Campaigns and Vouchers dashboard sections.

Rules Builder

Rules Builder creates validation rules. You can open the Builder in the Validation rules section in your dashboard. Rules Builder is also built in the Campaign Manager, so you can create validation rules when creating a new campaign. 

Validation rules

Validation rules are limits and rules created in Rules Builder and attached to codes or loyalty earning rules. Validation rules attached to codes and promotions are checked during the redemption. 

Validation Rules Context

The context in the Rules Builder defines the purpose and usage of created validation rules. Rules Builder shows you different rules dependently on the chosen context. For example, there are other limits for earning loyalty points and other for code redemptions. You'll also see different rules depending on whether you choose to apply a discount to the order or particular items. 

Amount Limit

Amount limit defines the maximum discount amount that a customer can get with a single redemption of a percentage discount. If you choose to apply the discount to the whole order, the amount limit also refers to the maximum discount per order. If you decide to apply the discount to particular items, the amount limit is set per discounted item.

Publication

The publication is an action of assigning a unique code (coupon, gift card, referral code, loyalty card) to a particular customer. 

Holder of the code

The customer is a holder of a unique code once it was published to him/her. You can see all published codes in the customer profile.

Redemption

Redemption is a single usage of a promo code or an in-cart discount. In loyalty programs, redemption is equal to exchanging loyalty points for a reward.

Customer segment

Segments group customers based on standard attributes (email, postal code, and many more) and custom attributes added as metadata. You can also use custom events and system attributes to create segment criteria. Segments are used in validation rules and distributions to define the campaign/distribution audience. 

Earning rules

Earning rule defines an action(s) that assigns a particular number of loyalty points to a customer's loyalty card. There is no limit on the number of earning rules in a single loyalty campaign.

Metadata

Metadata enables you to add custom data to Voucherify. You can use metadata for building validation rules and reporting/tracking. Each metadata attribute is a key/value pair that carries custom information about Voucherify objects (like redemption, customer, product, and many more).

Custom event

Custom events are actions taken by your customers that you track in your application or website and pass to Voucherify using our API.

Conversion event

A conversion event is a part of the referral workflow that defines when a new customer is counted as referred. You can choose between referral code redemption or a custom event. If you choose redemption, a new customer will be converted to referred once s/he successfully redeems the referral code. If you choose a custom event, a new customer will be marked as referred once Voucherify API gets a custom event linked to the customer and the referral code. 

Redeeming user

User in validation rules and our pricing refers to your team members. Setting up the Redeeming user in validation rules enables you to limit the rights of your project members to invoke successful redemptions. 


Rules and limits reference

In the reference below, you can see what limits you can attach to a particular campaign type by using the Rules Builder (validation rules), the Campaign Manager, and other functionalities in your dashboard. We're starting from limits you can attach to gift cards and discounts (coupons, cart-level promotions).

How to read the reference?

Validation rule created in the Rules Builder
Rule created in the Campaign Manager > Program details
Rule created in the Campaign Manager > Time frame
Rule created in the Campaign Manager > Discount value
Customizable rule built with metadata (custom attributes)

Campaign-related rule, not available for standalone codes (standalone code is a single code, this rule refers to bulk codes, i.e., a batch of unique codes grouped in a campaign)

Limits for discounts and gift cards

 
Name of the rule

    Description

    Example

Discounted & Excluded products
validation rules
You can select products and product collections that will be discounted. You can also define products/product collections that will be excluded from getting a discount. 10% discount is applied to items from product collection X, excluding SKU XYZ from this collection.

AUDIENCE
validation rules

Customer segment
Target and/or exclude specific customer segments. You can limit redemptions to specific customer segments and/or exclude particular segments from redeeming discounts/gift cards.
Redemption is available if a customer enters a segment "Regular Customers" and redemption is not available for customers from the "New customers" segment.




Customer metadata satisfy
Create a redemption limit based on custom attributes called metadata added previously to the Customers schema. Metadata enables you to extend customers' characteristics with new attributes and use them to build campaign limits. Only customers with metadata  revenue and its value above 2000 are eligible for a discount/ gift card redemption.

ORDER STRUCTURE
validation rules











  Every order item

Click  Add to open Filters Editor that defines criteria that EVERY item in the customer's cart needs to match (based on metadata and standard product attributes). On top of set filters, you can also define:

  • Subtotal of matched items – the total amount of all items that meet criteria set with product filters.
  • Quantity of matched items – the total count of all items that meet criteria set with product filters.
  • Items quantity in each matching order line – this rule defines the required quantity in every order line.
  • Unit price of each matching order line – this rule defines the required price of every order line.
  • Metadata of matched items - builds limits using order items metadata that need to be met by every order line item.
  • Customer gets 100 loyalty points if all items in the cart have metadata collection is premium.
  • Order total amount is always $30 if a customer has 3 items from the product collection SALE in the cart.
  • The quantity of every order line item is more than 1.
  • The price of every order line item is more than $50.










Any order item Click  Add to open Filters Editor that defines criteria that ANY item in the customer's cart needs to match (based on metadata and standard product attributes). On top of set filters, you can also define:
  • Subtotal of matched items – the total amount of all items that meet criteria set with product filters.
  • Quantity of matched items – the total count of all items that meet criteria set with product filters.
  • Items quantity in any matching order line  – this rule defines the required quantity of at least one matching order line.
  • Unit price of any matching order line – this rule defines the price of at least one matching order line.
  • Metadata of matched items - builds limits using order items metadata that need to be met by at least one order line item.
  • Customer gets 100 loyalty points if at least one item in the cart has metadata collection is premium.
  • A 20% bundle discount can be redeemed if at least 2 items in the order are from the SALE category (metadata category).
  • The quantity of at least one item from collection X has to be more than 3.
  • The price of at least one item from collection X has to be more than $50.



 None of the order items This rule defines criteria for products that exclude the cart from redemption or earning loyalty points.
  • Gift cards from campaign X can't be redeemed if any of the items in the cart has metadata collection is premium.
  • An auto-applied discount can't be redeemed if the price of any of the items in the cart is less than $50.



  Order metadata satisfy This rule defines what metadata (custom attributes) need to be assigned to the customer's order.
  • Voucher can be redeemed only if metadata Shipping_postal_code is 43-000.
  • Customer gets 50 loyalty points if the order total amount is more than $100 and metadata shipped is true.

ORDER VOLUME
validation rules

Total amount You can define a value of the cart that enables them to use the code. Discount applies only if the total order amount is more than $50.
Items quantity You can select the required quantity of products that need to be in the cart. Discount applies only if a customer bought at least 5 products at once.
    Price of each item You can set a price for each product from the cart. Discount applies only if the price of every item in the cart is more than $50.
    Price of any item This rule defines a price required for at least one product from the cart. If the cart contains at least one product for more than $100, the code can be redeemed.

BUDGET CONSTRAINTS
validation rules


Total discounted amount
It defines the overall value of the discount that your customers can get by redeeming codes from a particular campaign. The total value of applied discounts from campaign X has to be less than $10 000.

Total orders value You can define the value of all orders made within the campaign. When this limit is reached, customers can't redeem more codes. The value of all orders made within the campaign Y cannot be more than $20 000. 

Total number of redemptions It is the total number of redemptions allowed per entire campaign (the sum of all redemptions made with unique codes from the campaign).  Customers can redeem codes from a campaign 3 000 times. 


Total redeemed gift amount  Refers to the total value of the redeemed balance in the whole  campaign. Customers can spend $10 000 of the balance from a gift card campaign.
    Redemptions per customer per code It defines the total number of redemptions counted per customer per single discount/gift card.
Customers can make only one redemption of each unique code.


 Redemptions per customer in a campaign It defines the total number of redemptions counted per customer per campaign.
Customers can make only 1 redemption by using codes from campaign X. It means that once a customer redeems a code, s/he can't redeem another one from this campaign.

Redemptions per customer per code per day
It defines the daily limit of redemptions that a particular customer can make using the same discount/gift card code.
Customer can redeem their unique code only once per day.

ADVANCED
validation rules


Redemption metadata satisfy This rule defines what metadata (custom attributes) need to be assigned to the redemption request. Redemption must include metadata payment method set to Credit card to succeed.
Redeeming user With this  rule, you can manage your team and define which team members or affiliates can/cannot invoke a coupon redemption.
User X can't invoke redemptions from campaign Y.
Redeeming API key This attribute allows you to limit access to invoking successful redemptions to particular API keys. 

Only for customers who are holders of the code By using this rule, you ensure that a code is redeemed by the same person it was published to.  Each birthday coupon from campaign X can be redeemed only by its holder.


CAMPAIGN MANAGER
rules and limits

Code redemption limit It defines how many times a single discount/gift card can be redeemed. Standalone code WEEKEND20 can be redeemed 1000 times.

Customers will be allowed to join campaign only once This campaign mode ensures that each customer can have only one code from the campaign published (assigned) to his/her profile. Each customer can get only one code from the "Welcome" campaign.
Start date Start date defines date time when the discounts/gift cards start to be active. Promotion starts 29.12.2023 at 12:00 PM.
End date End date defines code expiration date. After the end date, the discounts/gift cards can't be redeemed. Code expires 29.12.2023 at 12:00 AM.
Valid in this timeframe only Validity timeframe lets you set recurring time frames when the discounts/gift cards are active (can be redeemed).  Discount code is valid every day between 9:00 AM and 12:00 PM.
Valid on particular days only You can define specific day(s) of the week when discounts/gift cards can be redeemed. 25% off everything only on Mondays.
Keep valid for specific amount of time after publishing This limit sets a dynamic expiration date, the code can be redeemed for a limited period of time after it was published (assigned) to the customer. Customer gets an automatic message with a birthday discount and has 24 hours to redeem the code.
Amount Limit Amount limit defines the maximum discount amount that a customer can get when redeeming a percentage discount. Amount limit is set per order or per discounted item. When redeeming a 10% discount code with the Amount Limit set to $30, a customer with a $400 order gets a $30 discount.

Limits for loyalty campaigns

In loyalty programs, you can create limits on the following levels:

  1. Campaign-level limits refer to every loyalty card created within the campaign (set in the Campaign Manager > Program details).
  2. Validation rules let you define specific earning rules (earning rules define how your customers can collect points, set in the Campaign Manager > Earning rules).
  3. Validation rules assigned to digital rewards limit and secure their redemptions (discounts, gift cards).

The first two groups are set when creating a loyalty campaign and are described in the reference below. To learn about validation rules that you can assign to loyalty rewards (discounts, gift cards), see the Limits for discounts and gift cards.

How to read the reference?

Validation rule created in the Rules Builder (Campaign Manager > Earning rules)
Rule created in the Campaign Manager > Program details
Customizable rule built with metadata (custom attributes)

 Name of the rule

    Description

    Example

CAMPAIGN MANAGER
rules and limits


    Customers will be allowed to join campaign only once
This campaign mode ensures that each customer can have only one loyalty card from the campaign published (assigned) to his/her profile. Each customer can have only one loyalty card from campaign X assigned to their profile.

    New customers will auto-join campaign once any earning rule is fulfilled 
This campaign mode ensures that customers get loyalty cards automatically published to their profiles when at least one earning rule is met. With earning rule "Make an order for more than $200, get 200 points," every customer who makes an order with a total > $200 automatically gets a loyalty card and a predefined number of points.
Start date Start date defines date time when the loyalty cards start to be active.
Loyalty campaign starts 29.12.2023 at 12:00 PM
End date End date defines the expiration date of loyalty cards. After the end date, the loyalty card can't be redeemed, and new loyalty points aren't added to the card.
Loyalty cards expire 29.12.2023 at 12:00 AM.
Valid in this timeframe only Validity timeframe defines recurring time frames when the loyalty cards are active (can be redeemed). 
Loyalty cards are valid every day between 9:00 AM and 12:00 PM.

Valid on particular days only You can define specific day(s) of the week when loyalty cards can be redeemed.
Loyalty cards are valid from Monday to Friday.
Keep valid for specific amount of time after publishing This limit sets a dynamic expiration date, loyalty cards are active for a limited period of time after they were published (assigned) to customers.
Customer gets an automatic message with a loyalty card and has 365 days to collect and redeem points.


AUDIENCE
validation rules

Customer segment
You can limit earning rules to specific customer segments. Therefore, only if a customer matches all earning rule limits, the points are triggered. 
Order paid earning rule gives 200 loyalty points to customers from the "Regular" segment.




Customer metadata satisfy
You can limit earning rules to customers with particular metadata assigned. Therefore, only if a customer matches all earning rule limits, the points are triggered.  Order paid earning rule gives customers with metadata subscribed is true 100 loyalty points.

ORDER STRUCTURE
validation rules












  Every order item matches Click   Add to open Filters Editor that defines criteria that EVERY item in the customer's cart needs to match (based on metadata and standard product attributes). On top of set filters, you can also define:
  • Subtotal of matched items – the total amount of all items that meet criteria set with product filters.
  • Quantity of matched items – the total count of all items that meet criteria set with product filters.
  • Items quantity in each matching order line – this rule defines the required quantity in every order line.
  • Unit price of each matching order line – this rule defines the required price of every order line.
  • Metadata of matched items - builds limits using order items metadata that need to be met by every order line item.
  • Customer gets 100 loyalty points if all items in the cart have metadata collection is premium.
  • Customer gets 300 loyalty points if he/she has 3 items from the product collection SALE in the cart
  • The quantity of every item in the cart has to be more than 3 to fulfil the earning rule and get 2 points for each $1 spent.
  • The price of every item in the cart has to be more than $50 to fulfil the earning rule and get 1 point for each $1 spent.











   Any order items matches Click  Add to open Filters Editor that defines criteria that ANY item in the customer's cart needs to match (based on metadata and standard product attributes). On top of set filters, you can also define:
  • Subtotal of matched items – the total amount of all items that meet criteria set with product filters.
  • Quantity of matched items – the total count of all items that meet criteria set with product filters.
  • Items quantity in any matching order line  – this rule defines the required quantity of at least one matching order line.
  • Unit price of any matching order line – this rule defines the price of at least one matching order line.
  • Metadata of matched items - builds limits using order items metadata that need to be met by at least one order line item.
  • Customer gets 100 loyalty points if at least one item in the cart has metadata collection is premium.
  • Customer gets 50 loyalty points if at least 2 items in the customer's order are from the SALE category (metadata category).
  • The quantity of at least one item in the cart has to be more than 3 to fulfil the earning rule and get 1 point for each $1 spent.
  • The price of at least one item in the cart has to be more than $50 to fulfil the earning rule and get 1 point for each $1 spent.


   None of the order items This rule defines criteria for products that exclude the cart from earning loyalty points.
  • Order paid earning rule gives customers 200 loyalty points only if any of the items in the cart has metadata collection is premium.


  Order metadata satisfy This rule defines what metadata (custom attributes) need to be assigned to the customer's order.
  • Order paid earning rule gives customers 200 loyalty points only if metadata Shipping_postal_code starts with 43-.

ORDER VOLUME
validation rules

Total amount You can define a value of the cart that enables them to use the code. Order paid earning rule gives customers 200 loyalty points only if the total order amount is more than $50.
Items quantity You can select a required quantity of products that need to be in a customer's cart. Order paid earning rule gives customers 200 loyalty points only if a customer bought at least 5 products at once.
 Price of each item You can set a price for each product from the cart. Order paid earning rule gives customers 200 loyalty points only if the price of every item in a cart is more than $50.
Price of any item This rule defines a price required for at least one product from a customer's cart. Order paid earning rule gives customers 200 loyalty points only if the cart contains at least one product for more than $100.

Limits for referral programs

When creating referral programs, the Campaign Manager lets you set optional limits at every stage of the referral workflow. You can use the following features:

  1. Campaign-level limits refer to every referral code created within the campaign (set in the Campaign Manager > Program size).
  2. Validation rules limit referral code redemptions (set in the Campaign Manager > Referee reward).
  3. Customer segments built with standard and custom filters define additional criteria for referrers. (set in the Campaign Manager > Referrer rewards).
  4. Validation rules assigned to digital rewards limit and secure their redemptions (discounts, gift cards).

The first three groups are set when creating a referral campaign and are described in the reference below. To learn about validation rules you can assign to referrer rewards (discounts, gift cards), see the Limits for discounts and gift cards.

How to read the reference?

Validation rule created in the Rules Builder
Rule created in the Campaign Manager > Program size
Rule created in the Campaign Manager > Timeframe
Rule created in the Campaign Manager > Referrer rewards
Customizable rule built with metadata (custom attributes)

 Name of the rule

    Description

    Example

CAMPAIGN MANAGER
rules and limits

Code redemption limit It defines how many times a single unique code/standalone code/discount can be redeemed. Each referral code can be redeemed 100 times.
Customers will be allowed to join campaign only once This campaign mode ensures that each customer can have only one referral code from the campaign published (assigned) to his/her profile.
Each customer can get only one code from the "Welcome" referral campaign.
Start date Start date defines date time when the referral codes start to be active.
Referral campaign starts 29.12.2023 at 12:00 PM
End date End date defines expiration date of referral codes. After the end date, the discounts/gift cards can't be redeemed.
Referral codes expire 29.12.2023 at 12:00 PM.
Valid in this timeframe only Validity timeframe lets you set recurring time frames when the referral codes are active (can be redeemed). 
Referral codes are valid every day between 9:00 AM and 12:00 PM.




Valid on particular days only Define specific day(s) of the week when referral codes can be redeemed.
Referral codes can be redeemed from Monday to Friday.
Keep valid for specific amount of time after publishing This limit sets a dynamic expiration date, referral codes can be redeemed for a limited time after they were published (assigned) to the customer.
Customer gets an automatic message with a referral code and has 120 days to invite friends.

Discounted & Excluded products
validation rules
You can select products and product collections that will be discounted when redeeming referral codes. You can also define products/product collections that will be excluded from getting a discount. Referral codes give a 10% discount to new customers, the discount is applied to all items, excluding products with metadata category is exclusive

AUDIENCE
validation rules

Customer segment
Target and/or exclude specific customer segments. You can limit redemptions to specific customer segments and/or exclude particular segments from redeeming discounts/gift cards.
Redemption of referral code is available if a customer enters a segment "New users," and redemption is not available for customers from the "Subscribed users" segment.




Customer metadata satisfy
Create a redemption limit based on custom attributes called metadata. Metadata enables you to extend customers' characteristics with new attributes and use them to limit referral code redemptions. Only customers with metadata " subscribed: true" can redeem referral codes.

ORDER STRUCTURE
validation rules

 Every order item Click Add to open Filters Editor that defines criteria that EVERY item in the customer's cart needs to match (based on metadata and standard product attributes). On top of set filters, you can also define:
  • Subtotal of matched items – the total amount of all items that meet criteria set with product filters.
  • Quantity of matched items – the total count of all items that meet criteria set with product filters.
  • Items quantity in each matching order line – this rule defines the required quantity in every order line.
  • Unit price of each matching order line – this rule defines the required price of every order line.
  • Metadata of matched items - builds limits using order items metadata that need to be met by every order line item.
  • Referral code gives a 10% discount if all items in the cart have metadata collection is premium.
  • Referral code can be redeemed only if the order consists of 3 or more items from the product collection X.
   Any order item Click  Add to open Filters Editor that defines criteria that ANY item in the customer's cart needs to match (based on metadata and standard product attributes). On top of set filters, you can also define:
  • Subtotal of matched items – the total amount of all items that meet criteria set with product filters.
  • Quantity of matched items – the total count of all items that meet criteria set with product filters.
  • Items quantity in each matching order line – this rule defines the required quantity in at least one matching order line.
  • Unit price of each matching order line – this rule defines the required price of at least one matching order line.
  • Metadata of matched items - builds limits using order items metadata that need to be met by at least one order line item.
  • Referral code redemption gives a $20 discount if at least one item in the cart has metadata collection is premium.
 None of the order items matches This rule defines criteria for products that exclude the cart from redemption or earning loyalty points.

Referral code redemption gives a 10% discount if at least one item in the cart has metadata  collection is premium.




  Order metadata satisfy This rule defines what metadata (custom attributes) need to be assigned to the customer's order.
Referral code redemption gives a $5 discount if at least one item in the cart has metadata  collection is premium.

ORDER VOLUME
validation rules

Total amount You can define the cart value that enables them to use the code. Referral code redemption gives a 15% discount only if the total order amount is more than $50.
Items quantity You can select the required quantity of products that need to be in the cart. Referral code redemption gives a $5 discount only if a customer bought at least 5 products at once.
Price of each item You can set a price for each product from a customer's cart. Referral code redemption gives a $5 discount only if the price of every item in a cart is more than $50.
Price of any item This rule defines a price required for at least one product from a customer's cart. If a customer's cart contains at least one product for more than $100, the referral code can be redeemed.

BUDGET CONSTRAINTS
validation rules

Total discounted amount
It defines the overall value of the discount that your customers can get by redeeming codes from a particular campaign. The total value of the discount applied with referral codes from referral program X has to be less than $10 000.
Total orders value You can define the value of all orders made within the campaign. When this limit is reached, customers can't redeem more codes.
The value of all orders made within the referral campaign cannot be more than $100 000. 
Total number of redemptions It is the total number of redemptions allowed per entire campaign (the sum of all redemptions made with unique codes from the campaign). 
Customers can redeem referral codes from a campaign 10 000 times. 
Total redeemed gift amount  When referral codes are gift cards, this limit lets you set the total value of the redeemed referral codes balance (redeemed by using all referral codes).
Customers can spend $10 000 of the balance loaded on referral codes (if referral codes are gift cards).

Redemptions per customer per code It defines the total number of redemptions counted per customer per single referral code.
Customer can make only one redemption of each referral code.
Redemptions per customer in a campaign It defines the total number of redemptions counted per customer per referral campaign. Default limit set to 1 – each new customer can make only one redemption in the referral program (one redemption per customer per all referral codes).


Redemptions per customer per code per day It defines the daily limit of redemptions that a particular customer can make using the same referral code. Customer can redeem a single referral code only once per day.

ADVANCED
validation rules


Redemption metadata satisfy This rule defines what metadata (custom attributes) need to be assigned to redemption requests. Redemption of referral code must include metadata payment method set to Credit card to succeed.
Redeeming user With this  rule, you can manage your team and define which team members or affiliates can/cannot invoke a coupon redemption.
User X can't invoke successful redemption of code from referral campaign Y.
Redeeming API key This attribute allows you to limit access to invoking successful redemptions to particular API keys. 


Create validation rules

In this section, you'll see how to use Rules Builder and create validation rules. There are two ways you can access the Rules Builder and create validation rules:

  • The dedicated Validation Rules section in the dashboard lets you prepare rules for future use.
  • When creating/editing campaigns in the Campaign Manager, you can create validation rules and assign them to the campaign right away.

To open the Builder in the Validation Rules section, click the plus.

Step 1: Name the rules

Add a name for your validation rule/set of rules. They will be automatically saved in the dashboard.

Step 2: Choose between basic and advanced Builder

The Builder has two modes: basic and advanced. Choose the basic Builder to see a shortcut to the most common rules and create popular limits. Choose the advanced Builder to see all possible validation rules you can create.

In the Campaign Manager, you'll see the basic Builder by default. You can switch to the advanced mode to see all available rules.

Step 3: Define the context

Validation rules context defines the purpose of validation rules and their future usage. If you want to use the rules in more than one context or campaign type, choose General Usage.

In the Campaign Manager, you don't need to set up the context. It is set accordingly to the created campaign type.

Step 4: Create validation rules

Next, define validation rules. There are two components to create rules:

  1. The first lets you select which items the discount or gift card can be applied to and which items the discount/gift card can't be applied to. Read more.
  2. The second component enables you to create limits that need to be met to make a successful redemption or earn loyalty points. Read more.

Select discounted (included) and excluded products

Selecting discounted or excluded items doesn't define required cart items, but defines which items the discount or gift card will be applied to if all validation rules are met.

How to define discounted (included) items?

First, you can choose between Discount Each or Discount Selected. If you choose to discount each, a discount or gift card will be applied to every order line item in the cart, except for the items defined in excluded products. 

If you chose selected, click  Add products to define items which discount will be applied to. 
You'll see a Filters Builder that enables you to define discounted items in three ways: 
  1. Select existing products from your list. 
  2. Create a products collection(s) that defines what criteria items have to match to qualify for a discount. 
  3. Choose from existing product collection(s).

Select products from your list

Select discounted items from products previously added to your account.

Confirm with  Select products.


Create a dynamic collection with filters

Follow this tutorial to learn how to create product filters and collections.

Create criteria for discounted items by using filters and assign them to a dynamic collection. As a result, each item from the cart will be validated against collection rules. If it matches the collection criteria, the discount will be applied to the item. In this case, products don't have to be added to your account to be validated and discounted. 

Step 1: Define criteria for discounted products

Click  Find and apply filters.

Choose one of the standard product attributes or switch to Custom attributes to create filters with metadata.

Create criteria for discounted products using available operators. Click the plus to add the filter.

Confirm added filters with Apply.

Note that you can combine many standard and custom filters in one product collection. Using OR/AND you can define if an item needs to match all added filters or only one of them.

Choose Apply when all filters are set. 

Step 2: Assign filters to a new dynamic collection

Click Create dynamic collection to assign the filters to a new product collection. 

Provide the collection name and confirm with Save. You can select more than one product collection that defines the criteria for discounted products. When you add all needed collections, confirm with Select collection(s). As a result, only items that match the criteria of the selected collection will be discounted. 


Select existing product collections

If you prepared collections beforehand, you can use them when defining discounted or excluded items. Next to selecting particular items, you can also choose to discount existing product collections:

  • Switch to collections view (1).
  • Select the collection from the list (2). 
  • Confirm with Add (3), note that you can add more than one collection to discounted products.
  • When ready, confirm with Select collection(s) (4).

Likewise, you can use the same methods to define excluded products. As a result, the discount won't be applied to the selected items.

Important notes
  • If you choose to discount a product collection and add one of its items to excluded products, the discount will be applied only to collection items that are not selected in excluded products.
  • If the rules will try to force both applying the discount and excluding the same product, the discount won't be applied to this item (it'll be excluded during the redemption). The excluded products rule has priority over included products rule.
  • Adding product to the static collection equals adding all product SKUs to the static collection. When it comes to the dynamic collections, if the product matches collection filters, only the product enters the collection, SKUs are validated against filters and need to match them to enter the dynamic collection.

Validation rules limiting redemptions

Validation rules that you can create below the discounted/excluded items can be assigned to incentives (discounts, coupons, gift cards, digital rewards, referral codes), and earning rules. If you attach validation rules to discounts or campaign codes, they will limit their redemptions. If you assign validation rules to the earning rules in your loyalty campaign, they will define circumstances that trigger the assignment of new loyalty points. You can create limits for redemptions and earning rules using the basic or advanced Builder.

Basic rules builder

Choose a rules category and define the limit by using available conditions.

Here's a list of basic rules related to:

  1. Customer activity that enables you to target specific customer segments and/or exclude particular segments from your promotion.
  2. Attributes match – order, products, and redemption metadata. In this section, you can build limits based on custom metadata attributes. Please note that you should define these attributes in the metadata schema first. Click here to learn more.
  3. Budget rules that set the limits described in the reference under BUDGET CONSTRAINS.
  4. Order-related rules that model required cart structure and volume.

Advanced rules builder

Define the logic between rules (1). Additionally, you can specify a fallback error message that will be used when there is no error message defined for the particular rule (2).

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

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

Step 5: Confirm and save rules

When rules are added, click  Save to confirm. Saved rules will be visible in the main list in the Validation Rules. 

You can edit or remove created validation rules, but note that deleting the rules won't be possible as long as they're attached to any of your existing campaigns or rewards. 


Custom validation rules with metadata

Metadata enables you to add custom attributes to your Voucherify project. Metadata added to products, order line items, customers, orders, and redemptions can be used when creating validation rules. Supporting many metadata types and validation operators gives you flexibility in creating custom limits and rules which aren't available out-of-the-box. 

Before you start

All metadata attributes that you use in validation rules, should be added to your Project settings > Metadata schema first. Read more.

To create a custom limit with metadata follow the steps below:

  1. Add new metadata definition to the respective metadata schema. Read more.
  2. Open advanced Rules Builder in the Validation Rules menu or in the Campaign Manager.
  3. Expand the rules from a chosen category, build the rule with metadata and available conditions.
  4. Confirm with Add.

Take a look at the examples below to see popular validation rules with metadata.

Product metadata

Product metadata in the Rules Builder has two goals:

  1. You can define custom product attributes that qualify or disqualify a product from applying the discount or gift card. Go here for the detailed instructions.
  2. You can also define the required cart structure. It comes down to defining what custom attributes products in a customer's cart need to have or can't have to redeem the code/ earn loyalty points. On top of added metadata, you can set additional criteria for matching items like items count, and subtotal.

Create order structure validation rules with metadata

Step 1: Go to the Rules Builder and expand Order structure validation rules. 

Step 2: Decide if the metadata has to be attached to every, any, or none of the order line items. Mark the respective checkbox.

Step 3: Click Add to build filter(s) with metadata added previously to metadata schema.

Step 4: When creating filters, you can combine many metadata and standard product attributes. After you add all filters, click Create dynamic collection. The collection will save added filters to validate each product/SKU coming with requests. Only items that meet collection criteria will join the collection list. 

Here's the instruction on how to build product filters with metadata.

Step 5: If you chose Every or any order item matches, you can also define the quantity and subtotal of matching items. 

You can also define the required price and quantity of every/any matching order line. Please note that for ANY order item rules, each sub-rule can be matched by a different order line item. 

Important note

"AND" means that both rules need to be met. "AND" doesn't mean both rules need to be met by the same order line. If each rule will be met by a different order line item, validation will succeed.

Rules examples

  • Every item in the cart needs to have metadata category is spring_sale and metadata vendor Levi's or Guess
  • At least one item in the cart needs to have a metadata category is new_in_stock and the subtotal of matched items needs to be more than $100.
  • None of the items in the cart can have a metadata category is premium

Order item metadata

Each order line item can have its metadata attributes on top of which you can create validation rules. To create rules with order line item metadata, follow the steps below:

  1. Expand Order structure rules
  2. Mark Any order item if at least one order line item needs to match metadata rules or Every order item if all order line items need to match metadata rules. 
  3. Click Add to choose a product collection. In this step, you can narrow down the list of items that will be checked against metadata rules. If you don't want to set additional filters, choose a predefined collection called All Products that gathers all order items.
  4. Choose Metadata of matched items and define validation rule with metadata attribute. Remember that all metadata used in validation rules should be added to the respective schema first. 

Customer metadata satisfy

Go to Validation rules > Audience.

You can use attributes added to the Customer schema to create custom rules not available out-of-the-box. Using metadata-based segments or single attributes, you can limit redemptions to customers who share a specific metadata value(s). Customer metadata provides personalization, targeting, and geofencing in your promotions. 

Rules examples

  • Only customers with metadata customer_lifetime_value is more than 2000 can redeem the discount.
  • Customers with metadata billing_unpaid is true cannot redeem the discount.
  • Customers with metadata subscription is premium can redeem gift cards from campaign X.

Order metadata satisfy

Go to Rules Builder > Order structure 

Orders enable you to pass your transactional data to Voucherify. Using order metadata and validation rules, you can define additional conditions that the customer's order has to match to redeem incentives or earn loyalty points.

Rules examples

  • Voucher can be redeemed only if metadata Shipping_postal_code starts with 43-.
  • Customer gets 50 loyalty points if the order total amount is more than $100 and metadata shipped is true.
  • Customers get - 50% if the order metadata takeaway is false and - 25% if metadata takeaway is true.
  • Customers get extra 100 loyalty points if the order was placed in July between 10 AM and 1 PM (metadata booking_date is within time-frame 6/1/2021 - 6/30/2021 Every day 10:00 AM to 1 PM).

Redemption metadata satisfy

Go to Rules Builder > Advanced.

You can attach metadata to redemption requests. Redemption metadata in validation rules lets you define additional attributes that need to be passed to successfully redeem codes/promotions.

Rules examples

  • Voucher can be redeemed only if metadata payment_method is credit_card.
  • Customer can redeem a $10 gift card if the metadata booking_channel is homepage.
  • Customers get a free item X (unit discount) if redemption was made in July between 10 AM and 1 PM  (metadata booking_date is within time-frame 6/1/2021 - 6/30/2021 Every day 10:00 AM to 1 PM).

Create time-related limits

Campaign time frame and other time-sensitive rules are created in the Campaign Manager. In loyalty programs, set limits are attached to every loyalty card, in referral campaigns, they refer to referral codes. Go here to learn more.


Create publication-related limits

Publication means assigning a code to a particular customer. Typically, a publication is made by distributing your codes to customers by using Distributions or Publications API. From the moment the code was assigned to a customer, it's visible in his/her profile in Voucherify. Publications are required for loyalty cards and referral codes to work properly and are optional for coupons or gift cards. 

Thanks to publications, you can use the following campaign rules:

  • Customer can join campaign only once – optional campaign mode ensuring that each customer can own only one code from the given campaign. You can enable this campaign mode in the Campaign Manager > Program size/Program details.
  • Only for a customer who is a holder of the code – validation rule that limits code redemptions to a customer who has the code published to his/her account. Only the code owner can use the code. You can find this rule in the Advanced validation rules category. 
  • Keep valid for a specific amount of time after publishing – allows you to define how many days or hours the code is valid since it was published to the customer. You can find this limit in the Campaign Manager > Timeframe.

Add discount amount limit

The amount limit defines the maximum amount of the discount when redeeming a percentage discount. If a discount is applied to the whole cart, then the amount limit refers to the maximum discount applied to the order. If a discount is product-specific then the amount limit defines the maximum discount amount per discounted item. 

You can set the Amount Limit next to the other discount settings.


Create earning rules limits

Earning rules are a key part of loyalty campaigns, they define how customers can earn new points on their loyalty cards. The Rules Builder connected to the Campaign Manager enables you to create and assign validation rules to each earning rule. 

There are different validation rules available for each type of earning rule:

Order has been paid

Validation rules define additional requirements including cart structure and volume, customer metadata, or qualified customer segments. Therefore, only when the order is paid and all validation rules are met, new loyalty points are assigned.

Custom event

Validation rules enable you to limit the event-based earning rules to specific customer segments and customers with specific metadata. When a custom event defined in the earning rule gets to Voucherify, the application checks if a customer linked to the event matches the segment and metadata rules. 

Entered segment

When setting up entered segment rule, you can define which segment a customer has to enter to trigger loyalty points on his/her digital card. Using validation rules, you can extend the criteria for customers and define required customer metadata or other segments that a customer has to join/can't join to fulfill the rule. 

Read more about Earning rules in Getting Started with Loyalty Programs.

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