How to Generate Unique 3rd-Party Voucher Codes and Upload Them to Pixalink
What Is This?
If you want to give customers unique discount codes, gift cards, or promotional vouchers that work outside Pixalink (for example, at your online store or through a partner platform), you need to prepare a list of random, non-repeating codes first — then upload them to Pixalink so customers receive one automatically when they redeem a reward.
This article walks you through the full process: generating the codes in Excel, then uploading them to your reward.
Real-Life Example
Sarah runs Bloom Bakehouse, a bakery with an online ordering page. She wants to give customers who reach 500 points a unique RM 10 discount code they can use at checkout. She generates 200 unique codes using the Voucher Code Generator, uploads them to her "RM 10 Online Discount" reward in Pixalink, and the system hands out one code automatically each time a customer redeems.
What You Need
- Microsoft Excel (any recent version) or Google Sheets
- The Voucher Code Generator file — Download here
- A reward already set up in Pixalink (see How to Create a Reward if needed)
Part 1: Generate Your Voucher Codes in Excel
Step 1: Download and Open the File
Download the Voucher Code Generator file from the link above and open it in Excel. Go to the Voucher Generator sheet (the first tab).
Step 2: Set Your Prefix
In cell B4 (the yellow highlighted cell), type a short prefix — 3 or 4 uppercase letters that identify this voucher type.
| Voucher Type | Suggested Prefix | Example Code |
|---|---|---|
| Discount | DISC | DISC7K2M9P |
| Gift Card | GIFT | GIFTX4B8N2 |
| Cashback | CASH | CASHM3Q7T5 |
| Free Shipping | SHIP | SHIPK9R2W4 |
| New Member | NEW | NEWP5T8M3 |
| Festive / Seasonal | FEST | FEST2W6K9B |
Use a unique prefix for each campaign. DISC codes can never clash with GIFT codes, so this keeps your different campaigns clearly separated.
The Voucher Code (FULL) column immediately shows finished codes like DISC7K2M9P — no extra setup needed.
Step 3: Generate More Codes
By default, the sheet starts with a set of codes already filled in. To generate more:
- Click the last code cell in column C (Voucher Code FULL).
- Grab the small square at the bottom-right corner of the cell (the fill handle).
- Drag it down as many rows as you need.
Columns B, D, and E fill in automatically.
How many codes should I generate? Generate at least 20–30% more than you expect to need. For example, if you plan to run a campaign for 500 customers, generate 650 codes. Extras remain unused until a customer redeems them.
Step 4: Check for Duplicates
Look at the Duplicate Check column (column E). Every row should display OK.
- If any row turns red and shows DUPLICATE: click any empty cell and press Delete (or press F9) to force a recalculation. Fresh random codes are generated and the duplicate will almost always clear.
- Always check for duplicates before moving to the next step.
With over 1 billion possible combinations in the random part, duplicates are extremely rare — but the check is there as a safety net.
Step 5: Lock Your Codes as Fixed Text (Critical)
The codes are generated by a formula that reshuffles every time Excel recalculates. You must freeze them before saving or sending, or the codes will change.
- Select all finished codes in column C (Voucher Code FULL).
- Press Ctrl + C to copy.
- Right-click on the same cells → choose Paste Special → Values (the clipboard icon with "123").
- The formulas are now permanent text that will never change.
Step 6: Save Your File
Save the file with a clear campaign name, for example: Vouchers_DISC_June2026.xlsx. Keep this file as your master record of all codes issued for this campaign.
Part 2: Export Codes to CSV
Pixalink imports vouchers from a CSV file. Here is how to prepare it:
Step 7: Copy Your Final Codes
In your saved Excel file, select all the locked codes in column C.
Step 8: Create a CSV
- Open a new spreadsheet (or a new sheet in the same file).
- Add a header row with these columns:
| code | expired_at | phone_number |
|---|---|---|
| DISC7K2M9P | 2026-12-31 | (leave blank) |
| DISC4R8WM2 | 2026-12-31 | (leave blank) |
- code — Required. Paste your voucher codes here.
- expired_at — Optional. The date these codes expire (format: YYYY-MM-DD). Leave blank for no expiry.
- phone_number — Optional. Fill this in only if you want to pre-assign a specific code to a specific customer's phone number.
- Save this new sheet as a CSV file (File → Save As → CSV).
Part 3: Upload the Codes to Pixalink
Step 9: Open the Reward in Pixalink
From the Admin Panel sidebar, go to Loyalty Program → Rewards. Click on the reward you want to attach these codes to.
Step 10: Import the CSV
Scroll down to the Reward Vouchers section. Click Import Generic Voucher, upload your CSV file, map the columns, and click Import.
For the full upload walkthrough, see How to Import Third-Party Reward Vouchers.
Good to Know
- One code per customer — Each code is assigned to exactly one customer when they redeem the reward. It cannot be used again.
- Run low on codes? — Repeat this process to generate a new batch and import them. New codes are added to the existing pool.
- Different campaigns, different prefixes — Always use a new prefix for a new campaign. This keeps your records clean and prevents any risk of codes crossing over.
- Keep your master Excel file — It is your record of every code ever generated. If a customer disputes a code, you can look it up.