Batch Discount Codes
Overview
Batch Discount Codes allow you to create a single template with unified discount rules and automatically generate thousands of unique discount codes. This feature is perfect for targeted marketing campaigns, partner distributions, and large-scale promotional events.Key Features
- Template-Based Management: One template contains all discount rules, and all generated codes share the same rules
- Bulk Generation: Generate up to 10,000 unique discount codes at once
- Automatic Uniqueness: Each generated code is automatically unique and prevents duplicates
- Rule Inheritance: All codes automatically inherit discount rules from the template
- Usage Tracking: Track the usage status, user, and time for each individual code
- Flexible Expansion: Increase the template quantity after activation to generate additional codes
Use Cases
- Targeted Marketing: Send unique discount codes to 1,000 specific users via email, preventing code sharing or abuse
- Partner Distribution: Pre-generate 500 codes for partners to distribute as physical coupons
- Large-Scale Campaigns: Create massive promotional events with thousands of one-time-use codes
- Controlled Distribution: Generate a fixed number of codes to ensure campaign scale is manageable
Creating a Batch Discount Code Template
To create a batch discount code template:- Navigate to the Discount Code section in the UniBee Dashboard
- Click New Batch Discount or Create Batch Template
- Configure the template settings
Template Configuration
When creating a batch template, you’ll define:| Field | Description | Example |
|---|---|---|
| Batch Name | An internal name for tracking the campaign | 2025 Spring VIP Campaign |
| Code Prefix | The prefix for all generated codes (must be unique at merchant level) | VIP2025 |
| Target Quantity | The number of unique codes to generate (1-10,000) | 1000 |
| Discount Type | Percentage or Fixed Amount discount | 20% off or $10.00 off |
| Applies to | All Products or Specific Products/Plans | Premium Plan - Yearly |
| Valid Date | Start and expiration dates for the campaign | Jan 1st to Mar 31st |
| Duration | One-time, Forever, or Repeating (with cycle limit) | One-time or 3 cycles |
Configuration Rules
- Code Prefix: Must be 1-20 characters and unique at your merchant level
- Quantity: Can be set between 1 and 10,000 codes
- Discount Rules: Same configuration options as standard discount codes
- Advanced Settings: All advanced configuration options (scope, subscription limits, etc.) are available
Activating and Generating Codes
Step 1: Activate the Template
- While the template status is Editing, you can modify any settings
- Click the Activate button to activate the template
- Once activated, the template status changes to Active
Step 2: Generate Codes
Once the template is activated, you can generate codes using one of two methods:Method A: Automatic Generation
- Click Generate Codes on the template detail page
- The system automatically generates unique codes based on the target quantity
- Codes are formatted as:
{CodePrefix}{8RandomCharacters}- Example:
VIP2025A3B7C9D2
- Example:
- Codes are automatically checked for uniqueness
- Generation process may take a few moments for large quantities
- If generation is interrupted, you can retry - the system will only generate missing codes
Method B: Import Custom Codes
If you need to import specific discount codes (e.g., from another system or partner-provided codes):- Click Import Codes on the template detail page
- Prepare an Excel file with the following columns:
- Code: The discount code (can be any format, must be unique)
- TemplateCode: The code prefix of your template
- Upload the file and wait for processing
- Check the import result file for any errors
- Codes can be in any format (no restriction)
- Each code must be unique at your merchant level
- Template must be in Active status
- Import result file will show success/failure status for each code
Managing Batch Templates
Viewing Templates
You can view all batch templates in the Discount Code section:- Status Filter: Filter by Editing, Active, Inactive, or Archived
- Search: Search by batch name or code prefix
- Statistics: View total quantity, generated count, used count, and available count
Editing Templates
Before Activation (Editing Status):- You can modify all settings including quantity (increase or decrease)
- Quantity can only be increased (for expansion)
- Quantity cannot be reduced below the number of already generated codes
- Discount rules and other settings can still be modified (changes apply to all codes)
Expanding Template Quantity
If you need to generate more codes after activation:- Click Edit on the template
- Increase the Target Quantity (e.g., from 1,000 to 1,500)
- Save the changes
- Click Generate Codes again
- The system automatically generates only the additional codes needed
Deactivating Templates
- Click Deactivate to disable the template
- All unused codes immediately become invalid
- Already used codes are not affected
- You can reactivate the template later to restore unused codes
Archiving Templates
- Click Archive when the campaign is complete
- Archived templates cannot be edited or reactivated
- This helps organize completed campaigns
Managing Individual Codes
Viewing Code List
- Open a batch template detail page
- Navigate to the Codes tab
- View the list of all generated codes with:
- Code: The actual discount code
- Status: Available or Redeemed
- Used By: User email (if redeemed)
- Used At: Date and time of redemption (if redeemed)
- Created At: Code creation time
Filtering and Searching
- Status Filter: Filter by Available or Redeemed
- Code Search: Search for specific codes
- Pagination: Navigate through large code lists
Exporting Codes
You can export the code list with usage details:- Click Export on the codes list page
- Select export format (Excel or CSV)
- Choose export options:
- Export all codes or filtered codes
- Include usage details (user, date, invoice, subscription)
- Download the file from the Tasks section when ready
- Code information
- Usage status and details
- User information (email)
- Related invoices and subscriptions
- Discount rule information
- Creation and usage timestamps
Viewing Code Usage
Individual Code Details
- Click on any code in the list to view details
- See complete information including:
- Code and parent template
- Current status
- Usage information (if redeemed)
- Related invoice, subscription, and payment
- Discount rules inherited from template
Batch Usage Statistics
On the template detail page, you can see:- Total Quantity: Target number of codes
- Generated Count: Number of codes created
- Used Count: Number of codes redeemed
- Available Count: Number of unused codes
Usage Tracking
Track detailed usage information for each code:- User Information: Who used the code (email address)
- Usage Time: When the code was redeemed
- Related Transactions: Invoice ID, Subscription ID, Payment ID
- Discount Applied: Actual discount amount or percentage applied
Best Practices
Planning Your Campaign
- Choose Meaningful Prefixes: Use clear, identifiable code prefixes (e.g.,
VIP2025,SPRING2025) - Estimate Quantity: Plan the number of codes needed, but remember you can expand later if needed
- Set Clear Expiration: Ensure validity dates align with your campaign timeline
Code Distribution
- Secure Distribution: Send unique codes directly to intended users to prevent sharing
- Track Sources: Use different batch templates for different distribution channels
- Monitor Usage: Regularly check usage statistics to track campaign performance
Template Management
- Activate Promptly: Create and activate templates before you need to distribute codes
- Expand as Needed: Start with a smaller quantity and expand if the campaign is successful
- Archive Completed: Archive finished campaigns to keep your dashboard organized
Performance Considerations
- Batch Size: For very large campaigns (5,000+ codes), consider generating in phases
- Export Timing: Use export features during off-peak hours for large datasets
- Regular Monitoring: Check usage regularly but avoid excessive real-time monitoring
Frequently Asked Questions
Q: Can I change the discount rules for individual codes?
A: No. All codes in a batch inherit rules from the template. To change rules, edit the template - all codes will inherit the new rules (already used codes are not affected).Q: What happens if I need more codes than originally planned?
A: You can expand the template quantity after activation. Simply increase the target quantity and generate additional codes. The system will only create the new codes needed.Q: Can I reduce the quantity after codes are generated?
A: After activation, you cannot reduce the quantity below the number of already generated codes. Before activation, you can freely adjust the quantity.Q: How many codes can I generate in one batch?
A: You can generate up to 10,000 codes per template. For larger campaigns, create multiple templates.Q: Can I import codes that don’t start with the template prefix?
A: Yes. Imported codes can be in any format. They just need to be unique and linked to the template via the TemplateCode field in the import file.Q: What happens to unused codes when I deactivate a template?
A: All unused codes become invalid immediately. Already used codes are not affected. You can reactivate the template to restore unused codes.Q: Can I delete a batch template?
A: Templates cannot be deleted to prevent accidental loss of data. Instead, archive the template when no longer needed.Q: How long does it take to generate codes?
A: Generation time depends on quantity:- 100 codes: Almost instant
- 1,000 codes: A few seconds
- 10,000 codes: About 20 seconds

