Skip to main content

Set up your emails with Omnisend

How to use Loyoly events and their variables in your Omnisend email automations

Written by Farah Bahoui
Updated today

Before getting started

Make sure you have connected Loyoly to your Omnisend account. If you haven't done so yet, follow our Loyoly and Omnisend integration guide.
​

In Omnisend, Loyoly events are available in your automations under the Custom event trigger. Event variables are used with the syntax [[event.variable_name]]. Events are automatically created in Omnisend the first time they are triggered β€” no prior configuration is required.


Activating the automations

To set up an automation in Omnisend based on a Loyoly event:

  1. Go to Automations from your Omnisend dashboard.

  2. Click on Create workflow and then Start from scratch.

  3. Select Custom event as the trigger.

  4. From the events list, choose the corresponding Loyoly event (e.g., points_earned).

  5. Add an Email block into the workflow and create your template.

  6. In the email editor, insert the variables using the syntax [[event.variable_name]] directly into the text or subject line.

  7. Activate the automation by clicking on Start workflow.

πŸ’‘ Good to know: Loyoly events automatically appear in the Omnisend Custom events list as soon as they have been triggered at least once. You can test the integration from your Loyoly back-office to make the events appear before setting up your automations.


Set up your flows

In Klaviyo, flows are email sequences that are triggered by certain events and then include one or more steps.

Here are the emails that you can set up :

  • Points earned

  • Reward redeemed

  • Rewards reminder

  • Reward unused

  • Friend referral

  • Referral reminder

  • Referral completed

  • Post-purchase

  • Points expiration

If VIP tiers are enabled :

  • Tier reached

  • Birthday

If product test is enabled :

  • Application accepted

  • Application refusal

πŸ’‘ Please note

We've only included the variables we use.

For your part, you can add the following variables:

  • your customer's first name

  • total points

  • your brand name

  • link to your website

In the referral section :

  • the amount of the referral reward

In the same way, you can configure the CTA link: it can lead to the program on your site.


Section 1 : Missions

Points earned

This event is triggered when a customer validates a mission and earns points.

  • For the trigger, here is the starting metric to select: points_earned

  • The list of variables related to the event :

[[event.points_amount]] β€” Number of points earned

[[event.mission_name]] β€” Name of the completed mission

[[event.total_balance]] β€” Total points balance after the mission

Subject:

Well done! You have earned [[event.points_amount]] points 

Body :

Congratulations! 
You have just validated the "[[event.mission_name]]" mission and earned [[event.points_amount]] points.

Your new balance is [[event.total_balance]] points.

Section 2 : Rewards

Rewards

This event is triggered when a customer exchanges their points for a reward.

  • For the trigger, here is the starting metric to select: reward_redeemed

  • The list of variables related to the event :

[[event.reward_name]] β€” Name of the reward

[[event.reward_type]] β€” Type of reward

[[event.points_cost]] β€” Number of points spent

[[event.remaining_balance]] β€” Remaining points balance

[[event.reward_code]] β€” Reward code

[[event.reward_link]] β€” Link to use the reward

[[event.reward_expiration]] β€” Reward expiry date

[[event.reward_condition]] β€” Terms of use

Subject :

Your [[event.reward_name]] reward is available!


​Body:

You have exchanged [[event.points_cost]] points for [[event.reward_name]]. 

Use your code: [[event.reward_code]]. Valid until [[event.reward_expiration]].

Rewards reminder

This event is triggered to remind a customer that they can get a reward with their current points.

  • For the trigger, here is the starting metric to select: reward_reminder

  • The list of variables related to the event :

    [[event.reward_name]] β€” Name of the accessible reward

    [[event.reward_points]] β€” Points required for this reward

    [[event.next_reward_name]] β€” Next reward to reach

    [[event.next_reward_points]] β€” Points required for the next reward

Subject:

You can get [[event.reward_name]] with your points! 

Body :

Good news! 
You have enough points to get [[event.reward_name]] (only [[event.reward_points]] points).

Keep going to reach [[event.next_reward_name]] at [[event.next_reward_points]] points!

Rewards unused

This event is triggered to remind a customer that they have an unused reward.

  • For the trigger, here is the starting metric to select: reward_unused

  • The list of variables relating to the event :

    [[event.reward_name]] β€” Name of the reward

    [[event.reward_date]] β€” Date the reward was obtained

    `[[event.reward_code]] β€” Reward code

    [[event.reward_link]] β€” Link to use the reward

    [[event.reward_image]] β€” Reward image

    [[event.reward_expiration]] β€” Expiry date

Subject:

Your [[event.reward_name]] reward expires soon! 


​Subject:

Don't wait any longer! 

Your [[event.reward_name]] reward obtained on [[event.reward_date]] expires on [[event.reward_expiration]].

Use your code: [[event.reward_code]].

Section 3 : Referrals

Friend referral

The referrer can choose to share their referral link or enter the email address of their referred friend. This email is sent directly to the referred friend (only if they have never placed an order).

  • For the trigger, here is the starting metric to select: referral_friend_link

  • The list of variables related to the event :

  • [[event.referral_customer_firstname]] β€” Referrer's first name

  • [[event.referral_link]] β€” Unique referral link

Subject:

[[event.referral_customer_firstname]], share your link and earn points!

Body :

Hello [[event.referral_customer_firstname]]! 

Share this link with your friends and earn points for each successful referral: [[event.referral_link]]

Referral reminder

The referral reminder email is sent halfway through the expiration date of the code, directly to the referred friend if he or she has not made a purchase since receiving the referral email.

  • For the trigger, here is the starting metric to select: referral_reminder

  • The list of variables related to the event :

    [[event.customer_firstname]] β€” Customer's first name

    [[event.referral_code]] β€” Referral code

    [[event.referral_expiration]] β€” Referral expiry date

Example subject line:

 [[event.customer_firstname]], your referral code expires soon!

Body:

Hello [[event.customer_firstname]]! 

Your referral code [[event.referral_code]] expires on [[event.referral_expiration]].

Share it now to earn points!

Referral completed

This event is triggered when a referral is successfully validated.

  • For the trigger, here is the starting metric to select: referral_success

  • The list of variables related to the event :

[[event.friend_email]] β€” Referred friend's email

[[event.referral_code]] β€” Referral code used

[[event.referral_expiration]] β€” Expiry date

Subject:

Your friend has joined the loyalty programme β€” points await you! 

Body :

Congratulations! [[event.friend_email]] has joined the programme using your code [[event.referral_code]]. 

Your referral reward is on its way!

Section 4 : Loyalty

Attribution delay

This email is generated when a customer places an order. Points are calculated based on the order amount, excluding taxes and shipping costs.

  • For the trigger, here is the starting metric to select: post_purchase

The list of variables related to the event :

[[event.points_earned]] β€” Number of points earned

[[event.attribution_date]] β€” Points attribution date

Subject :

You have earned [[event.points_earned]] points for your purchase! 


​Body :

Thank you for your purchase! 

You have just earned [[event.points_earned]] points credited on [[event.attribution_date]].

Use them to get great rewards.


Section 5 : VIP tiers

If VIP tiers are enabled, you can configure this e-mail.

Tier reached

This email is sent when a user reaches a VIP tier.
​
​For the trigger, the starting metric :is new_tier_reached.

The list of variables related to the event :

[[event.tiers_name]] β€” Name of the new VIP tier

[[event.vip_rewards]] β€” New tier benefits

Subject:

Congratulations! You have reached the 

Body :

Well done! You have just reached the [[event.tiers_name]] tier. Discover your new exclusive benefits: [[event.vip_rewards]].

Birthday

  • For the trigger, here is the starting metric to select: birthday_gift

  • The list of variables related to the event :

[[event.reward_name]] β€” Name of the gift

[[event.reward_icon]] β€” Gift icon

[[event.reward_code]] β€” Gift code

[[event.reward_link]] β€” Link to use the gift

Subject:

Happy birthday! Your [[event.reward_name]] gift is waiting for you 🎁


​Body :

To celebrate your birthday, we are offering you [[event.reward_name]]! Use your code: [[event.reward_code]].

Section 6 : Product testing

If the product test function is enabled, you can setup these two emails.

Application accepted

This email is sent out when you accept a user to complete a product test.

  • For the trigger, here is the starting metric to select: application_accepted

  • The list of variables related to the event :

[[event.product_test_name]] β€” Name of the product test

[[event.first_name]] β€” Customer's first name

[[event.brand_name]] β€” Brand name

[[event.reward_code]] β€” Reward code

[[event.reward_link]] β€” Link to use the reward

Subject:

[[event.first_name]], your application for [[event.product_test_name]] is accepted! 

Body :

Hello [[event.first_name]]! 

Your application for the "[[event.product_test_name]]" product test with [[event.brand_name]] has been accepted.

Here is your code: [[event.reward_code]].

Application refusal

This email is sent out when you unaccept a user to complete a product test.

  • For the trigger, here is the starting metric to select: application_refused

  • The list of variables related to the event :

    [[event.product_test_name]] β€” Name of the product test

Subject:

Your application for [[event.product_test_name]] 

Body :

Thank you for your application to the "[[event.product_test_name]]" product test. 

Unfortunately, your application was not successful this time. Other opportunities are coming soon!

Well done ! βœ…

Your integration has been completed and your workflows have been set up.

Did this answer your question?