Klaviyo Integration Instructions

If you use Klaviyo to send marketing emails to your customers, then you can use our Klaviyo integration to automatically pass program-related data directly into your Klaviyo account! Sending rewards and referral program-related emails directly from Klaviyo makes it easier to manage your marketing drips, ensure that customers receive the right email at the right time, and better target customers based on their program status.

Setting Up the Integration

To get started, head into the Settings section of your Swell account, and select Klaviyo from the dropdown menu in the Integrations box. When you do so, you'll receive a prompt asking you for a key so that we know exactly where to send your program data:

Just follow the on-screen instructions to access your Public API Key from directly within your Klaviyo account. Please make sure to enter your Public API Key!

Then, just click the Add Integration button, and you're all set! The integration will show up in your list of integrations:

What's Going to Show Up in My Klaviyo Account?

In general, there are two types of information that Swell passes into Klaviyo:
  1. Properties - This is any pertinent Swell data about the customer (e.g. point balance, unique referral link, etc.). Each time it updates (for example, if a customer earns more points), Swell will automatically it in Klaviyo as well.
  2. Events - These are one-time occurrences which you can use to trigger specific program-related emails. For example, we have a "Redemption Reminder" event, which you can set to send when somebody has enough points for a discount, but hasn't redeemed their points in a certain period of time (which we've found is extremely helpful in getting them to come back and shop).

Which Emails Do You Recommend Setting Up in My Klaviyo Account?

Using a combination of your properties and events data, there are an incredibly wide variety of emails you can send using the Swell-Klaviyo integration. This section describes some of the most popular emails we recommend sending, and includes the appropriate code / email tags you'll need to place the appropriate program data in each email.

Program-Related Emails

Want to send customers an email with their referral link? Or include their up-to-the-minute point balance? No problem!

Encourage Customers to Share Their Referral Link

We highly encourage you to send an email to your customers with their unique referral link. Upon receiving your email, they can forward it directly along to all of their friends, and hopefully earn you tons of referral-based business in the process!

Wherever you'd like to include the customer's unique referral link in your email, just insert this code:

{{ person|lookup:'swell_referral_link'|default:'Don't have an account yet? Create an account with our store to get your very own link!' }}

You can edit any of the "default" text included in the code to better match your tone and style.

Update Customers on Their Point Balance

In almost any of your emails, it's never a bad idea to update your customers on their point balance! Better yet, all it takes is a simple line of code:

{{ person|lookup:'swell_point_balance'|default:'Don't have an account yet? Create an account with our store to get your very own link!' }}

Trigger-Based Emails

Instead of sending emails to customers via Swell when they complete program-related "events", you can send them directly via Klaviyo instead! 

All trigger-based emails should be set up as Flows in your Klaviyo account. Just click on the Create Flow button, name it, select the "Takes an Action" option in Step 2, and then choose the appropriate Swell event from the dropdown menu:

Here's how to set up each of those trigger-based emails, including some code we'd recommend inserting in each one:

Referrer Share Link via Email

When one of your customers decides they'd like to share their their referral link with a friend via email, you can trigger the email directly via Klaviyo. Remember, this email will be coming from your business to a potentially new customer, so you'll want to word it accordingly. 

To include the referrer's unique referral link:

{{ event.referral_link }} 

To include the first name of the referrer (so as to make the email a bit more personal):

{{ event.customer.first_name|default:' ' }}
Referrer Thank You ("Referral Completed")

This email will send automatically to a referrer as soon as their friend makes a purchase. Make sure to express your gratitude for the new business! 

To include the email of the friend who made a purchase using the referrer's link:

{{ event.referred_customer.email|default:'One of your friends' }}
Almost Enough Points to Earn a Reward ("Points Reminder")

When a customer has more than 0 points, but hasn't earned or redeemed in a while, you can trigger this email to encourage them to come back to the store (and hopefully make a purchase). 

To include how many points the customer needs in order to earn their next reward:

{{ event.points_needed|default:'a few more' }}
Enough Points to Earn a Reward ("Redemption Reminder")

When a customer has enough points for a reward, but hasn't been active in a certain amount of time, you can trigger this email to encourage them to come back and spend their points. Note that this is very similar to the Points Reminder email, but will trigger when the customer does actually have enough points for a reward. 

To include the discount that the customer can earn in exchange for their points:

{{ event.redemption_option.name|default:'$5' }}<br>
Happy Birthday

If you're using our "Happy Birthday" campaign to give customers points on their birthday, use the corresponding event to automatically send the customer an email on their big day.

There isn't any event-related data to include here, but adding their first name is never a bad idea :) 

To do that, you'd just use an existing Klaviyo tag:

{{ first_name|default:'Hey there' }}
Customer Redeemed Points for a Coupon ("Coupon Earned")

When a customer redeems their points for a discount, we'd recommend sending them an email with their coupon code. It's a great reminder that they've taken a positive action with the store, and is helpful to the customer in case they have trouble locating the code on your site.

To include the value of the coupon earned, use:

{{ event.redemption_option.name|default:'a discount on' }}

And to include the coupon code itself, use

{{ event.redemption.reward_text }}

For additional guidance on Klaviyo email tags, please refer to this Klaviyo guide: https://www.klaviyo.com/docs/email-tags.


Just keep in mind that some parameters for event-related emails (e.g. the amount of time we should wait before determining that a customer qualifies for the Redemption Reminder email) should be set up in the Email Notifications section of your Swell account. Then, when the person qualifies for the event, we'll automatically send it to Klaviyo!