The Emarsys Loyalty add-on provides you with an option to create and run a referral program. The referral program is designed to incentivize Loyalty members to invite their friends to purchase in the store. Loyalty members who bring friends who buy - are rewarded. The invited friend receives a time-limited voucher as an incentive for immediate purchase.
Go to Loyalty > Actions > Referral
Terminology
- Loyalty member: A registered loyalty member.
- Friend: Any person who receives a referral from a Loyalty member.
How it works
- Create referral program: Define the rules of the program and how it will be presented to your Loyalty members.
- Activate referral program: Once the referral action is activated, the referral offer is automatically displayed to the members in the Refer A Friend category in their Loyalty Wallets:

- Refer friends: By sharing a personal referral link to their friends, Loyalty members can earn rewards once a friend buys in your store, using their referral voucher code:

- Friends' purchase process: By clicking the referral link, friends are directed to a predefined URL where they can grab their personal voucher code and redeem it in your checkout.
Referral prerequisites
UI
Sales data
To support the referral program, you need to add an additional column to the sales data, which is called: s_coupon
. When uploading the sales data to Emarsys, make sure this column includes the voucher codes (comma delimited) used by the referred friend. For more information, see Preparing your sales data file.
The Loyalty system checks these codes, identifies, and attributes them to the referring member.
Referral Terms & Conditions
Make sure to prepare the referral program's Terms & Conditions (landing page with all information regarding the program) for Loyalty members and friends. Both are required to agree to the T&C to participate in the program.
It is important to clarify the restrictions and conditions of the referral rewards for both the Loyalty members and friends:
- Minimum order amount required by the friend to redeem the voucher.
- Maximum number of referral codes that a Loyalty member can send to friends per calendar year.
- Maximum number and value of rewards a Loyalty member can earn on referrals per calendar year.
- and so on...
Creating a referral program
To create a referral program, perform the following:
Dedicated voucher pool for referrals
This pool includes the voucher code you offer for friends. We highly recommend creating a voucher pool dedicated to referrals to avoid mistakes.
Please note the following requirements, these can reduce frauds by your customers:
- Each referral voucher code has to be unique. If the same code will be distributed more than once (e.g., by two different members to two different friends), then both members will get a reward for the referral once the first code is redeemed.
- Use single-use codes.
- Make sure your system only allows users who have not yet purchased to redeem the code. To prevent multiple purchases by customers who have already purchased by using their codes, make sure your system recognizes that code usage is only possible for first-time buyers.
Creating a triggered campaign
Triggered email campaigns are used to send voucher codes to the referred friends, since they are not yet registered as contacts in Emarsys. (However, you can also choose to display the codes only in the Wallet, or in combination with an email.) To do that, you need to create a Broadcast triggered email:
- Go to Channels > Triggered Emails > Create Mail Stream > Create custom HTML Email or Create Block-Based Email
- In the Email settings, select Broadcast event in Trigger settings.
- In Content Creation, create and design the content of the email sent to the referred friends who entered their email address to receive the referral code.
- Add the referral voucher code to the email content. To do that, use the ESL script:
{{event.voucher_code}}

- Disable link tracking for this email, since it is not supported for broadcast emails.
If your website is available in multiple languages you have two options:
- Create a triggered email campaign for each language.
- Use ESL by using a second token called
{{event.language_code}}
. You can create a conditional statement in ESL using the{{event.language_code}}
token to show the matching text according to the language value. You are required to define the correct text for each language, for the script to show in the email.
Creating a referral action
To create and define a referral action, go to Add-ons > Actions > Referral > Create new referral action
Program settings
- Select market: This dropdown presents the countries or regions that you defined in the Languages & currency setup tab of your Loyalty setup. Define a separate plan for each country or region. Referral links will only be displayed in the Loyalty Wallets of the selected country or region.
You can set only one program per country or region. In case you manage only one country or region, you will not see this setting.
- Program Internal Name: Enter the program an internal name. This name has to be unique and will not be visible to your members.
- Program Name: Enter the program a name that your members will see in their activity history.
- Description: This is an optional field for internal use.
- Minimum order amount: This is an optional field. If defined, referred friends must spend at least this much in their order before the referring member can earn the reward. Make sure to include this information in your referral message for members and friends.
Reward settings
First, define the rewards for Loyalty members and friends:
- Loyalty members: This is the reward a member can earn once a referred friend buys in the store, using their referral voucher code. You can set a different reward for each tier or a uniform reward for all. Reward types can be Bonus points or vouchers.
- Friends: This is the reward offered to a friend through the referral link, to incentivize a purchase. You can only reward with vouchers. The voucher pool selected here will be used in the ESL script you added to your Broadcast email in the previous step.
Then define the Limitations:
- Loyalty Members: You can choose to limit the number of times a Loyalty member can earn referral rewards in a calendar year. If you decide on a limit, the member's referral link will remain active, but the member will not be rewarded beyond the specified value defined.
- Friends: You can choose to limit the number of codes a Loyalty member can send to friends in a calendar year. This can help to reduce the risk of fraudulent use. If you decide to limit, in case the number of defined codes has expired, a new friend who tries to get a voucher code (via the member link) will receive an error message.
This setting can be changed. Saved changes will take effect immediately and will be applied from the beginning of the calendar year. For example, if you change the setting from "No limitation" to limitation of 3 voucher codes only, and the Loyalty member has already sent 3 voucher codes to friends, they will not be able to send more vouchers until the next calendar year.
Content creation
Here, you define the referral offer that is displayed to Loyalty members and friends.
- Loyalty members: Once the program is active, the "Refer A Friend" category automatically becomes visible in their Loyalty Wallets. The members can see your defined referral offer and share it with friends with a personal referral link.

- Friends: Once friends click on the referral link they got from your Loyalty members, the referral offer is displayed as a pop-up (based on your Wallet design) at a predefined URL. To expose the voucher code, they have to enter their Email address and agree to your T&C.

- The content editor provides you with two separated and fixed preset designed templates for Members and Friends. You can switch between them using the tabs on the left side of the editor.
- If you manage a multi-language program, use the Translation form dropdown, at the top of the editor, to define the text for each language. This is not a mandatory setting but note that if a translation has not been created, the default language message will be displayed instead.
- Choose whether and which sharing channels are displayed. The selection needs to be performed for your default language and will be applied for all languages.
For Whatsapp, Twitter and Email we use the Friend's Text, Friend's Reward and the Referral Link as a message. - You can edit the content (recommended content is predefined as default) but not the design. You can preview your changes on the right side of the editor.
- Title, text and URL fields are organized according to the fixed preset designed template shown in the editor preview.
- The rewards displayed were displayed in the Reward settings.
Members form
This is the form that members will see in their Loyalty Wallets. Make sure to communicate your incentive and rules including any limitations that have been set.
- Referral link landing page: This is the URL of the landing page that will open when the friend clicks the referral link. Loyalty will display the friends referral pop-up over this page.
Make sure that the Wallet script is implemented on that page. Alternatively, you can use the API and build the message into your page.
- Statement of consent: Make sure that the destination document contains a clear description of your referral program and processes, including the information that the friends' data is used only to process the voucher rewards and is not saved.
- Sharing Channels: Choose whether and which sharing channels are displayed. The selection needs to be performed for your default language and will be applied for all languages. For Whatsapp, Twitter and Email we use the Friend's Text, Friend's Reward and the Referral Link as the message.
Friends form
This is the form that friends will see after they click the referral link. Make sure your message includes any limitations that have been set.
- Email field: Friends are required to enter an email address to receive their voucher code. This is a basic verification step before distributing the code. It is highly recommended to explain to users that we use their email address to fulfill their reward and make sure they get it, and it is not saved.
- Primary statement of consent: Make sure that the destination document contains a clear description of the friends reward program and processes, including the information that the friends' data is used only to process the voucher rewards and is not saved.
Emails are not saved, only their hash is saved for 30 days for fraud protection. Therefore, if invited friends enter their email address again after 30 days, they will receive a new voucher code.
Based on your settings, this is how your program is presented to friends:

Scheduling
- CTA action: The action that Emarsys takes when the friend has provided a valid email address and has clicked the CTA button. It is possible to send the code in an email or only in the Wallet, or in both. When using the API, you can choose any options.
- Activation: The moment you activate the action, it will be visible in the relevant Loyalty Wallets. Deactivation immediately stops the validity of all referral links for this program and blocks the referral category in the Wallet until reactivation. A voucher code that has already been offered to friends will remain valid until its expiration date.
The exposed code in the referral pop-up looks like the following:

Sending voucher codes in email
Alternatively, you can send your voucher codes to your members in triggered emails instead of showing them in the Wallet or using the API:
In Triggered email campaign, select the campaign prepared in Email campaign.
Email campaign
You can create an email campaign to send to your members which includes information about the referral program. Available tokens to use:
- Program name
- Member’s reward
- From the Member’s content tab: Title 1
- From the Member’s content tab: Text
- Referral URL
Furthermore, Emarsys Loyalty Add-on provides you with external events that can trigger an email the moment the friend’s purchase is confirmed, so your member can be notified that he has a reward waiting for him in his account.
Error messages
Friends will receive an error message in the following cases:
- A friend who receives a referral that is no longer available:

- A friend who tries to see his voucher code again on the landing page, and the voucher has expired:

Referral program through API
If you prefer to have the referral program embedded into your website instead of using Loyalty's Wallet UI, you can use our referral API. You need to prepare the following:
- The referral information for your Loyalty members, for example, that is displayed on the My account page.
- A landing page for friends with all the necessary pieces of information and an option to enter their email. A link to this page should be available for your Loyalty members that they can share with their friends.
Get a contact's referral information: This call will provide you with all the text and settings which your loyalty members should see, including the link landingPageUrl
they need to share with their friends.
Additionally, you get the referralID
which is important for the subsequent API calls.
The best practice is to concatenate into the referralID
to the referral link, that way when the friend presses on the link and gets to your website you can extract the referralID
from the url and make the next API call in order to get the content.
Get the referred friend's content: This call will provide you with the content for the friend. The input parameter is the referralID
which you got from the previous call.
Create an input box for the friends to enter their email.
After they enter their email, you can call the last API.
Get a contact's referral code: As input you need the friend's email and the referralID
from previous calls. The API will return:
- The coupon code /
code
- Code visibility setting /
displayCodeInClient:
The setting that controls whether to show the coupon code to the friends or if the friends will get the code via email from Emarsys. Accordingly, you can decide whether to show the code to the friends or show them a different message, including that they will get the code via email. - Expiration date /
expireAt
: What date the code will expire - Minimum order amount /
minimumOrder
: Below that amount the coupon is not valid