Product Metadata

This article assumes that you are familiarized with the Getting Started with Metadata.

Metadata in products and SKUs enables you to create and execute product-specific promotion rules whether you decide to sync your inventory with Voucherify or not. You can upload your products and use metadata to extend their characteristics with custom attributes or skip adding products and use metadata to validate the customer's cart while redeeming the code.

In this article, you'll see how to customize your products with metadata and build validation rules using added attributes. We'll also cover executing metadata limits while validating and redeeming promo codes. 

In this article:

  1. Metadata Schema
  2. Working with Product Metadata
    1. Validation Rules
    2. Campaign Examples
    3. Products Profiles

Metadata Schema

With the Metadata Schema, you can reflect the custom product and SKU properties. In effect, every product/SKU will get a set of custom fields (each for a corresponding level or in an array form), which you can fill in if you decide to add/import your product catalog to Voucherify. If you don't want to import your catalog, you can pass added metadata attributes in the redemption request and still execute product-specific validation rules in your campaigns.

Products and SKUs have dedicated schemas that store all their custom attributes to ensure data integrity. To add new metadata to a schema, go to the Project Settings and the Metadata Schema tab. Expand the list of Standard schemas and choose Product to define new product attributes or SKU to add new attributes to the product's SKU. 

Choose Add new definition to define attribute details. You don't attach these attributes to specific products; you define their names, types, and values (optional). If you mark the Mandatory checkbox, defining this attribute value will be required when adding a new product to your account.


Working with Product Metadata

Now, it's time to use added metadata properties in practice. In this section, you'll see examples of campaign limits built with product metadata. Using validation rules, we're going to show you how to offer free items without importing your catalog and how to redeem codes with product metadata limits. Finally, you'll see how product and SKU metadata can help you to better report and track your results.

Validation Rules 

With product metadata ready, you can build validation rules. Product metadata limits can be later assigned to your campaigns and limit code redemption to specific buying circumstances. 

To build validation rules with product metadata, open the Advanced Rules Builder and expand the Orders Structure section. The builder enables you to create and combine the following product metadata limits:

  • All rules with metadata need to be met for at least one product in the cart.

  • All rules with metadata need to be met for each item in the cart.

  • You can set how many items with specific metadata needs to be in the cart (1) and/or set the subtotal of matched items (2).

  • Using the checkbox  Discount applicable to related products, you can decide if the discount should be applied to matched items.

Important note

When validating code or promotion, Voucherify treats SKUs as products. It means, that SKU inherits the metadata assigned to the product and combines product and SKU attributes. As a result, the SKUs will be considered in the evaluation of product-specific rules. Please read this section before setting up validation rules with product and SKUs metadata.

The section below shows examples of promo campaigns that use validation rules with product metadata. The first campaign offers codes with free items, and the second shows bundle promotion


Free Item Promo Code

In this tutorial, you can see how to offer free items using discounts and metadata without importing your product catalog to Voucherify.

Step 1: Add a new metadata attribute to the product schema.

Go to the Metadata Schema in your Project Settings. Expand the Standard list, open the Product Schema, and click Add new definition

new-definition

Add a new metadata attribute that will be specific to free products. You can use flag metadata type and operate on true/false values depending on whether the product should be offered for free or not. 

add-definition

Confirm with Save.


Step 2: Create validation rules.

Validation rules specify which products the 100% discount will be applied to. In other words, which cart items should customers will get for free. To create rules, go to the Validation Rules in your dashboard and run the Manager with the plus.

Name your rules and go to the Next step. Expand Order structure category, and check Product metadata satisfy

Add metadata attribute specific to free items and set required value (true). Confirm with Add.

Check  Discount applicable to related products to apply the discount only to items with this metadata attribute set to true. 

Additionally, you can set how many free items customers can have in their cart (1) and/or what is the maximum value of the discounted (free) items in the customer's order (2). 

When all rules are set, go to the Next Step and Save the rules.


Step 3: Create a promo campaign with a 100% discount.

Go to the Campaign Manager to create coupons or auto-applied promotion with a 100% discount. Set the discount type to percentage and the value to 100%.

Add validation rules created in the previous step.

Go through the remaining settings and Save your campaign. It's ready to go!


Validation and Redemption

While redeeming the discount, the redemption request provides information about the customer's order. To execute validation rules, you need to pass product metadata in the order object in the redemption request. 

As a result, the discount (100%) is applied only to items with metadata free_sample set to true.


Bundle Discount

You can use metadata to divide products into groups and apply discounts only to orders containing specific product bundles. This solution gives you great flexibility while creating bundles as you can change their configurations dynamically by assigning metadata to different products. Here are some examples of popular bundle promotions you can create:
  • Buy at least two products from category A and get a product from the category B for free (or with a discount).
  • Buy three products from category A to get 20% off or buy five products from category A to get 30% off.
  • Buy at least one product from each category (A, B, C) and get 20% off your total order amount.
  • And many more!

Step 1: Define metadata attributes in the Product Schema

Create metadata properties that will group your products. Go to the Metadata Schema in your Project Settings and expand the Standard list. Open the Product Schema, and click  Add new definition

new-definition

If you need more than one property to group your products, put them all in the Product Schema.

Step 2: Create validation rules with the bundle

Use validation rules to define the items required in the customer's cart and decide which items will be discounted. Go to the Validation Rules, and run the Manager with the plus.

Name your rules and go to the Next step

Expand the  Order structure category and create validation rules with product metadata that define the bundle. 

The example below shows the following bundle rules: two products from the Clocks category + at least one product from the SALE category = discount applied on SALE items.

 When validation rules are ready, go to the Next step and confirm with Save


Step 3: Create a bundle discount.

You can offer bundle discounts using coupons or auto-applied promotions:

While creating the campaign, add your validation rules with the bundle setup (2) and define what discount customers will get while buying the bundle (1). 


Validation and Redemption

While redeeming the discount, the redemption request provides information about the customer's order. To execute validation rules, you need to pass product metadata in the order object in the redemption request. 

As a result, the redemption succeeds only if the customer's cart contains the predefined bundle.


Products Profiles

Metadata enables you to create product-specific promotions without importing your catalog. If however, you decide to add your products to the dashboard, metadata from the Product Schema will be visible in the Metadata tab in the detailed product view. 

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