Skip to main content

Set up your emails with ActiveCampaign

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

Written by Oussama Guessous
Updated this week

Before you start

Make sure you've connected Loyoly to your ActiveCampaign account. If you haven't yet, follow our guide Integrating Loyoly with ActiveCampaign.

In ActiveCampaign, Loyoly events are available in your automations through Event Tracking. Event names are prefixed with loyoly_ and appear automatically in the list of available events once they have been triggered at least once.

⚠️ Important prerequisite: Event Tracking must be enabled in your ActiveCampaign account. Go to Settings → Tracking → Event Tracking and turn it on before configuring your automations.

👇 Here are the Loyoly events available as triggers in ActiveCampaign:


Create an automation

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

  1. Go to Automations from your ActiveCampaign dashboard

  2. Click on Create an Automation then Start from scratch

  3. Select a trigger of type Event (under Behaviors & Actions)

  4. In the event list, choose the corresponding Loyoly event (e.g. loyoly_points_earned)

  5. Add a Send an email action to the workflow and create your template

  6. In the email editor, use personalization variables to insert the contact's Loyoly data

  7. Activate the automation by clicking Active

💡 Good to know: Loyoly events appear automatically in the ActiveCampaign event list once they have been triggered at least once. You can test the integration from your Loyoly back office to make the events show up before configuring your automations.


Properties available on your contacts

Loyoly automatically syncs custom fields on each ActiveCampaign contact. You can use them in your email templates to personalize your messages.

👇 Here are the Loyoly custom fields visible on an ActiveCampaign contact and an example of a contact with post_purchase data synced:

The available fields are:

  • %LOYOLY_POINT_BALANCE% — Customer's points balance

  • %LOYOLY_MISSIONS_COUNT% — Number of completed missions

  • %LOYOLY_REWARDS_COUNT% — Number of rewards obtained

  • %LOYOLY_REFERRALS_COUNT% — Number of successful referrals

  • %LOYOLY_TIERS_NAME% — Current VIP tier name

  • %LOYOLY_BIRTHDATE% — Birth date

  • %LOYOLY_REFERRAL_ID% — Referral ID

  • %LOYOLY_PHONE_NUMBER% — Phone number

  • %LOYOLY_LAST_ACTIVITY_DATE% — Last activity date

  • %LOYOLY_WALLET_INSTALLED% — Wallet installed (true/false)

  • %LOYOLY_OPTIN_LOYALTY_DATE% — Loyalty opt-in date

Tip: In the ActiveCampaign email editor, use the %FIELD_NAME% syntax to insert the value of a custom field into your template.


Set up your flows

Here are the emails you can configure:

  • Points Earned

  • Reward Redeemed

  • Reward Reminder

  • Unused Reward

  • Referral (link sent)

  • Referral Reminder

  • Referral Confirmed

  • Post-purchase

  • Points Expiry

If VIP tiers are enabled:

  • Tier Reached

  • Birthday Gift

If Product Test is enabled:

  • Product Test: Approval

  • Product Test: Rejection

💡 Good to know

We've included only the variables we use.

On your side, you can add the following variables:

  • your customer's first name

  • their total points

  • your brand name

  • the link to your website

In the referral section:

  • the amount of the referral reward

Similarly, the CTA link is yours to configure: the link can lead to the program on your website.


Section 1: Missions

Points Earned

This email is automatically generated when a mission is successfully completed.

  • For the trigger, here is the event to select: loyoly_points_earned

  • The list of variables related to the event:

%LOYOLY_POINT_BALANCE% — Total points balance after the mission

%LOYOLY_MISSIONS_COUNT% — Total number of completed missions

Subject:

Well done! You've earned points

Email body:

Congratulations! You've just completed a mission and earned points. Your new balance is %LOYOLY_POINT_BALANCE% points.


Section 2: Rewards

Reward Redeemed

When a user redeems their points for a reward, an email is sent.

  • For the trigger, here is the event to select: loyoly_reward_redeemed

  • Variables available on the contact:

%LOYOLY_POINT_BALANCE% — Remaining points balance

%LOYOLY_REWARDS_COUNT% — Total number of rewards

Subject:

Your reward is available!

Email body:

You've redeemed your points for a reward. Your new balance is %LOYOLY_POINT_BALANCE% points.

Reward Reminder

This email is generated when a user has earned enough points to claim a reward.

  • For the trigger, here is the event to select: loyoly_reward_reminder

Subject:

You can redeem a reward with your points!

Email body:

Good news! You have enough points to claim a reward. Your current balance: %LOYOLY_POINT_BALANCE% points.

Unused Reward

This email is generated when a user has redeemed their points for a reward and hasn't used it after 30 days.

  • For the trigger, here is the event to select: loyoly_reward_unused

Subject:

Your reward expires soon!

Email body:

Don't wait any longer! Your reward expires soon. Use it before it's too late.


Section 3: Referrals

Referral (link sent)

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

  • For the trigger, here is the event to select: loyoly_referral_friend_link

  • Variables available on the contact:

%LOYOLY_REFERRAL_ID% — Referral ID

%LOYOLY_REFERRALS_COUNT% — Number of successful referrals

Subject:

Share your link and earn points!

Email body:

Share this link with your friends and earn points for every successful referral!

Referral Reminder

The referral reminder email is sent halfway through the code's expiration period, directly to the referred friend if they haven't made a purchase since receiving the referral email.

  • For the trigger, here is the event to select: loyoly_referral_reminder

Subject:

Your referral code expires soon!

Email body:

Your referral code expires soon. Share it now to earn points!

Referral Confirmed

This email flow is triggered when the referred friend makes a purchase. It is then sent to the referring customer.

  • For the trigger, here is the event to select: loyoly_referral_success

Subject:

Your friend has joined the loyalty program — points are waiting for you!

Email body:

Congratulations! Your friend has joined the program thanks to your referral. Your referral reward is on its way!


Section 4: Loyalty

Points attribution delay (post-purchase)

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

  • For the trigger, here is the event to select: loyoly_post_purchase

Subject:

You've earned points for your purchase!

Email body:

Thank you for your purchase! You've just earned points. Your new balance: %LOYOLY_POINT_BALANCE% points. Use them to unlock great rewards.

Points Expiry

This email is sent when a customer's points are about to expire.

  • For the trigger, here is the event to select: loyoly_points_expiry

Subject:

Your points expire soon!

Email body:

Heads up! Your loyalty points will expire soon. Redeem them for a reward now before it's too late.


Section 5: VIP tiers

If VIP tiers are enabled, you can configure these two emails.

Tier Reached

This email is sent when a user reaches a VIP tier.

  • For the trigger, here is the event to select: loyoly_new_tier_reached

  • Variables available:

%LOYOLY_TIERS_NAME% — Name of the new VIP tier

Subject:

Congratulations! You've reached the %LOYOLY_TIERS_NAME% tier!

Email body:

Well done! You've just reached the %LOYOLY_TIERS_NAME% tier. Discover your new exclusive perks.

Birthday Gift

This email is sent on your customer's birthday as a VIP tier reward.

  • For the trigger, here is the event to select: loyoly_birthday_gift

Subject:

Happy birthday! Your gift is waiting for you 🎁

Email body:

To celebrate your birthday, we're giving you a special gift! Discover it now.

Section 6: Product Test

If the Product Test feature is enabled, you can configure these two emails.

Product Test: Approval

This email is sent when you accept a product test request from a user.

  • For the trigger, here is the event to select: loyoly_application_accepted

Subject:

Your product test application has been approved!

Email body:

Your product test application has been approved. You'll find your discount code in your loyalty account.

Product Test: Rejection

This email is sent when you reject a product test request from a user.

  • For the trigger, here is the event to select: loyoly_application_refused

Subject:

Your product test application

Email body:

Thank you for applying for the product test. Unfortunately, your application wasn't selected this time. More opportunities are coming soon!

Well done! ✅

Your integration is complete and your email automations are configured.


FAQ

The Loyoly events don't appear in ActiveCampaign, what should I do?

Event Tracking must be enabled in your AC account (Settings → Tracking → Event Tracking). Events appear after their first trigger — you can test from the Loyoly back office to make them show up.

How do I insert a Loyoly custom field into my email?

In the ActiveCampaign email editor, use the %FIELD_NAME% syntax (e.g. %LOYOLY_POINT_BALANCE%) to dynamically insert the field's value into your template.

What's the difference with Omnisend or Klaviyo events?

Loyoly events are the same regardless of the CRM. The difference lies in the variable syntax: ActiveCampaign uses %NAME% for custom fields, whereas Omnisend uses [[contact.Name]].

Did this answer your question?