Do I have to import my catalog to create products-specific rules?

No, you don't have to import your inventory to use product-specific rules in your campaigns. That means there is no need for storing products catalog in Voucherify upfront and up-to-date.

When your system is integrated with Voucherify, every time someone tries to redeem a code, the validation and redemption requests are sent to Voucherify API. This request is equipped with all customer and order details including product metadata (if added). When a redemption request is sent, dependently on validation rules and campaign limits, Voucherify sends a response to your system which states if the redemption succeeded or failed.

The Voucherify engine enables you to assign custom attributes (metadata) to products/SKUs in order to invoke a redemption. 

How does it work?

Firstly, it's recommended to use Metadata Schema to define custom attributes for your products which then can be used while creating validation rules. In the Schema, you don't attach these attributes to specific products, you just define their names, types, and values (optional). 

You can find the detailed guide describing how to add custom product attributes with Metadata Schema here.

Example of metadata

When you have product metadata defined, you can create a campaign with validation rules based on product metadata. As a result, all the products in the order will be validated accordingly to the rules with product metadata. 

You can see how to add validation rules with product metadata in this section.

Product Metadata Satisfy example

When the campaign is fired off, your customers can start redeeming codes. And so, we're coming back to the validation/redemption request. When creating a redemption request via API you can add products with metadata from scratch. When a redemption request gets to Voucherify, metadata assigned to ordered products will be compared to the validation rules with product metadata assigned to the code. 

For example, here is a campaign of unique codes with a 10% discount with the following validation rule attached:

Product Metadata Satisfy example

While invoking the code redemption, you can add a product/products to the redemption request details. These products aren't in Voucherify inventory, they are created from scratch.

  "customer": {
    "source_id": ""
  "order": {
    "amount": 70000,
    "items": [
      {"quantity": 1, "source_id": "FOR-1", "related_object": "product", "price": 30000, "amount": 60000, "product": { "metadata": { "Category": "Electronics" } } }

In the next step, Voucherify will verify if validation rules attached to this code (Product metadata satisfy: Category is Electronics) are met by a customer and his/her order. In this case, Voucherify compares product metadata attached to code (in a validation rules object) with product metadata attached to products in a customer's order.

If you'd like to learn more, please follow our tech docs

Still need help? Contact Us Contact Us