Klaviyo Integration

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 Shopjar with Klaviyo

To get the API Key

  1. Click on your account at the bottom left of the page.

  2. Select Settings.

Klaviyo Settings
  1. Navigate to API Key

  2. Click Create Private API Key

Create Private API
  1. Provide a name for the API Key.

  2. Select Grant applications full access for every API scope.

  3. Click Create

  4. Copy the API Key.

Provide Full Access Key
Copy API Key
  1. Visit the Shopjar app.

  2. Navigate to Settings -> Integration.

  3. Under Klaviyo, toggle the enable button.

Klaviyo Shopjar Integration
  1. Paste the API Key.

  2. 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.

Trigger: Shopjar – Welcome Email (Referrer)

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_referrer_name }}

Displays referrer’s full name

John Smith

{{ event.sj_event_referrer_email }}

Displays referrer’s email address

{{ event.sj_event_referrer_first_name }}

Displays referrer’s first name

John

{{ event.sj_event_referrer_last_name }}

Displays referrer’s last name

Smith

{{ event.sj_event_referral_url }}

Displays referral URL

https://shopjar.com/referral_link

{{ event.sj_event_store_name }}

Displays store name

Shopjar

{{ event.sj_event_store_url }}

Displays store's URL

https://shopjar.com

Shopjar – Email When Referrer Earns a Reward for Successful Referral

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_referrer_name }}

Displays referrer’s full name

John Smith

{{ event.sj_event_referrer_email }}

Displays referrer’s email address

{{ event.sj_event_friend_first_name }}

Displays referred friend’s first name

Emily

{{ event.sj_event_friend_last_name }}

Displays referred friend’s last name

Clark

{{ event.sj_event_friend_email }}

Displays referred friend’s email address

{{ event.sj_event_coupon }}

Displays reward coupon code

REFER10

{{ event.sj_event_coupon_expiry_at }}

Displays coupon expiry date

30 Sep 2026

{{ event.sj_event_rule_title }}

Displays referral rule title

Refer & Earn

{{ event.sj_event_affiliate_dashboard_url }}

Displays referrer dashboard URL

https://shopjar.com/dashboard

Shopjar – Invitation Email (Sent When Referrer Invites Their Friends)

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_referrer_name }}

Displays referrer’s full name

John Smith

{{ event.sj_event_referrer_email }}

Displays referrer’s email address

{{ event.sj_event_referrer_first_name }}

Displays referrer’s first name

John

{{ event.sj_event_referrer_last_name }}

Displays referrer’s last name

Smith

{{ event.sj_event_rule_title }}

Displays referral rule title

Invite Friends

{{ event.sj_event_coupon_code }}

Displays referral coupon code

FRIEND15

{{ event.sj_event_coupon_expire_at }}

Displays coupon expiry date

15 Oct 2026

{{ event.sj_event_store_url }}

Displays store URL

https://shopjar.com

{{ event.sj_event_store_name }}

Displays Store's name

Shopjar

{{ event. sj_event_referrer_link }}

Displays referrer's link

https://shopjar.com/referrer

Shopjar – Email When a Friend Claims a Reward

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_friend_name }}

Displays friend’s full name

Emily Clark

{{ event.sj_event_friend_first_name }}

Displays friend’s first name

Emily

{{ event.sj_event_friend_last_name }}

Displays friend’s last name

Clark

{{ event.sj_event_friend_email }}

Displays friend’s email address

{{ event.sj_event_coupon }}

Displays reward coupon code

WELCOME10

{{ event.sj_event_coupon_expiry_at }}

Displays coupon expiry date

20 Oct 2026

{{ event.sj_event_rule_title }}

Displays referral rule title

Friend Reward

{{ event.sj_event_referrer_name }}

Displays referrer's full name

John Smith

{{ event.sj_event_referrer_first_name}}

Displays referrer's first name

John

{{ event.sj_event_referrer_last_name }}

Displays referrer's last name

Smith

{{ event.sj_event_referrer_email }}

Displays referrer's email address

{{ event.sj_event_store_name }}

Displays store's name

Shopjar

{{ event.sj_event_store_url }}

Displays store's URL

https://shopjar.com

Shopjar – Notify Admin After Referral Sale

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_order_value }}

Displays total order value

$300

{{ event.sj_event_sales_url }}

Displays admin sales/order URL

https://shopjar.com/admin/orders/456

{{ event.sj_event_referrer_name }}

Displays referrer’s full name

John Smith

{{ event.sj_event_referrer_email }}

Displays referrer’s email address

{{ event.sj_event_referrer_first_name }}

Displays referrer’s first name

John

{{ event.sj_event_referrer_last_name }}

Displays referrer’s last name

Smith

{{ event.sj_event_store_name }}

Displays store's name

Shopjar

{{ event.sj_event_store_url }}

Displays store's URL

https://shopjar.com

Affiliate Program Shortcodes

Use these shortcodes to personalize affiliate emails and notifications with dynamic details like names, links, and earnings.

Shopjar – Notify the Affiliate When His Application Is Approved

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_affiliate_name }}

Displays affiliate’s full name (first & last)

David Lee

{{ event.sj_event_affiliate_email }}

Displays affiliate’s email address

{{ event.sj_event_affiliate_first_name }}

Displays affiliate’s first name

David

{{ event.sj_event_affiliate_last_name }}

Displays affiliate’s last name

Lee

{{ event.sj_event_affiliate_dashboard_url }}

Displays the affiliate’s account page URL

https://shopjar.com/dashboard

{{ event.sj_event_affiliate_url }}

Displays the affiliate link

https://shopjar.com/affiliate-link

{{ event.sj_event_affiliate_code}}

Displays the affiliate code

DAVID10

Shopjar – Notify When an Affiliate Earns a Commission

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_affiliate_name }}

Displays affiliate’s full name

David Lee

{{ event.sj_event_affiliate_email }}

Displays affiliate’s email address

{{ event.sj_event_friend_first_name }}

Displays customer’s first name

Sarah

{{ event.sj_event_friend_last_name }}

Displays customer’s last name

Johnson

{{ event.sj_event_friend_email }}

Displays customer’s email address

{{ event.sj_event_rule_title }}

Displays commission rule title

10% Commission

{{ event.sj_event_amount }}

Displays commission amount

$15

{{ event.sj_event_affiliate_dashboard_url }}

Displays affiliate dashboard URL

https://shopjar.com/dashboard

{{ event.sj_event_store_name }}

Displays store name

Shopjar

{{ event.sj_event_store_url }}

Displays store's URL

https://shopjar.com

Shopjar – Notify When Payout Is Processed for an Affiliate

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_affiliate_name }}

Displays affiliate’s full name

David Lee

{{ event.sj_event_affiliate_email }}

Displays affiliate’s email address

{{ event.sj_event_affiliate_first_name }}

Displays affiliate’s first name

David

{{ event.sj_event_affiliate_last_name }}

Displays affiliate’s last name

Lee

{{ event.sj_event_affiliate_dashboard_url }}

Displays affiliate dashboard URL

https://shopjar.com/dashboard

{{ event.sj_event_paid_amount }}

Displays payout amount

$120

{{ event.sj_event_store_name }}

Displays store name

Shopjar

{{ event.sj_event_payment_method }}

Displays the payment method

Store Credit

Shopjar – Notify When Commission Is Redeemed as a Coupon

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_affiliate_name }}

Displays affiliate’s full name

David Lee

{{ event.sj_event_affiliate_email }}

Displays affiliate’s email address

{{ event.sj_event_affiliate_first_name }}

Displays affiliate’s first name

David

{{ event.sj_event_affiliate_last_name }}

Displays affiliate’s last name

Lee

{{ event.sj_event_affiliate_dashboard_url }}

Displays affiliate dashboard URL

https://shopjar.com/dashboard

{{ event.sj_event_paid_amount }}

Displays redeemed amount

$50

{{ event.sj_event_coupon_code }}

Displays coupon code

REDEEM50

{{ event.sj_event_coupon_expiry_at }}

Displays coupon expiry date

15 Oct 2026

Shopjar – Notify Administrators When an Affiliate Application Is Received

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_affiliate_name }}

Displays affiliate’s full name (first & last)

David Lee

{{ event.sj_event_affiliate_email }}

Displays affiliate’s email address

{{ event.sj_event_affiliate_first_name }}

Displays affiliate’s first name

David

{{ event.sj_event_affiliate_last_name }}

Displays affiliate’s last name

Lee

{{ event.sj_event_store_name }}

Displays store name

Shopjar

{{ event.sj_event_store_url }}

Displays store's URL

https://shopjar.com

Shopjar – Notify Administrators When an Affiliate Sale Is Made

SHORTCODE
DESCRIPTION
EXAMPLE

{{ event.sj_event_order_value }}

Displays the order value

$250

{{ event.sj_event_sales_url }}

Displays sales/admin order URL

https://shopjar.com/admin/orders/123

{{ event.sj_event_affiliate_name }}

Displays affiliate’s full name

David Lee

{{ event.sj_event_affiliate_email }}

Displays affiliate’s email address

{{ event.sj_event_affiliate_first_name }}

Displays affiliate’s first name

David

{{ event.sj_event_affiliate_last_name }}

Displays affiliate’s last name

Lee

{{ event.sj_event_store_url }}

Displays store's URL

https://shopjar.com

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

  1. Navigate to Dashboard -> Flows.

  2. Click Create Flow.

Create Flow

3. Select Build Your Own

Click Build your own
  1. Enter the Flow Name and select the Tag or Create New Tag.

  2. Click Create Flow.

Create Flow

6. Choose Your Metrics and click on API.

API Metrics
  1. Select ShopJar - Shopjar-Email when a friend claims a reward.

New Event
  1. Click Save

  2. Check the metrics and click Save on the Set Up Trigger page.

  3. Confirm and save the trigger selection.

Confirm and Save trigger
  1. Drag and drop Email from the Actions Tab.

Add Email Trigger
  1. Click on Email#1 to customize your email.

  2. Click Select Template.

Select Template
  1. Choose an existing template or create a blank email.

Choose a Template
  1. Add Custom Properties by clicking Add Personalization.

Add Personalization
  1. Insert the required properties and preview the content.

Add Custome Properties
  1. You can preview the mail content by clicking Preview & test.

Preview and Save Template
  1. Click Save.

  2. 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

Referral Program Shortcodes

Affiliate Program Shortcodes

Referral Program Email Triggers

Affiliate Program Email Triggers

Last updated