Subvouchers

About this article

This new addition allows for the creation of multiple Subvouchers associated with a main voucher, each possessing unique codes and/or email assignments.

By implementing this structure, the duplication of main vouchers is minimized, streamlining overall voucher management. In the current version, there are two methods available for configuring Subvouchers: through Import in AMS or via GQL API.

Overview

  1. The General panel with main settings will be retained and will oversee all subvouchers.

  2. The management and setup for Actions remain unchanged; you will need to configure all the rules for how the voucher should be applied in the same manner.

  3. The primary update is the addition of a new section under Actions, named Subvouchers. This section will feature a table displaying all details for the generated codes under that voucher, indicating whether they are assigned to an email address or not.

New functionalities, new features:

  • You can now include multiple unique codes within a single main voucher, all following the same general settings and application rules.
  • Subvouchers can be allocated to either customer emails or email domains, and their validation is dependent on the email submitted only during checkout (registered customer email is not identified or verified if the customer is logged in).
  • Subvouchers can be generated with specific rules such as code length, character types, prefixes, suffixes, and amounts.
  • For subvouchers of type Code, you can adjust the code, start/stop dates, and assign them to specific emails.
  • The main voucher settings for Max usage and available value will be counted for each subvoucher. For example, if the Max usage is set to 10 and there are 50 subvouchers, each subvoucher can be used up to 10 times.
  • While you can assign the same email to different subvoucher codes, the subvouchers themselves cannot be used in the same order. For example, if you generate multiple subvoucher codes from the same main voucher and assign them to the same customer email, your customer will still only be able to use one of those codes per order.

Available combinations for vouchers:

Subvoucher types:

  • Code: subvouchers work in both DTC and Wholesale.
  • Email/Domain: subvouchers only work in DTC at the moment.
    • voucher is of type code, and each subvoucher has its own code
    • voucher is of type code, and each subvoucher has its own code and email or email domain
    • voucher is type Auto, and subvoucher has email or email domain
    • voucher is of type URL, and each subvoucher has its own URL
    • voucher is of type URL, and each subvoucher has its own URL and email or email domain

Setup via Import in AMS

  • Each Subvoucher can be utilized multiple times based on the Max usage set for the main voucher; it is advisable to set this to 1.
  • It is possible to import up to 500 000 subvouchers via Centra interface.
  • The voucher must contain a unique code that is not accessible to customers or other subvouchers, consider selecting a random code or using a prefix, within the store.
  • Subvouchers from the same voucher can only be applied once per order; it is not possible to combine multiple subvouchers in a single order.
  1. When you open a created Voucher, select Generate subvoucher button on top right corner:

  2. Before proceeding, you will need to establish the primary guidelines for the voucher:

  3. Once you have finalized the voucher rules, proceed to upload the file containing the codes you wish to generate. Please ensure to follow the instructions outlined in the import How-to guide when preparing the file.

  4. After clicking Import, please note that the import process may take a few minutes to complete. You can close the progress pop-up and proceed with other actions on the page while the import continues in the background. Once the import is finished, you will receive a 'success' notification:

Setup via Integration API

To addSubvouchers using the Integration API mutation, follow these steps:

  • Input the ID of the voucher created in step 1. (which can be found in the Integration API vouchers query or the URL of the voucher in the Admin Management System (AMS) ).
  • Specify the start/stop date to be applied to all codes added in this batch.
  • Provide up to 1000 unique identifiers (this limit will be increased soon), with the option to associate each code with an email. Note that each customer order can only use one Subvoucher per voucher, so additional email validation may not be necessary.

When revisiting the voucher in Centra AMS, certain fields like start/stop date and code will be disabled, and you will see a list of the added codes. Any changes made to the main voucher will affect all Subvouchers, both existing (not used) and future ones.

Mutations in GQL:

Example:

addSubvouchers(
   input: {
     voucher: {id: 224} #Which voucher to use as parent
     startAt: "2023-05-01 00:00:00" #when the added childs will start working
     stopAt: "2099-12-01 00:00:00" #when the added childs will stop working
     identifiers: [ #List of code and optionally email if they wish to have email validation
       {code: "Child5K93XFce56" email:"test1@example.com"} 
       {code: "Child5K93XFce57" email:"test2@example.com"}
       {code: "Child5K93XFce58" email:"test3@example.com"}
       {code: "Child5K93XFce59" email:"test4@example.com"}
     ]
   }
 ){
   subvoucherIds { 
     id
     startAt
     stopAt
     code
     email
     successfulUsages
     voucher {id}
   }
   userErrors { message path }
   userWarnings { message path }
 }
}   

Next article: Setup