Using Klaviyo with Swapt
Send the customers you capture with Swapt into Klaviyo, trigger a Klaviyo flow when they submit, and deliver their reward and review link by email.
If you already run Klaviyo flows, Swapt can feed them. Customers scan, fill in your form, and land in Klaviyo with everything you need to follow up: which product they bought, where they bought it, and the code they were promised.
Not sure Klaviyo is the right fit? See Swapt email or Klaviyo? first.
The big picture
- Swapt captures the customer and sends them to Klaviyo with a Klaviyo: Add to List step.
- A Klaviyo: Track Event step sends an event, Submitted Swapt Code by default, with the details you choose.
- Klaviyo uses that event to trigger an email flow that delivers the reward and asks for a review.
Step 1: Connect Klaviyo
Open Integrations from the bottom of the left-hand menu and click the Klaviyo card. Choose OAuth Authentication (recommended) and click Connect Klaviyo, then pick your account in Klaviyo. You can also connect with API Key Authentication instead. See Integrations.
Step 2: Prepare a list in Klaviyo
In Klaviyo, create a list just for Swapt sign-ups, for example one called "Swapt". A dedicated list keeps your data clean and easy to segment later. Klaviyo's docs cover list consent settings, like single or double opt-in.
Step 3: Add the Klaviyo steps to your flow
Do this after your pages and the rest of the flow are built.
After the step that shows your form, add Klaviyo: Add to List and pick your Swapt list under Klaviyo List.
Below it, add Klaviyo: Track Event. Leave Event Type set to Submitted Swapt Code, or choose Custom Event and enter a Custom Event Name.
Click Add Property for each detail you want in your emails. Each property has a Key (the name Klaviyo sees) and a Value (a Swapt variable). See the table below.
Click Save and choose Save & Publish.
Useful properties
| Key (your choice) | Value | Why you'd use it |
|---|---|---|
product | {formData.product.value} | The ASIN of the product the customer picked on the form. |
review_url | {formData.product.reviewUrl} | A ready-made review link for the product they picked: the Amazon review page for Amazon products, or the Judge.me review form for Shopify products. |
review_url | {campaignProduct.reviewUrl} | The same, for the product attached to the campaign. Use this when each campaign covers one product. |
channel_source | {formData.channel_source} | Where they bought, from your form's Channel Source field. Use it to change your email copy by channel. |
promotion | {promotion.promotionalCode.code} | The unique code Swapt gave them, so you can show it in the email. It only has a value when an Apply Promotion step comes before this step. |
The formData.product values need a Product field on your form. Use campaignProduct instead when each campaign is tied to one product. See Planning your first QR campaign.
Beta: Klaviyo: Track Event v2
If Klaviyo: Track Event v2 is switched on for your account, you can skip building properties by hand. It passes along everything the flow captured. Name, email, phone, and address go into the customer's standard Klaviyo profile fields. Everything else is saved on the event and as a profile property starting with swapt_. Send a test submission and look at the event in Klaviyo to see the exact property names.
Send a test
Submit your form once yourself, using your own email. In Klaviyo, open your profile and check that the event arrived with the properties you set up. Klaviyo needs to have seen the event once before you can build a flow around it.
Step 4: Build the email flow in Klaviyo
In Klaviyo, create a new flow and choose your event (Submitted Swapt Code, unless you named your own) as the trigger.
That flow has two jobs:
- Deliver the reward you promised on the landing page.
- Give a second chance to review, for customers who didn't review on the success page.
The review button: point it at the review_url property you sent. In Klaviyo, event properties are usually written as {{ event.review_url }}. Because Swapt builds the right link for you, you don't need separate logic for Amazon and Shopify products.
The coupon: where the code comes from depends on where it's made.
- Codes handed out by Swapt (Shopify codes, or Amazon codes you've uploaded to Promotions): send them as the
promotionproperty and show that property in the email. - Codes kept only in Klaviyo: in Seller Central, create the Amazon promotion and download its codes, then upload them to Klaviyo and insert them with Klaviyo's coupon tools.
When the email looks right, set the flow live in Klaviyo. Then test it end to end with the same email address you used in Swapt.
Don't send two welcome emails. If Klaviyo already sends a welcome series to new list members, leave any welcome Send Email step out of your Swapt flow.
Step 5: Bring Swapt customers into the rest of your program
Once the flow is running, fold these customers into your main marketing:
- Post-purchase emails: copy your existing post-purchase emails into the Swapt flow. Add a condition so people who already clicked the review button skip the review follow-up.
- Main engaged list: after customers finish their first Swapt flow, add them to your main engaged list so they get the same emails as your other buyers.
- Welcome series: you can also connect the Swapt flow to your existing welcome series.
Troubleshooting
Submitted Swapt Code isn't showing up in Klaviyo
If you sent a test submission and the event never arrived, check your form's field keys. The Klaviyo steps look for fields keyed exactly email, firstName, and lastName. Keys are case-sensitive, so Email or firstname won't match.
Without a field keyed email, Klaviyo can't create the profile and the event won't register. Without firstName and lastName, the profile arrives without a name.
To check:
Open your landing page in the page editor, select the Form block, and click Edit Form Builder.
Click each name and email field. Under Field Settings, look at its Field key.
If a key doesn't match, click the lock icon next to Field key to unlock it, type the right key, then save the page.
The built-in First Name, Last Name, and Email fields already use the right keys. This usually happens when a plain Text field was used for a name or email, or a key was edited by hand. Send another test submission once you've fixed it.
You connected the wrong Klaviyo account
OAuth Authentication connects whichever Klaviyo account you're logged into in your browser at the time. Before you connect, log into the right Klaviyo account.
To switch accounts:
In Swapt, open Integrations, stay on the Apps tab, and click the Klaviyo card.
Click Disconnect, then Yes, disconnect it!
In another tab, log out of Klaviyo and log into the correct account.
Back in Swapt, click Connect Klaviyo again.
Then open each Klaviyo: Add to List step in your flows and pick the list again under Klaviyo List, since the lists from the old account won't exist in the new one.
Choosing a flow for your campaign goal
Pick the right flow for reviews, repeat purchases, or product education, choose between Swapt email and Klaviyo, and deliver rewards that work at checkout.
Designing QR codes that get scanned
Pick the right kind of code, decide who prints it, and design stickers that scan on a real shelf, not just on your monitor.