Learn how to integrate Klaviyo with ShopJar to send personalized emails for various actions in the referral and affiliate program.
Klaviyo provides businesses with advanced email marketing tools for targeted campaigns and higher engagement. It enables data-driven strategies to boost sales and build lasting customer relationships.
Integrate Afflr with Klaviyo
To get the API Key
Click on your account at the bottom left of the page.
Select Settings.
Klaviyo Settings
Navigate to API Key
Click Create Private API Key
Create Private API
Provide a name for the API Key.
Select Grant applications full access for every API scope.
Click Create
Copy the API Key.
Provide Full Access Key
Copy API Key
Visit the Shopjar app.
Navigate to Settings -> Integration.
Under Klaviyo, toggle the enable button.
Klaviyo Shopjar Integration
Paste the API Key.
Click the Update button.
Klaviyo ShopJar Integration
To check if Klaviyo is successfully integrated with ShopJar:
Navigate to Klaviyo Home -> Audience -> Profile.
Check if "Shopjar Shopjar" is present under the profile.
Shopjar Shopjar in Klaviyo
Klaviyo triggers actions like emails or SMS based on events such as new sign-ups. With ShopJar, you can access five referral triggers and six affiliate triggers, using custom properties to personalize emails with details like store name and affiliate name.
You can check the trigger events and custom properties by navigating to Dashboard -> Audience -> Profile and clicking on the ShopJar ShopJar.
Klaviyo Events and Custom Properties
Referral Program Shortcodes
Use these shortcodes to personalize referral emails and notifications with dynamic details like names, links, and rewards.
Property
Definition
Example
{{ event.friend_name }}
Displays friend’s full name (first & last)
John Doe
{{ event.friend_first_name }}
Displays friend’s first name
John
{{ event.friend_last_name }}
Displays friend’s last name
Doe
{{ event.referrer_name }}
Displays referrer’s full name (first & last)
Alice Smith
{{ event.referrer_first_name }}
Displays referrer’s first name
Alice
{{ event.referrer_last_name }}
Displays referrer’s last name
Smith
{{ event.store_name }}
Displays the store name
ShopJar
{{ event.store_url }}
Displays the store URL
https://shopjar.com
{{ event.coupon_code }}
Displays the coupon code
SAVE20
{{ event.coupon_expiry_date }}
Displays the coupon expiry date
2025-12-31
{{ event.rule_title }}
Displays the rule title
Referral Bonus
{{ event.referral_url }}
Displays the referrer’s unique referral URL
https://shopjar.com/ref/123
{{ event.order_value }}
Displays the order value
$100
{{ event.sales_url }}
Displays the all-sales URL
https://shopjar.com/sales
Affiliate Program Shortcodes
Use these shortcodes to personalize affiliate emails and notifications with dynamic details like names, links, and earnings.
Property
Definition
Example
{{ event.affiliate_name }}
Displays affiliate’s full name (first & last)
David Lee
{{ event.affiliate_first_name }}
Displays affiliate’s first name
David
{{ event.affiliate_last_name }}
Displays affiliate’s last name
Lee
{{ event.affiliate_dashboard_url }}
Displays the affiliate’s account page URL
https://shopjar.com/dashboard
{{ event.order_value }}
Displays the order value
$100
Referral Program Email Triggers
These triggers automate referral emails based on key actions like invites, rewards, and successful referrals.
Trigger
Description
Recipient
Notify after referral sale
Sent when a referral sale is successfully completed.
Admin
Invitation Email
Sent when a referrer invites their friends to join.
Friend
Reward Claimed Email
Sent when a friend successfully claims their referral reward.
Friend
Welcome Email
Sent to a referrer when they join the referral program.
Referrer
Referral Reward Earned Email
Sent when a referrer earns a reward for a successful referral.
Referrer
Affiliate Program Email Triggers
These triggers automate affiliate emails based on key actions like application approvals, commissions earned, and payouts processed.
Triggers
Description
Recipient
Notify after affiliate sale
Sent when an affiliate sale is successfully completed.
Admin
Affiliate Application Received
Sent when a new affiliate application is submitted.
Admin
Affiliate Application Approved
Sent when an affiliate's application is approved.
Affiliate
Commission Earned Notification
Sent when an affiliate earns a commission.
Affiliate
Payout Processed Notification
Sent when a payout is processed for an affiliate.
Affiliate
Commission Redeemed as Coupon
Sent when an affiliate redeems a commission as a coupon.
Affiliate
Creating an Email Workflow in Klaviyo
Example: Sending an Email for "Give $10, Get $10" Program When a New Sale is Made
Navigate to Dashboard -> Flows.
Click Create Flow.
Create Flow
3. Select Build Your Own
Click Build your own
Enter the Flow Name and select the Tag or Create New Tag.
Click Create Flow.
Create Flow
6. Choose Your Metrics and click on API.
API Metrics
Select ShopJar - Shopjar-Email when a friend claims a reward.
New Event
Click Save
Check the metrics and click Save on the Set Up Trigger page.
Confirm and save the trigger selection.
Confirm and Save trigger
Drag and drop Email from the Actions Tab.
Add Email Trigger
Click on Email#1 to customize your email.
Click Select Template.
Select Template
Choose an existing template or create a blank email.
Choose a Template
Add Custom Properties by clicking Add Personalization.
Add Personalization
Insert the required properties and preview the content.
Add Custome Properties
You can preview the mail content by clicking Preview & test.
Preview and Save Template
Click Save.
To make the flow live, click Review and Turn On.
Review and Save
20. In the Review and Turn On dialog box, choose Live from the dropdown and click Turn On
Review and Turn On - Click Update Status
Click Save
Similarly, you can create other trigger events to fit your Referral and affiliate program requirements