Promotion Codes

Here is a sample:

  • Allows you to send unique promotion codes to contacts
  • Great for abandoned basket or re-engagement campaigns
  • Allocated promotion codes are fully tracked
  • Easy to import new codes
  • Original code stays assigned to contact for follow-up campaigns
  • Warnings when codes are running low
This feature allows users to upload lists of promotion codes, which can then be included in campaigns. Contacts are assigned a unique code at launch, allocated codes are tracked for auditing and previously-assigned codes can be re-sent in followup or reminder campaigns. Codes can be imported directly into Adestra, using a CSV like you would with other data, and are then called using template functions in a campaign—making it a simple but effective system for increasing engagement and conversions.

On this page:

Creating a Promotion

You can find the Promotion Codes tab under Data, within a workspace. From here you can click 'Create Promotion' to begin the initial setup.

You will be asked for:

  • Promotion Name: something easily identifiable to be used as the name of your promotion
  • Brand: who the promotion is associated with
  • Notification Threshold: when the available promotion codes falls below this value you will be notified
  • User Group: (optional) selected user group will receive threshold notifications

Importing Promotion Codes

To import the promotion codes you need to go to the 'Import' tab. The size of your data will affect the time your import will take.

  • Promotion Code List File: select the CSV file (or upload one if necessary) of promotion codes from the file manager pop-up
  • Field Mapping: should the first line of your CSV include a header you must tick the "Treat the first line of the list as a Header" box, as this will then discount the first row of your CSV
  • Character Encoding: if your data uses UTF-8 characters you will need to change the 'Character Encoding' detection, however if not using UTF-8 'Auto Detect' will suffice
  • Removing the file after import: this is on by default. Should you want to limit access to the import data this option should be used, as it will delete the CSV from the File Manager once the import is completed

Promotion Code Management

When the import has been completed the number of available and assigned codes will have visible in the overview.

Available Codes

The Available Codes tab shows the codes that are unassigned.

Assigned Codes

Assigned Codes will display the codes associated to a contact and the contact themselves.

Using the Promotion

In order to use the promotion in your campaign, you need to indicate where the promotion code should be displayed. The simplest implementation of this is:

Copy
contact.promotion(<promotion_id>).get_code

<promotion_id> is the ID of your promotion, which can be found in your promotion's overview.

However, complete implementations need to take into account some other factors, such as the kind of campaign being sent.

Note: Promotion codes are not available when testing, as they are assigned at campaign launch.

Promotion Object

The promotion object has the following methods:

  • get_code: looks up any existing code for the contact and returns it or allocates one if there isn't
  • has_available_codes: this returns true if there are any codes still available for the promotion
  • get_code_for_campaign(<campaign_id>): looks up any existing code for the contact, for the given campaign, and returns it—if it exists. It does not allocate a new code on that campaign

Managing Code Depletion

By default, an error will be thrown if there are no codes available, so your campaign will stop sending once the codes have depleted. However, this isn't always the desired behaviour, which is why the has_availble_codes method is available—to allow developers better control, in that instance, by setting a default promotion code.

Here's an example of setting a default promotion code:

Copy

Dear [* data('first_name') *]

Why not have some Free Shipping on us?

[* promotion = contact.promotion(1) *]

[* IF promotion.has_available_codes *]
    [* code = promotion.get_code *]
[* ELSE *]
    [* code = 'FREESHIPPING' *]
[* END *]


Your exclusive code is: [* code *]

Which returns:

Copy

Dear FirstName

Why not have some Free Shipping on us? 

Your exclusive code is: FREESHIP1234

Resending Codes

The promotion codes system will generate a new code for each contact in each campaign, so sending multiple campaigns to the same contact will give them new codes each launch.

The get_code_for_campaign(<campaign_id>) method will allow you to access a code already associated in a different campaign. This can be used for things like follow up campaigns or promo code reminders.

Copy

Dear [* data('first_name') *]

You still have time to get aboard with some Free Shipping!

[* promotion = contact.promotion(2) *]

[* code = promotion.get_code_for_campaign(<campaign_id>); *]
[* UNLESS code *]
    [* IF promotion.has_available_codes *]
        [* code = promotion.get_code *]
    [* ELSE *]
        [* code = 'FREESHIPPING' *]
    [* END *]
[* END*]

Your exclusive code is: [* code *]

Which returns:

Copy
Dear FirstName

All aboard! 

Your exclusive code is: FREESHIP1234

Note: Automatic resend to non-opener campaigns will, by default, generate new codes.