How the Klaviyo Integration Works
Our Klaviyo integration is a powerful tool for Shopify merchants who want to put their affiliate communication on autopilot. By syncing real-time data directly into your Klaviyo account, you can trigger personalized emails the moment a partner is approved or whenever they secure a new sale. Klaviyo is a critical part of many Shopify stores, and these events allow for a seamless communication experience.
This integration passes two specific metrics to your Klaviyo account. These metrics will be accessible when creating a flow in Klaviyo—simply search for the metric names to begin. If you're new to Klaviyo, see the template tag cheat sheet below.
Simple Affiliate Referral Confirmed: Triggered when a referral is "Confirmed."
Simple Affiliate Affiliate Approved: Triggered when an affiliate is "Approved."
1. How to Set Up the Integration
To connect your accounts, you will need a Private API Key from your Klaviyo dashboard.
Where to Set Up: From your main merchant dashboard, go to Settings > Klaviyo.
Enable the Integration: Check the box for "Enable Klaviyo integration."
Enter Your API Key: Paste your Private API key into the designated field.
Security Note: For your protection, the API key will no longer be visible after you click save. Make sure you have stored it somewhere safe.
Validation: When clicking Save, we send a test payload to verify the provided API key. You can view the event by going to the "Profiles" section in Klaviyo and searching for the profile associated with your store's Shopify email.
Disable Welcome Emails: If you plan to send welcome emails via Klaviyo, uncheck the "Affiliate account welcome" box. This prevents the affiliate from receiving two separate welcome emails.
Save: Click the Save button.
2. How to Remove the Integration
3. Technical Event Data (Payloads)
The following data is passed to Klaviyo via POST https://a.klaviyo.com/api/events (Revision: 2026-01-15). You can use any of these "Properties" to personalize your emails.
1. Simple Affiliate Referral Confirmed
Use this metric to send "You've got a sale!" notifications. To use a referral property in a Klaviyo email, follow the Klaviyo syntax: {{ event.commission_amount }}.
event: Klaviyo data type identifier
commission_amount: Simple Affiliate referral property
A list of all available Referral Confirmed properties can be found below:
{
"data": {
"type": "event",
"attributes": {
"unique_id": "sa-referral-confirmed-482913",
"properties": {
"referral_id": "482913",
"affiliate_id": "10457",
"affiliate_first_name": "Jane",
"affiliate_last_name": "Doe",
"sh_order_name": "#1042",
"commission_amount": "$12.50"
"order_amount": "$125.00"
}
}
}
}
2. Simple Affiliate Affiliate Approved
Use this to deliver discount codes and onboarding instructions. To use the affiliate's name in an email, follow the Klaviyo syntax: {{ event.affiliate_first_name }}.
event: Klaviyo data type identifier
affiliate_first_name: Simple Affiliate referral property
A list of all available Affiliate Approved properties can be found below:
{
"data": {
"type": "event",
"attributes": {
"unique_id": "sa-affiliate-approved-10457-2026-04-16T17:24:08.512Z",
"properties": {
"affiliate_id": "10457",
"affiliate_first_name": "Jane",
"affiliate_last_name": "Doe",
"affiliate_discount_code": "JANE10",
"affiliate_group_name": "Content Creators"
"affiliate_referral_link": "https://yourdomain.com/jane"
}
}
}
}
4. Klaviyo Template Cheat Sheet
When building your flows in Klaviyo, you can use Template Tags to dynamically insert affiliate data into your subject lines or email bodies.
Common Referral Tags: Use these in your "Confirmed Sale" flows to show affiliates exactly what they earned:
Affiliate Name:
{{ event.affiliate_first_name }}Commission Earned:
{{ event.commission_amount }}Order Reference:
{{ event.sh_order_name }}
Common Approval Tags: Use these in your "Welcome" flows to give new partners their assets immediately:
Discount Code:
{{ event.affiliate_discount_code }}Assigned Group:
{{ event.affiliate_group_name }}Affiliate Name:
{{ event.affiliate_id }}
5. How to Create a Flow in Klaviyo
Once your integration is saved and at least one event has been triggered (e.g., you’ve approved a test affiliate), the metrics will be available in your Klaviyo account to use as triggers.
Start the Flow: From your Klaviyo dashboard, navigate to Flows and click the Create Flow button. Select the Build your own option in the top-right corner.
Select the Trigger: In the Select a trigger section on the left, click on Your metrics and then select the API option.
Choose the Metric: Click into the dropdown menu and select one of our metrics:
Simple Affiliate Affiliate Approved (for welcome sequences)
Simple Affiliate Referral Confirmed (for sales notifications)
Add an Email Action: Drag an Email component into the flow path. Click the email to configure it and select Edit.
Map Your Properties: To ensure you are using the correct tags, click the Preview and Test icon (the eye icon). Find a recent Simple Affiliate event and click on a property (like
affiliate_discount_code) to automatically copy the tag to your clipboard.
Important Rules to Remember
Profile Mapping: The
emailattribute in the payload is always the affiliate's email. This ensures the event is tied to the affiliate's profile in Klaviyo, not the customer's.Deduplication: We include a
unique_idto prevent duplicate events from triggering the same flow twice.Currency Formatting: The
commission_amountis passed as a localized string (e.g., "$12.50" or "€9,95") based on your store's settings.Null Values: Properties like
affiliate_discount_codeorsh_order_namemay benullor empty if the data hasn't been generated in Shopify yet.The "First Event" Requirement: Klaviyo will only show the API metrics in the dropdown once the first event has been sent. If you don't see them, approve a test affiliate or confirm a test referral to "initialize" the connection.
Metric Names: Ensure you are selecting the metrics specifically labeled with "Simple Affiliate." Standard Shopify metrics do not contain the affiliate-specific properties needed for these flows.
Tag Accuracy: Always use the
{{ event.property }}syntax. Klaviyo tags are case-sensitive, so using the "Preview and Test" tool to copy/paste tags is the best way to avoid errors.Flow Status: Remember that all new flows are created in Draft mode. You must manually switch the status to Live in the top-right corner before emails will begin sending to your affiliates.
What Happens Next?
Now that your triggers are set, your affiliate communication is completely hands-off. Your partners will receive their unique assets and commission updates in real-time. This automation allows you to maintain a high-touch relationship with your affiliates without the manual overhead.

