Přejít k obsahu  Přejít k hlavnímu menu

Blog / Knowledge base

Updated: 27. October 2020

Draw a random discount code

Do you need to draw a random win or a code to gamble popup? Mailocator allows you to easily set the probability to one hundredth of a percent, randomly select a win and deliver it to the email tool.

When to use the winning code draw?

When you wish to select and display a random code or a random win.
In gamification tools, where the amount of winnings is not determined in advance by another methodology.


In Scenarios, select the campaign in which you want to use the draw.
Click on the gift code icon and select Random code based on given probability rate.
-* Click Manage to continue.






In the code manager, create the required number of sets for the winning codes.
In the Probability in % column, specify the probability of winning for a given group of codes.

The mechanism of daily and unique codes, or codes from the API, can be applied.
Valid probability range is from 0.001 to 99.999%.
If the sum of the probabilities does not reach 100%, you will be notified.
If the sum of probabilities does not reach 100%, the draw will take place in the interval of the sum of probabilities.




How to pass discount codes to the email tool?

By default, Mailocator sends discount codes in the field promocode
But if you need to change the property name, it's easy:

Simply add this mask to the HTML code of the hidden input to the value attribute: {{PROMO_CODE}}
<input type="hidden" name="opt_wincode" value="{{PROMO_CODE}}">

Use a mask to pass the name / text information listed next to the code: {{PROMO_CODE_TEXT}}
<input type="hidden" name="opt_wincode_name" value="{{PROMO_CODE_TEXT}}">





Functionality verification



Verification of the correctly allocated win can be monitored in the monitoring.
The process of awarding the prize can be found in PROMO_CODE_RAND.




You will verify the detail of the evaluation of the prize draw in detail.

RELATED

Content replacement tags

There are several ways to copy arbitrary fields to campaign content, including influencing CSS class names, in Mailocator.

Action setval - change of values in Mailocator forms

The setval action can be used to dynamically change the default value in pop-ups

Connect and make forms for dialog-Mail

See how to easily connect dialog-Mail and build and setup subscription popup

Changes in the import of discount codes from 1 December 2020

If you use discount codes in Mailocator, please pay attention to the following information

Draw a random discount code

Do you need to draw a random win or a code to gamble popup? Mailocator allows you to easily set the probability to one hundredth of a percent, randomly select a win and deliver it to the email tool.

Launch a campaign using a URL

You can also invoke Mailocator campaigns or designs at any time using a parameter in your site´s URL