Managing Dynamic Discount Codes in SmartPush

SmartPush
SmartPush
  • Updated

Static discount codes, such as WELCOME10, provide the same code to every customer. While simple to use, these codes can be easily shared, resulting in unintended redemptions, higher promotion costs, and less accurate campaign performance tracking.

Dynamic discount codes address these challenges by assigning each recipient a unique, one-time-use code from a pre-uploaded code pool. This helps keep promotions exclusive, reduces code sharing, and improves attribution accuracy when measuring campaign performance.

This guide explains how to create a discount code collection, add codes to an existing collection, use dynamic discount codes in your email campaigns, and manage your discount code library.


Creating a Discount Code Collection

Before you can use dynamic discount codes in an email, you need to create a collection and upload your codes. To create a new discount code collection:

  1. In your SHOPLINE admin panel, go to SmartPush > Settings > Activity Settings > Dynamic discount codes.
  2. Click Create set and fill in the following collection settings:
  • Set name: Enter a name for this code collection. This name is used to identify the collection when you select it in the email editor.
  • Expiry Date: Set the date when the codes in this collection expire. Dates are based on your store’s timezone.
  • Low Stock Alert: Enter a threshold number. When the number of available codes in this collection drops to or below this number, SmartPush will automatically send an alert email to your store owner’s registered email address. You can update this setting after creation.
  • Fallback Strategy: Choose what happens if your collection runs out of codes during a campaign send. You can update this setting after creation.
    • Use a static fallback code: Enter a fixed discount code (e.g., FALLBACK10). When no unique codes remain, every recipient gets this static code instead.
    • Stop sending the discount block: The discount code block is hidden, but the rest of the email is still sent.
  1. Click Import codes to upload your discount code file.

Notes:

  • Discount codes currently support only letters and numbers. Special characters are not supported. If an uploaded discount code contains special characters, that code will be skipped and will not be imported.
  • Supported file formats: .csv, .xlsx, .xls. Your file must have a single column, with codes starting from row 2 (row 1 is the header). Each upload can contain between 100 and 50,000 codes.
  1. Click Import to create the collection.
Note: Once created, you can still edit the Low Stock Alert threshold and Fallback Strategy at any time. Collection name and expiry date are permanent and cannot be modified.

Adding More Codes to an Existing Collection

If a collection is running low or you want to top up its code pool, you can upload additional codes at any time. To add codes to an existing collection:

  1. Go to SmartPush > Settings > Activity Settings > Dynamic discount codes.
  2. Find the collection you want to update and click Upload in the Actions column.
  3. Upload a new file following the same format requirements (single column, codes starting from row 2, 100–50,000 codes per upload).
  4. After the upload completes, you'll see a confirmation showing how many codes were successfully added and how many were skipped as duplicates.
Note: Duplicate detection is case-insensitive across all previous uploads in the same collection — for example, "ABC" and "abc" are treated as the same code. Any duplicates are automatically skipped. The display format of your codes is never changed.

 


Using Dynamic Discount Codes in an Email

Once you have a discount code collection set up, you can add a dynamic discount code block to any SmartPush email campaign. To add a dynamic discount code to an email:

  1. Open your email campaign in the SmartPush email editor.
  2. In the content blocks panel, add or select a Discount Code block.
  3. In the block settings, select Dynamic Discount Code as the discount type.
  4. From the dropdown, choose the collection you want to use. The dropdown shows each collection's name, available code count, total code count, expiry date, and creation date.
  5. In the email preview, the discount code will appear as a placeholder in the format [Collection Name]_PREVIEW — for example, SUMMER_SALE_PREVIEW. Each recipient will receive their own unique code when the email is sent.
Tip: Before sending, check that your selected collection has enough available codes for your intended recipient count. You can see the available count in the collection dropdown.

Managing Your Discount Code Collections

The Discount Code Library gives you a full overview of all your collections and their status. To view and manage your collections:

  1. Go to SmartPush > Settings > Activity Settings > Dynamic discount codes.
  2. Each collection in the library displays the following information:
  • Name: The collection's identifier as entered at creation.
  • Available / Total Codes: The number of codes that have not yet been assigned, out of the total number imported.
  • Expiry Date: The date after which codes in this collection are no longer valid.
  • Created Date: When the collection was first created.
  • Last Uploaded: The most recent date that new codes were added to the collection.
  • Actions: Upload (to add more codes) and Edit (to update the Low Stock Alert threshold or Fallback Strategy).

When you click into a collection, you can also view the full import history, which shows each upload's filename, status, number of rows in the uploaded file, number of codes actually added, upload time, and the user who performed the upload.


Important Notes for Dynamic Discount Codes

  • File format requirements: Uploaded files must be .csv, .xlsx, or .xls format. The file must contain exactly one column, with codes starting from row 2. Row 1 is treated as a header and is not imported.
  • Import quantity per upload: Each upload must contain between 100 and 50,000 codes.
  • Deduplication is automatic: Codes are deduplicated across all uploads in the same collection. Duplicate detection is case-insensitive (e.g., "ABC" and "abc" are treated as the same code). Duplicates are skipped automatically; the display format of your original codes is never altered.
  • One code per recipient: Each recipient in a campaign receives exactly one unique code, assigned in order from the collection.
  • Low stock alerts: An alert email is sent to all the store registered email addresses when available codes drop to or below the threshold — this check runs at send time, after each upload, and whenever the threshold value is changed.
  • Collection name and expiry date are permanent: These settings cannot be changed after the collection is created. Low Stock Alert and Fallback Strategy can be edited at any time.
  • Fallback behavior applies per campaign send: If codes run out mid-send, the fallback strategy you configured takes effect for all remaining recipients in that send.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request