Skip to main content
If you need to share codes from other sources with Voucherify, you can handle this scenario using the Import CSV tool in the Dashboard. The tool enables you to import:
  • Generic coupons
  • New unique coupons to a campaign.
  • Existing coupons to update them.
When importing codes to a campaign, the system applies two simultaneous limits for the import file:
  • Code count limit: Up to 100,000 codes.
  • File size limit: Up to 10 MB CSV file size.
The import will stop when whichever limit hits first.Note that 100,000 codes is the overall campaign code limit. If the campaign already contains codes (e.g., 50,000 codes), only the remaining capacity (e.g., 50,000 codes) will be imported to maintain the 100,000 total code limit.
Important
  • 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 code metadata. The number of custom attributes you can import as metadata is unlimited.
  • You cannot import two identical codes to a single Voucherify project.
  • When importing existing incentives (discount coupons, referral codes, loyalty cards, or gift cards) into a campaign, only two fields can be updated: the active status (true/false) and the category. All other attributes remain unchanged.

Preparing CSV file for generic coupons

To import generic coupons, prepare a CSV file with your codes and define columns as follows:
  • Required:
    • Code (the unique discount code)
    • Voucher Type (text: DISCOUNT_VOUCHER)
    • Value (an integer value - number)
    • Discount Type (text: AMOUNT, PERCENT, FIXED, or UNIT)
  • Optional:
    • Discount effect defines how the discount is applied. The values are:
      • APPLY_TO_ORDER
      • APPLY_TO_ITEMS
      • APPLY_TO_ITEMS_PROPORTIONALLY
      • APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY
      • APPLY_TO_ITEMS_BY_QUANTITY
    For effects that contain _ITEMS_, a validation rule is required — without it, the product won’t be assigned to the discount.The ADD_MISSING_ITEMS, ADD_NEW_ITEMS, ADD_MANY_ITEMS, and REPLACE_ITEMS effects are not supported.
    • Validation rule ID
    • Category
    • Active (values: TRUE or FALSE)
    • Start date
    • Expiration date
    • Redeemed quantity
    • Redeemed amount
    • Redemption limit
    • Additional info
    • Formula
Fields other than the ones listed above will not be imported. Even if you provide them, they will be skipped.CSV generic coupon file template
These codes will function as standalone discount coupons, independent of a campaign.

Import generic coupons

Go to Campaign hub > Campaigns and Import CSV.
Webhook sendout prerequisiteWhile importing, you can additionally select the checkbox to Create a webhook sendout for the vouchers created and updated during the import. This triggers a Voucher created or Voucher updated webhook when the coupons are processed.To enable webhook sendout during the voucher import, first configure webhooks in Project settings > Webhooks. Select the voucher.created and voucher.updated events for the sendout to work.Read Project settings webhooks to learn more about configuring webhooks.
1

Upload CSV file

Upload your prepared CSV file.Once uploaded, you’ll see an overview of first rows and columns of the file.
2

Map fields

In Map Fields, select for each CSV column:
  • Do not map to skip that column.
  • Voucherify fields to Select Voucherify properties, like Code, Voucher type, and so on.
  • Metadata (Schema) to map a given column to custom attributes that are defined for vouchers.
  • Metadata (Unknown) to map to an undefined custom attribute key.
3

Complete the import

Once ready, Import and wait for notification when the import is complete.
For large imports, the process can take a significant amount of time.

Preparing CSV file for campaign discount coupons

Import coupons to campaign prerequisiteIf you don’t have a campaign for your codes yet, create a discount coupon campaign first.
When adding vouchers to an existing campaign, the CSV should have the following columns:
  • Required:
    • Code
  • Optional:
    • Active (values: TRUE or FALSE)
    • Category
    • Redeemed quantity
    • Start date
    • Expiration date
    • Custom metadata fields
Fields other than the ones listed above will not be imported. Even if you provide them, they will be skipped.CSV discount coupon file template
All unmapped attributes will inherit the campaign’s default settings as well as validation rules, time frame, redemption limits, and so on.

Import behavior for selected attributes

Some of the attributes work as follows when imported:
  • Active:
    • If the campaign is Active and the active field is omitted in the CSV, the active attribute for the imported vouchers is set to TRUE.
    • If the campaign is Expired and the active field is omitted in the CSV, the active attribute for the imported vouchers is set to FALSE.
  • Metadata:
    • If metadata is omitted, the voucher inherits the campaign’s metadata.
    • If metadata columns are added, the mapped metadata only overrides those specific fields.

Import discount coupons to a campaign

In Campaign hub > Campaigns, go to the discount campaign where you want to import the coupons. In the top right corner, use the three-dot menu to Import CSV file.
1

Upload CSV file

Upload your prepared CSV file.Once uploaded, you’ll see an overview of first rows and columns of the file.
2

Map fields

In Map Fields, select for each CSV column:
  • Do not map to skip that column.
  • Voucherify fields to Select Voucherify properties, like Code, Voucher type, and so on.
  • Metadata (Schema) to map a given column to custom attributes that are defined for vouchers.
  • Metadata (Unknown) to map to an undefined custom attribute key.
3

Complete the import

Once ready, Import and wait for notification when the import is complete.
For large imports, the process can take a significant amount of time.