For the complete documentation index, see llms.txt. This page is also available as Markdown.

Klaviyo Integration

Connect your RaffleX site to Klaviyo so your customer data and live competitions flow straight into your email and SMS marketing.

Klaviyo is a popular email and SMS marketing platform. RaffleX can link directly to your Klaviyo account so your customer data flows in automatically, and you can pull your live competitions into your campaigns as products.

Klaviyo has told us they have some limits on who can sign up, mostly around how long a company has been trading (usually at least 18 months). If your business is newer than that, you may need to wait or speak to their team before you can open an account.

Use the link below to sign up through the correct Klaviyo team.

First sign up to Klaviyo

Step 1: Get your public and private API keys

An API key is a secret code that lets RaffleX and Klaviyo talk to each other securely.

  1. Sign in to Klaviyo.

  2. Open the developer tools area in your dashboard and go to Manage API Keys (https://www.klaviyo.com/settings/account/api-keys).

  3. Create both a private key and a public key.

  4. Keep this page open, or copy both keys somewhere safe, so you can paste them into RaffleX in the next step.


Step 2: Add your keys to RaffleX

  1. In your RaffleX dashboard, go to Settings in the left-hand menu.

  2. Click Marketing and search for Klaviyo.

  3. Paste your public and private keys into the matching fields and save.

Once your keys are saved, you should see data start to flow into your Klaviyo account.


Step 3: Sync your competitions with a product feed

RaffleX gives you a live product feed, a web address that lists all of your currently active competitions in a format Klaviyo understands. Adding it to Klaviyo lets you drop your competitions straight into emails as products, build automated product recommendations, and keep everything up to date without any manual work.

Your feed address is:

Replace yourdomain.com with your own site domain (the address customers visit to enter your competitions).

What the feed includes

For every active competition, the feed shares the details you need to build great campaigns:

  • Competition title and description

  • A link to the competition page on your site

  • The featured image

  • Price and sale price (if one is set)

  • Cash alternative

  • Closing date and draw date

  • Tickets remaining and percentage sold

  • Game type and whether the competition is featured

The feed only ever lists competitions that are currently live, and it refreshes on its own. A scheduled competition is added once its start date arrives. As you launch new competitions or others close, the feed keeps itself up to date.

How to add the feed to Klaviyo

  1. In Klaviyo, go to Content, then Products.

  2. In the top right, click Manage Custom Catalog Sources.

  3. Click Add new source.

  4. Give the source a name (for example "RaffleX Competitions") and paste in your feed address from above.

  5. Click Define Source.

  6. On the mapping screen, Klaviyo lines up the feed fields for you automatically. Check that Item ID, Title, URL, Image URL and Description are all matched, adjust anything that looks off, then finish setup.

Klaviyo only needs you to confirm five core fields (ID, title, link, image and description). RaffleX already provides these, along with the extra details listed above, so the mapping step is usually just a quick check.

Once the source is connected, you can use Klaviyo's product blocks and recommendations to feature your competitions in any email.


Customers opt in to your marketing by ticking the consent box at checkout, labelled Receive Discount Codes & Latest Competitions. They can also opt in when they create an account, or through a newsletter sign up block on your site.

This single opt-in is your consent for marketing. Where a customer has also given you a mobile number, that number is subscribed alongside their email address, so the one tick box covers both channels.

RaffleX talks to Klaviyo directly. You do not need n8n, Zapier or any other tool sitting in the middle to manage subscriptions. Once your API keys are saved, consent flows on its own.

What RaffleX sends to Klaviyo

When this happens
RaffleX tells Klaviyo

A customer ticks the consent box at checkout

Create or update the profile, set marketing consent to Subscribed

A customer opts in when registering, or via a newsletter block

Set marketing consent to Subscribed

A customer unsubscribes in My Account

Set marketing consent to Unsubscribed

You unsubscribe someone from the Users area

Set marketing consent to Unsubscribed

A customer completes an order

Record a Placed Order event


Turning on double opt-in

Consent flows from RaffleX to Klaviyo, and not the other way round. Klaviyo is where your marketing is sent from, so it is worth making Klaviyo the place that confirms and records each opt-in.

Klaviyo can do this for you with double opt-in. When it is switched on, anyone added to your list is emailed and asked to confirm before they receive any marketing. Klaviyo then keeps its own record of that confirmation, including the date, time and IP address.

To switch it on, go to Audience, then Lists & Segments in Klaviyo, open the list your customers are added to, and choose Settings, then Opt-in Process. Select Double opt-in and save.


Order confirmation emails

Order confirmations, and other emails about a customer's account or purchases, are transactional. They are always sent, whether or not the customer has opted in to marketing. Marketing consent only ever affects marketing.

Last updated