Using unique codes in emails
A code list gives each entrant a different code, such as a coupon or prize code, in their email or Instant Win result. Upload your codes as a CSV, attach the list to an email, and insert the Prize Code merge field. Codes go out in list order unless you randomize them. Code lists are included in the Scale plan and higher.
Which kind of code you need
When you set up an email, the codes step offers three choices.
| Choice | What each entrant gets | Use it when |
|---|---|---|
| One Code | The same code as everyone else | You have one discount code for everyone, such as SAVE10. |
| Instant Win | Their win or lose result, and their prize code if they won | Your campaign uses Instant Win. |
| Code List | A different code from a list you upload | Each person needs their own code, such as a one-time coupon or a prize voucher. |
Before you start
- Plan: code lists are included in the Scale plan and higher. Compare plans.
- Code length: each code must be 256 characters or fewer.
- Order: codes go out in the order they appear in your file, unless you randomize them when you upload.
- Reusing a code: to give the same code to more than one person, repeat the code in your list as many times as you want it to be used.
- Instant Win: turn on and set up Instant Win in your campaign before you build the email. See Instant Win.
Upload a code list
- Go to Code Lists and click New Code List.
- Download a template. The Simple Template has one column,
code, and suits most lists. The Advanced Template adds columns for more prize details. - Open the template in a spreadsheet program such as Google Sheets or Excel, add your codes under the headers, and save it as a
.csvfile. - Drag your file into the upload window, or click Select to find it.
- Name the list, and tick Randomize the order if codes shouldn't go out in file order.
- Click Save & Upload, then Continue when the upload finishes.
Your list now appears in the Code Lists Manager. You can also upload a list while you set up an email, with New Code List on the codes step.
Add codes to your email
- Start the email in the Emails Manager, or from the envelope icon in the Campaign Builder. See Creating autoresponder emails.
- On the codes step, choose One Code, Instant Win or Code List.
- For Code List, click Connect Code List, select your list (or upload one with New Code List), click Select, then Continue.
- In the email designer, put your cursor where the code should appear and click Prize Code, which inserts
{{ entry.prize_codes }}. For One Code, type the code into the email instead. - Send a test, then save and activate the email.
Showing a QR code
To give entrants their code as a QR code, add a link whose URL is the Prize Code URL merge field, {{entry.prize_code_qrcode_url}}. The link opens a page with only the QR code, ready to scan at a till.
Showing different messages to winners and non-winners
For Instant Win, wrap each message in Liquid Markup so winners and non-winners read different text:
{% if entry.instant_winner %}
You won! Your prize code: {{ entry.prize_codes }}
{% else %}
Thanks for playing! No win this time.
{% endif %}
Thanks for entering.
Anything after {% endif %} shows to everyone. See Using Liquid Markup in emails for more examples.
Find which code an entrant got
- Open the Entries Manager for the list.
- Hover over the entry and click View Details.
- The code appears next to the trophy icon.
If something goes wrong
| What you see | What to do |
|---|---|
| The prize code is blank in the email | Check the email's codes step is set to Code List or Instant Win, and that a code list is connected. For Instant Win, non-winners have no code, so show the code only inside the winners' message. |
The code shows as {{ entry.prize_codes }} text | The merge field was edited by hand. Delete it and click Prize Code to insert it again. |
| Codes aren't going out in file order | The list was uploaded with Randomize the order ticked. Upload it again without it if order matters. |
For more, see Troubleshooting emails.
FAQs
Can I give the same code to more than one entrant?
Yes. Repeat the code in your list as many times as you want it to be used. To give everyone the same code, choose One Code in the email instead of a code list.
Does deleting a code list delete my entries?
No. Deleting a code list removes the list permanently, and your entries stay as they are.
Can I control the order codes are given out?
Yes. Codes go out in the order they appear in your file. To mix them up, tick Randomize the order when you upload the list.
Related resources
Was this helpful?
Thanks — that helps us decide what to fix next.
Sorry this missed. Tell us what you needed and we'll get you an answer — and fix the page.