Import file details: discount_voucher.csv
Edit on GitHubThis document describes the discount_voucher.csv file to configure Discount Voucher information in your Spryker Demo Shop.
To import the file, run:
data:import:discount-voucher
Import file parameters
| PARAMETER | REQUIRED | TYPE | REQUIREMENTS OR COMMENTS | DESCRIPTION |
|---|---|---|---|---|
| discount_key | ✓ | String | discount_key must exist in the discounts.csv file |
The key identifier of the discount. |
| quantity | ✓ | Number | The number of vouchers that are generated. | |
| custom_code | ✓ | String | The customized code of the voucher, composed of two parts:
|
|
| random_generated_code_length | ✓ | String | If quantity >= 1, then random_generated_code_length cannot be empty. |
A random part of the voucher code with the amount of random symbols equals to the value of random_generated_code_length field. |
| max_number_of_uses | Number | If empty, this will be set to 0. | The maximum amount of times this voucher can be used. | |
| voucher_batch | ✓ | Number | voucher_batch must be previously created during discount.csv import, then the batch value must be a different number for each row in the file. |
This groups vouchers into batches. It identifies a voucher belonging to the same voucher pool. |
| is_active | Boolean | If empty, will be set to False = 0.
|
If true, the discount is active. |
*N/A: Not applicable.
Import file dependencies
This file has the following dependency: discount.csv.
Additional information
The generated voucher code consists of two parts:
custom_codewhich is a prefix of the voucher code that can be set directly atcustom_code, and- a random part with the amount of random symbols equals to the value of
random_generated_code_lengthfield.
If a quantity is equal to or greater than 1, then random_generated_code_length should be non-empty as the generated code is unique.
Field voucher_batch is necessary when different vouchers belong to the same voucher pool. It must have been previously created during discount.csv import, then the batch value must be a different number for each row in the file.
Import template file and content example
| FILE | DESCRIPTION |
|---|---|
| discount_voucher.csv template | Exemplary import file with headers only. |
| discount_voucher.csv | Exemplary import file with Demo Shop data. |
Thank you!
For submitting the form