Content of this article
- Preliminary Remarks
- Implement Individual Voucher Codes
1. Preliminary Remarks
When creating a voucher campaign, plenigo generates a 6-digit alphanumeric voucher code (e. g. AB1-C34-DE5).
If desired, the voucher code can be replaced by a word, for example. This function, however, cannot be done within the Merchant Backend.
In this entry we explain how the customized voucher code can be implemented.
2. Implement Individual Voucher Code
1. Creating a voucher campaign in the Merchant Backend
Firstly, the voucher campaign must be created in the Merchant Backend. We recommend to create a multiple voucher campaign with one voucher code. The voucher code is generated by the plenigo system.
2. Landing page for voucher redemption
For redeeming the voucher, you will need a landing page. We do not recommend a voucher redemption field in the checkout for this case. On the landing page, the code can be entered into a field and send by clicking on a button. Technically, the checkout is called by clicking on the button. This happens via the API endpoint https://api.plenigo-stage.com/api/v3.0/checkout/preparePurchase.
The desired word can now be entered into the field "voucherCode", for example "BLACKFRIDAY" that will be used instead of the voucher code. Deactivate the voucher redemption field via the flag "hideVoucherInput".
You will find more information in the API documentation.
3. Mapping
The actually new step is now creating a mapping which assigns the external code (BLACKFRIDAY) to the internal code of the voucher campaign (AB1-C34-DE5).
This mapping can be, for example, a script which validates the external code and passes the corresponding internal code to the plenigo system. If no match is found, an error message could be displayed.