Setting Up Bulk Discount Codes for a Discount Code Campaign
You can create a discount code campaign with a single code or thousands of unique codes. SHOPLINE supports both bulk auto-generation and bulk import, making it easy to run large-scale promotional activities.
This article explains how to bulk generate or import discount codes when creating a campaign, how to import additional codes later, and important rules to understand when working with large batches of discount codes.
Creating a Discount Code Campaign With Bulk Codes
Follow these steps to create a new campaign and add bulk discount codes:
- From your SHOPLINE admin panel, go to Discounts and click Create a discount.
- In the pop-up window, select a discount category.
-
On the settings page, choose Discount code as the discount type.
-
Next to the Discount code field, click the more icon (…) and choose Bulk generate or Import.
Notes:
- When creating a campaign, you can generate up to 10,000 discount codes in bulk or import up to 5,000 discount codes.
- To add more codes after the campaign is created, use bulk generation or import. The same limits apply to each subsequent operation.
- A single campaign can contain up to 50,000 discount codes.
- Bulk generate: The system will generate unique discount codes based on the quantity you specify.
-
Import: Download the default import template, fill in your discount code details, and upload the completed file.
Notes:
- After uploading, the system will automatically detect how many codes can be successfully imported and how many will be excluded due to duplicates or formatting errors.
- The import template includes an example in Row 2, but the system always begins reading data from Row 3; therefore, always enter your actual discount codes starting from Row 3.
-
Click Generate or Import to start processing the discount codes. A progress notification will appear on the right side of the page. If you import more than 500 codes, go to Profile icon > Bulk processing to view detailed progress.
Important: If you are adding codes using the Import option, do not edit or delete the campaign during the import. Doing so will cause the import to fail, and the file cannot be used in any other campaign. - After all codes are added successfully, continue configuring the campaign. For detailed campaign settings, refer to articles in the "Setting Up Automatic Discounts" section.
Adding Additional Codes to an Existing Campaign
If you need to issue additional discount codes—for example, for a new influencer campaign, an extended promotion period, or more one-time offers—you can add codes to an existing campaign through bulk generation or import without creating a new campaign. Follow these steps:
- From your SHOPLINE admin panel, go to Discounts and select the discount code campaign you want to update.
-
In the basic campaign settings at the top, click View all.
-
At the top of the discount code list, choose one of the following methods to add discount codes:
- Bulk generate discount codes: Generate new random discount codes.
- Import: Upload a completed import file.
-
In the pop-up window, complete the settings based on your selected method:
- Bulk generate discount codes: Enter the number of codes you want to generate in Discount code quantity. To add the same prefix to all generated codes, enter 1–6 characters in Discount code prefix (optional). If left blank, the codes will be generated randomly.
-
Import discount codes: Click Import template to download the template and enter your discount codes as required. Then click the upload area to select the completed file, or drag and drop the file into the area.
Notes:
- Import files must be in .xlsx, .xls, or .csv format and no larger than 10 MB.
- The import template includes an example in Row 2, but the system reads data only from Row 3, so always enter all discount codes starting from Row 3.
- Upon file upload, the system will automatically detect any duplicate or invalid codes and exclude them.
-
Click Generate or Import to start processing the codes. A progress notification appears on the right side of the page.
Important: Important: Do not edit or delete the campaign while the task is being processed. Doing so will cause the task to fail. - Once the task is complete, you can view the successfully added discount codes in the discount code list. For codes added using Import, refer to "Viewing the Import Results" to check the import task results.
Important Rules and System Behavior for Bulk Code Creation
The following rules apply to both bulk generation and bulk import, including when initially creating a campaign and adding more codes to an existing campaign.
General Rules
- Supported campaign types: This feature is only available for campaigns created under Discounts in the SHOPLINE admin panel that contain multiple discount codes. Campaigns created through APIs or third-party apps don't support bulk generation or import.
- Limit per operation: You can generate up to 10,000 discount codes at a time or import up to 5,000 codes at a time. Avoid performing multiple operations simultaneously in different windows, as this may cause processing to fail.
- Campaign limit: A single campaign can contain up to 50,000 discount codes. Once this limit is reached, you can no longer add codes through bulk generation or import.
- Concurrent task limit: Only one discount code generation or import task can run at a time for the same store. If a task is already in progress and you submit another generation or import task that reaches the asynchronous processing threshold, the system prevents the task from being submitted and prompts you to try again later.
Bulk Generation Rules
- Permission requirements: Only admins with permission to edit the campaign can view and use Bulk generate discount codes.
- Discount code uniqueness: Randomly generated discount codes are checked for uniqueness. Even if a code has been deleted, it remains subject to the uniqueness check and cannot be generated again or added through import.
- When the campaign limit is reached: Once a campaign contains 50,000 discount codes, the remaining quantity available for generation is shown as 0 when you click Bulk generate discount codes, and no additional codes can be generated.
Bulk Import Rules
- File usage restrictions: Once an import file has been used for a specific campaign, it cannot be used for another campaign unless the original campaign containing those discount codes has been deleted.
- When the campaign limit is reached: Once a campaign contains 50,000 discount codes, the Import button is no longer displayed on the discount code list page.
Viewing the Import Results
If you choose to create discount codes in bulk by importing them, the page displays the number of discount codes imported during the process. Once the file has been processed, follow the steps below to view the import results:
-
Click your profile icon in the upper-right corner and select Bulk processing.
-
From the list, locate and review your import task:
-
If all codes imported successfully, only an All records button will appear in the Export column.
Note: Failed imports will not be highlighted in All records. Please refer to Failed records to review them. - If some codes failed, a Failure history button will appear. Click it to download a file that shows which codes were not imported properly.
-