What limits can I create with validation rules?
In this section:
- Introduction to validation rules
- How to build a rule?
- Build rules in Validation Rules Dashboard section
- Build rules in the Campaign Manager
- Validation rules with Metadata-Schema Validation
- Validation rules with time and date
- Validation rules with product metadata
The aim of creating validation rules is to model the desired incentive redemption circumstances. Rules are built with attributes and operators divided into 6 categories:
By using customer segments, you can choose a target or exclude a particular customer segment from clients allowed for redemption. While adding validation rules based on segments, you can choose to include/exclude one of the existing segments or create a new segment from scratch.
You can also use custom attributes defined previously in Metadata Schema and create unique validation rules based on their values.
For example, imagine you have a gym and your customers have different memberships. Despite the fact that Voucherify doesn't offer such customer attributes by default, you can use metadata to put in into customer profiles. By adding property membership to Metadata Schema you can target a specific group of members.
There aren't any limits on the type or number of custom attributes. You can add as many customer attributes as you'd like.
| Customer segment
|| The first property enables you to limit redemptions to specific customer segments. It can be useful if you want to take into account only new customers, or regular clients or any other segments you come up with.
||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||You don't have to create a customer segment based on metadata as Voucherify can automatically target customers who meet metadata criteria.||For instance, you can state that only customers with revenue above 2000$ are eligible for a discount without creating a separate customer segment beforehand.|
With the following rules, you can create product-specific promotions based on a cart structure and quantity/price of items in the cart.
| Contains product
|| With this attribute, a customer gets a discount if the order contains a product:
||A customer can redeem the code if the order contains at least 3 products X in the cart.|
|Does not contain product||You can specify the products excluded from the promotion.||A customer can get a discount only if the cart does not contain product X.|
|Contains SKU / Does not contain SKU||SKU (Stock Keeping Unit) is an attribute that differentiates product variants. Used in a validation rule, it makes a coupon active only if the particular variant is in a cart (and optionally set the required amount in the cart). Choose SKU/SKUs which have to be in the cart, and then mark a checkbox "Discount is applicable to this SKU" to make a discount valid only to the added items.||A customer can use a gift card only for black and silver iPhones and cannot use it to buy a white variant (SKU) of the product.|
|Product and order metadata satisfy|| Rules based on custom attributes assigned to your products and orders, e.g., series. You can add as many metadata attributes as you wish.
|| A discount is applicable only to products which series begins with AT54.
|Any order item product metadata satisfy||These rules allow you to make order eligible for a discount if any item in your customer's cart meets metadata set for the given campaign.||Customers will get the discount if at least one product in his/her cart meets metadata.|
|Each order item product metadata satisfy||These rules allow you to make order eligible for a discount if all items in your customer's cart meet metadata set for the given campaign.||For example, your customer has to purchase only products in a certain color for his/her order to be eligible for a discount.|
Introduce cart’s price-related constraints to up-sell and boost sales.
| Total amount
||You can define a maximum/minimum value of a customer's cart that enables them to use the code.||Discount applies only if the total amount of the order is more than $50.|
| Items quantity
|| You can select a required quantity (min/max) of products that need to be in a customer's cart.
|| Discount applies only if a customer bought at least 5 products at once.
| Price of each item
|| You can set a minimum/maximum price of each product from a customer's cart.
|| Discount applies only if the price of every item in a cart is more than $50.
| Price of any item
|| This rule defines a minimum/maximum 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 code can be redeemed.
Control promotion budget by setting up safety limits which automatically deactivate your promotion.
| 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 select a maximum value of all orders made within the campaign. When this limit is reached, customers cannot redeem more codes.
|| The value of all orders made within the Y campaign cannot be more than $20 000.
| Total number of redemptions
|| It's a total number of redemptions allowed per entire campaign.
|| Customers can redeem codes from a campaign 3 000 times.
| Total redeemed gift amount
|| It defines a total value of redeemed gift cards amongst the whole
|| Customers can spend $10 000 of the balance from a gift card campaign.
| Redemptions count per customer
|| It defines:
|| Customers can redeem max. 3 codes within a campaign but only once per day.
Control redemption with rules based on custom fields and access policy.
| Redemption metadata satisfy
|| Read more here.
||The code redemption is only available for orders made before 4 pm.|
| Redeeming user
|| With this
|| User "Denver_department" can invoke redemptions and the user "Central_department" cannot redeem codes.
|Redeeming API key||This attribute allows you to limit redemption to particular API keys.||For instance, you can limit redemptions to 3 per specific users with the same API key.|
| Only for customers who are holders of the card
|| With this attribute, you can improve fraud detection and reduce coupon misuses. By using this rule, you ensure that a voucher is redeemed by the same person that it was published to (sent).
|| When you save the campaign and share the codes, a customer will be able to utilize a coupon only if its publication is assigned to his/her id.
Decide to which products the discount should be applied or exclude products from being discounted.
|Discount the following Products and SKUs||The discount will be applied only to particular Products or SKUs.||Apply a 10% discount to X Product, instead of the whole order.|
|Exclude the following Products and SKUs|| The discount will not be applied to particular Products allowing you to protect your budget better.
||The 10% discount on the whole order will exclude the X Product which will be sold at a regular price.|
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.
How to build a rule?
There are two ways you can create validation rules in Voucherify Dashboard:
- You can go to the Validation Rules section in the Dashboard, create and save a set of rules, and use them later on while creating a campaign.
- You can create validation rules from scratch while creating a campaign in the Campaign Manager.
After you save the rules they will be automatically added to the Validation Rules section ready to use in your future campaigns.
Adding validation rules via the Dashboard
Go to the 'Validation Rules' section in the Dashboard and choose the Plus to create new rules. Add a name for your new rule/set of rules
For example, 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.
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.
Adding validation rules in the Campaign Manager
Firstly you need to run the Campaign Manager and choose a campaign type you'd like to create. Go through the first two stages of a campaign creation process.
In the 3rd step, you can add validation rules and define what criteria customers and their orders have to match to make a valid redemption.
Validation rules with Metadata-Schema Validation
This guide assumes you are already familiar with the Metadata-Schema Validation. If you need help with that, follow this link.
Voucherify Metadata-Schema Validation enables you to create the following metadata attributes:
- image URL
These custom properties can relate to all Voucherify object types:
You can use them to add specific campaign limits or customer segment rules. Different types of attributes allow you to create rules based on specific numbers, dates, and time frames. Let's explore some examples.
Redemption metadata with date and time
Metadata attributes assigned to redemption objects can be used to create validation rules during the 3rd stage of the Campaign Manager.
Firstly, you need to add metadata properties to the project's Metadata Schema.
In the picture, you can see one metadata attribute assigned to redemption objects:
- booking_time type 'date-time'
Validation rules with products/SKUs metadata
Each custom attribute that you add to product objects using API or Metadata Schema, can be used to create validation rules.
You don't have to import your inventory to use product-specific rules in your campaigns. That means there is no need to store products catalog in Voucherify upfront and up-to-date. If you use API to invoke codes' redemptions, then you can add products with metadata while invoking redemption (to the redemption request). You can read more in this guide.
To use Metadata-Schema Validation created for products or SKUs, you need to choose the validation rule from Order structure > Product metadata satisfy. Similarly to the previous case, assigned properties will be listed automatically after choosing the rule.
You can use assigned properties to build product-specific rules
When you choose a required value for a property, confirm with Add. The campaign redemptions will be restricted by added limits and redemption request needs to be equipped with product metadata attributes with assigned values. Otherwise, the system will reject the redemption request.