Codes Import
What if you want to share codes from other sources than Voucherify? We have placed the CSV Import Tool in the Dashboard to handle this scenario. It enables you to import standalone and unique codes grouped as a campaign.
Contents
Important Notes
- The start and expiration dates in the CSV file should be provided in compliance with the ISO 8601 norms, for example, 2020-03-11T09:00:00.000Z.
- CSV columns mapped to Custom Attributes will be added as codes' metadata. The number of custom attributes you can import as metadata is unlimited.
- You cannot import two identical codes to a single Project.
Discount Coupons
Standalone Coupons Import
Prepare a CSV file with your codes. Besides the coupon code, your file must include the following coupon attributes:
- Voucher Type (text: DISCOUNT_VOUCHER),
- Value (an integer value - number),
- Discount Type (text: AMOUNT, PERCENT, FIXED or UNIT)
- Code (the unique discount code)
The remaining fields in the CSV template are optional:
- Category (a custom tag for the voucher to help you filter codes)
- Active (use TRUE or FALSE to enable or disable the voucher; this flag can be used to turn off the ability to redeem a voucher even though it is within its start/end validity timeframe)
- Start Date (provide voucher start date in compliance with the ISO 8601 norms. For example, 2022-09-19T00:00:00.000Z)
- Expiration Date (provide voucher expiration date in compliance with the ISO 8601 norms. For example, 2022-11-30T00:00:00.000Z)
- Redeemed Quantity (number of times the voucher was redeemed. If you leave this undefined, it will default to 0)
- Redemption Limit (maximum number of redemptions allowed. If you leave this undefined, it will default to unlimited)
- Additional Info (any additional information you would like to store about the voucher)
- Custom_metadata_property (any additional data that you would like to store for the given voucher as a Custom attribute. Remember to define the metadata schema in the Dashboard before importing codes)
- Formula (adds a dynamic discount formula. Enter the Expression Output of a formula to relevant column in a CSV file).
Fields other than the ones listed above will not be imported. Even if provided, they will be skipped.
CSV File Template
When the CSV file is ready, go to the Vouchers view and click on the Import tool in the top right corner.
- Choose Import CSV file and upload the file with your codes.
- Go to the Map Fields tab to map data from your CSV columns to Voucherfy fields.
- On the left-hand side, you can see the CSV column names that need to be mapped to fields from a Select property list. After selecting the matching field, choose Plus to confirm mapping.
Custom Attributes Mapping
If you want to add a field unlisted in the built-in properties, change the Voucherify fields to Custom Attributes. Define the name of your custom field and confirm with the plus. The attribute and value from the CSV file will be added as codes' metadata.
When the mapping is ready, click Import to confirm.
When the import is done, Voucherify will notify you about the result.
Import Discount Coupons to a Campaign
If you still need to get a campaign for your codes, create a discount coupons campaign. Then, prepare your CSV file. If you are adding vouchers to the existing campaign, CSV can contain columns with:
- Required attribute:
- Code (the unique discount voucher code)
- Optional attributes:
- Active (use TRUE or FALSE to enable or disable the voucher; this flag can be used to turn off the ability to redeem a voucher even though it is within the campaign's start/end validity timeframe)
- Category (a custom tag for the voucher to help you filter codes)
- Redeemed Quantity (the number of times the voucher was already redeemed)
- Custom_metadata_property (any additional data that you would like to store for the given voucher as a Custom attribute. Remember to define the metadata schema in the Dashboard prior to importing codes)
During the voucher codes import, all the fields that cannot be mapped will inherit the campaign's default settings.
Please keep in mind that you can only change the below attributes with the import file:
- Active/Inactive parameter
- Category field
- Metadata (you can add/update multiple metadata properties within the file).
For example, if you import vouchers to a campaign and do not specify the ‘active’ parameter, Voucherify will use the parameters from the campaign setup:
- If the campaign is not expired and the active field is not present in the import file, Voucherify will set up the active field to TRUE, so the imported vouchers will be enabled.
- If the campaign expires and the active field is not present in the import file, Voucherify will set up the active field to FALSE, so the imported vouchers will be disabled.
After importing a code, all of the voucher parameters that cannot be included in the import file will be adjusted to the current campaign’s settings - e.g. redemption limit, discount value or an expiration date.
When it comes to metadata it will be overwritten/added only if you specify it in the import file and define the mapping in the import screen in the dashboard. A few options are possible:
- You can skip the metadata column in the file and don’t map any metadata in the import process - the vouchers will inherit the metadata from the campaign.
- You can add columns with metadata to the file and map them. In this case those metadata properties will be overridden with the value provided for each code in the import file. Metadata that is not mapped won’t be overridden.
So for instance, if a voucher already has a custom attribute it can either be modified or you can add a new attribute via the import metadata mapping field.
If you want the vouchers to have other attributes than those in the campaign, they always have to be specified in the appropriate mapping fields in the import file; otherwise, the campaign's default settings will be applied.
CSV File Template
When the CSV file is ready, go to the detailed campaign view and click Import CSV file in the right-corner menu.
- Upload the CSV file with your campaign codes.
- Go to the Map Fields tab to map data from your CSV columns to Voucherify fields.
- On the left-hand side, you can see the name of CSV column that needs to be mapped to a field from a Select property list. After selecting the matching field, choose the plus to confirm the column mapping.
- When the mapping is ready, click Import to confirm. You'll be notified when the import is done.
New vouchers will be listed in the Vouchers tab in the detailed campaign view.
Gift Cards
Standalone Gift Cards Import
Prepare a CSV file with your codes. Besides the gift card code, your CSV file needs to include the following code attributes:
- Voucher type (the voucher type for discount vouchers is GIFT_VOUCHER)
- Code (the unique gift card code)
For gift cards, you can also import the following field:
- Active (use TRUE or FALSE to enable or disable the voucher; this flag can be used to turn off the ability to redeem a voucher even though it is within the campaign's start/end validity timeframe)
- Start Date (provide gift card start date in compliance with the ISO 8601 norms. For example, 2022-09-19T00:00:00.000Z)
- Expiration Date (provide gift card expiration date in compliance with the ISO 8601 norms. For example, 2022-11-30T00:00:00.000Z)
- Value (the initial gift card balance to be added)
- Category (a custom tag for the gift card to help you filter codes)
- Redemption Limit (maximum number of redemptions allowed. If you leave this undefined, it will default to unlimited)
- Redeemed Quantity (number of times the gift card was redeemed)
- Redeemed Amount (amount that was redeemed from the available balance on the gift card)
- Additional Info (any additional information you would like to store about the gift card)
- Custom_metadata_property (any additional data that you would like to store for the given gift card as a Custom attribute. Remember to define the metadata schema in the Dashboard before importing codes)
CSV File Template
When the CSV file is ready, go to the Vouchers view in your dashboard, and click on the Import tool.
Choose Import CSV file and upload the file with your codes.
Go to the Map Fields tab to map data from your CSV columns to Voucherify fields.
On the left-hand side, you can see the name of CSV column that needs to be mapped to a field from a Select property list. After selecting the matching field, choose the plus to confirm mapping.
Custom Attributes Mapping
If you want to add a field unlisted in built-in properties, change Voucherify fields to Custom Attributes. Define the name of your custom field and confirm with the plus. Added attribute and its value from CSV file will be added as code metadata.
When the mapping is ready, click Import to confirm.
You'll be notified when the import is done.
Import Gift Cards to a Campaign
If you don't have a campaign for your codes yet, create a unique gift cards campaign. Then, prepare your CSV file. If you are adding gift cards to the existing campaign, your CSV file can contain columns with:
- Required attribute:
- Code (a unique gift card code)
- Optional attributes:
- Active (use TRUE or FALSE to enable or disable the gift card; this flag can be used to turn off the ability to redeem a voucher even though it is within the campaign's start/end validity timeframe)
- Gift Amount (the initial gift card balance)
- Category (a custom tag for the gift card to help you filter codes)
- Redeemed Quantity (the number of times the gift card was redeemed)
- Redeemed Amount (the amount that has been redeemed from the available balance on the gift card)
- Custom_metadata_property (any additional data that you would like to store for the given gift card as a Custom attribute. Remember to define the metadata schema in the Dashboard before importing codes)
Gift card attributes unlisted in the import file will be assigned accordingly to the campaign properties.
CSV File Template
When the CSV file is ready, go to the detailed campaign view and click on the Import CSV file in the right-corner menu.
Upload the CSV file with your gift card codes.
Go to the Map Fields tab to map data from your CSV columns to Voucherfy fields.
On the left-hand side, you can see the name of CSV column that needs to be mapped to a field from a Select property list. After selecting the matching field, choose the plus to confirm the column mapping.
When all CSV columns are mapped, click Import to confirm. You'll be notified when the import is done.
New gift card codes will be visible in the Vouchers tab in the detailed campaign view.
Loyalty Cards Import
You can import digital loyalty cards with their current score. If you don't have a loyalty campaign for your codes yet, create a loyalty program first. Then, prepare your CSV file. While adding loyalty cards to the existing campaign, your CSV file can contain the following data:
- Required attribute:
- Code (the unique loyalty card code)
- Optional attributes:
- Active (use TRUE or FALSE to enable or disable the loyalty card; this flag can be used to turn off the ability to redeem a loyalty card even though it is within the campaign's start/end validity timeframe)
- Loyalty Points (the number of points to be added to the loyalty card. If you leave this undefined, the initial number of points will be set according to the campaign settings. Note that this option works only for the newly added loyalty cards. If the card existed before, the update of points is not possible this way - the balance put in the CSV file will be ignored. However, there is a dedicated API endpoint for adding points, so you can use it to implement changes)
- Category (a custom tag for the loyalty card to help you filter codes)
- Custom_metadata_property (any additional data that you would like to store for the given loyalty card as a Custom attribute. Remember to define the metadata schema in the Dashboard before importing codes)
The remaining code attributes unlisted in the import file will be assigned accordingly to the loyalty program settings.
CSV File Template
When the CSV file is ready, go to the detailed campaign view and click Import CSV file in the right-corner menu.
Upload the CSV file with your loyalty codes.
Go to the Map Fields tab to map data from your CSV columns to Voucherify fields.
On the left-hand side, you can see the name of CSV column that needs to be mapped to a field from a Select property list. After selecting the matching field, choose the plus to confirm column mapping.
When all CSV columns are mapped, click Import to confirm. You'll be notified when the import is done.
New loyalty codes will be visible in the Loyalty Cards tab in the detailed campaign view.