How to create a promo code

A promo code system is used for loyalty programs in the Altcraft Platform. In this article we will tell you how to create one.

In the main menu, select «Loyalty», and then click «Create» on the top toolbar.

Step 1. General settings

  1. Enter the name of the program and briefly describe it. Set access groups.

Promo code general settings

  1. Specify a short name for a promo code

You can send your promo code to the customer in an email, SMS message or push notification. In most cases, each subscriber has their own promo code, so it will be difficult to type it in each email manually. To avoid doing this, just use a variable in the template editor.

You must specify the name of the variable at the stage of creating a promo code — enter any word in the «Template name» field. Don't use a space, if you need to separate words, enter an underscore.

To add a variable to the email template, go to the message editor and click on the </> icon. Select the «Promo code» section, and then find the desired variable.

Another way to add a promo code to your email is to enter {} manually, where «name» is the template name:

Promo code short name in the template

  1. Set the validity period

Specify the period during which you are allowed to create and send promo codes in newsletters or using scenarios. Set the date range and click «Apply»:

Setting the validity period

Even if the validity period has ended, the customer will still be able to use the promo code already sent. However, you won't be able to create and send new promo codes using this loyalty program.

Step 2. Select a way to create promo codes

If you don't have a ready-made file with promo codes, you can create them in the platform. You have two options:

  • Generate promo codes in the platform using a template;
  • Make a request to a remote service that will create a promo code on your side.

1. Generate using a template

Click on the </> and select a unique combination of characters in the drop-down list. You can add your own characters to the template.

For example, the combination {string 4}-{number 4}-{upstring 4} will create the following promo code: smFg-2497-DMPB.

2. Use a remote service

To make a request to an external service, specify the URL of this service and the maximum number of promo codes in one request.

Using a remote service to create promotional codes

The POST request with JSON data is used, the format is strictly defined.

Step 3. Set up promo codes

Configure the loyalty program for your business logic in the «Promo code settings» section:

Promo code settings

Scenario can create promo codesAllow automation scenarios to generate promo codes using a template. In scenario, you need to add a step Promo code. In this case, you don't have to generate promo codes by your own.
Campaign can create promo codesAllow campaigns to generate promo codes using a template. If you send a message, the template of which contains the variable of the loyalty program, to the customer, a new promo code will be generated and sent. In this case, you don't have to generate promo codes by your own.
One promo code can be attached to multiple profilesYou can use one promo code for a group of customers. In this case, the campaign or scenario will give the first active promo code of the loyalty program.
Automatically link promo codes to profileWhen you generate promo codes or import them from a file, the platform will automatically attach them to certain profiles.
The maximum number of promo codesSpecify the total possible number of promo codes in the loyalty program.
Time to liveSet the validity period of the loyalty program promo codes. Once it is over, the code is considered expired and cannot be attached, sent or activated.

The lifetime of a promo code may be longer than the validity period of the loyalty program. When the loyalty program expires, a promo code cannot be sent to customers. However, if you have already sent the promo code to your customer, they will be able to use it until it expires (lifetime).

Save changes to start generating promo codes. Once you've saved them, you will see the generation, import, export and view buttons:

Saving changes to start the process of generating promotional codes

Step 4. Generate promo codes

Click on the «Generate» button to create promo codes using the template you specified above. You will see a new window. Specify the number of promo codes you want to create there. Enter the number and click «Generate»:

Generate promo codes using a template

The promo codes will immediately be displayed in the interface.

Adding promo codes from a file

If you already have a file with a list of promo codes, you can add them to the loyalty program. Click on the «Import from file» button and upload a column file (in CSV or XLS format) with promo codes. Select a column with promo codes, and then start import using the button at the top of the page:

Importing promo codes form a file

Viewing created promo codes

Click the «Browse» button to open a list of promo codes created in the loyalty program. You will see brief information about each one. Any promo code from the list can be deleted manually:

Viewing promo codes

Export to file

If you want to download information about promo codes, click on the «Export to file» button. You can download not only promo codes, but also data from the fields of those subscribers who received these promo codes. Select the fields from the drop-down menu and click OK. You will receive data in a CSV file:

Promo code export

Custom fields

Additional fields are requested during generation. They will be sent to an external service if it is used. If necessary, these fields can be saved to a promo code. If an external service returns fields with the same names, they will be updated in the promo code.

Custom data fields


Now you know how to work with promo codes. It's not as difficult as it may seem. Upload a ready-made list of promo codes from a file or generate promo codes in the platform if you are just starting to create your loyalty program.

You may be interested