Vouchers

Vouchers are unique codes which are used during checkout to trigger a discount, e.g. 5% off or Free shipping. A voucher can only be used once – if you’re looking for ways to trigger a discount multiple times using the same code – e.g. CHRISTMAS2019 – check out the Discounts documentation.

Voucher codes are created inside voucher lists – to create a voucher list:

  • Go to Ecommerce and click the Vouchers node
  • Click New voucher list in the toolbar
  • Enter a Name – e.g. Free shipping – and check Active (Figure 1.1)
  • Save

This generates an empty voucher list (Figure 1.1) – the various fields are filled only when the voucher is associated with a discount.

Figure 1.1 Voucher lists

There are two ways to add voucher codes to a voucher list.

  • To add voucher codes manually:
    • Open the voucher list
    • Click Add vouchers
    • Enter a comma-separated list of voucher codes to the input field
    • Click Add
  • To auto-generate vouchers:
    • Open the voucher list
    • Click Generate vouchers
    • Enter an absolute number of codes to generate OR select a number of users & user groups and generate a voucher code for each unique user in this selected
    • Click Generate

Whichever way is used to create the vouchers, they now appear in the voucher list (Figure 1.2) – the Order, Sent to, and Voucher status properties are not used before the voucher has been distributed to a user.

Figure 1.2 Voucher codes inside a voucher list

Vouchers, it’s important to state, don’t do anything by themselves – they must first be associated with a discount which will be triggered when the voucher is used during checkout.

To associate a voucher list with a discount:

  • Create an appropriate discount
  • Scroll to the Fields and Vouchers settings and:
    • Select an order field
    • Check voucher list
    • Select the voucher list you want to use to trigger the discount in the dropdown

Whenever a code mathing a voucher code in this list is entered in the order field during checkout, the discount will be triggered.

Using the voucher renderer app, it is possible to generate unique vouchers on-the-fly to use in for example a signup flow. The generated voucher can be shown in an email or on a page on the website. Each time a new voucher is generated it is automatically added to the chosen voucher list.

Vouchers can be distributed to customers in two main ways:

  • They may be emailed to a fixed set of registered users directly from the Voucher list
  • They may be emailed on-the-fly to registered users using the voucher renderer app
  • They may be downloaded and distributed in other ways – this requires the list to be linked to an existing discount

To email users directly from the voucher list click send email from the toolbar and configure the send mails window (Figure 4.1).

Figure 4.1 Emailing vouchers to users directly from the vouchers tool

You must:

  • Select a number of users and/or user groups
  • Provide a sender name, a sender email and a subject
  • Select or create an email template to use
  • Click Send

To read about sending out vouchers via Email Marketing tool using the Voucher renderer app see the voucher emails article.

To download voucher codes click Download vouchers in CSV in the toolbar.

During checkout, customers can enter a voucher code in a voucher field and trigger the linked discount. As of Dynamicweb 9.10 you can apply multiple voucher codes to the same order via the same field - you can use ";" and "," and [space] as the delimiter. 

Which field to use depends on how the discount is configured – when creating a discount triggered by a voucher code you can choose between the Default Voucher Code Field and any of the custom order fields on the solution.

The default voucher code field can be rendered using the Ecom:Order.Customer.VoucherCode template tag.

Please note that voucher codes allow the user to save up to the voucher amount – so a voucher for 100 USD applied to an order of 50 USD will not result in a negative charge, a refund, or anything else in that vein.

database

There is no database specific information for this subject.

EcomVoucherLists

Contains voucher lists as defined in the Ecommerce -> Vouchers node.

Field name Data type Length
VoucherListId int 4
VoucherListName nvarchar 255
VoucherListActive bit 1
VoucherListCreatedDate datetime 8

EcomVouchers

Contains data on individual vouchers in a voucher list (VoucherListId). If the vocuher has been used order id and timestamp (VoucherUsedOrderId, VoucherDateUsed) are logged along with user id (VoucherAccessUserId) if the order was performed by an extranet user.

Field name Data type Length
VoucherId int 4
VoucherListId int 4
VoucherCode nvarchar 36
VoucherDateUsed datetime 8
VoucherUsedOrderId nvarchar 50
VoucherAccessUserId int 4
VoucherStatus nvarchar 50