# Klaviyo Integration

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

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FoadXkuHWGMM5VonM7bvO%2F1.png?alt=media&#x26;token=b1988c35-8934-40ed-a1bb-767a15201a50" alt=""><figcaption><p>Klaviyo Settings</p></figcaption></figure>

3. Navigate to **API Key**
4. Click **Create Private API Key**

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FqhONYWUL0MpP0xdBKdcc%2F2.png?alt=media&#x26;token=5e355c24-a421-481d-a63d-8e216de165a2" alt=""><figcaption><p>Create Private API</p></figcaption></figure>

5. Provide a name for the API Key.
6. Select **Grant applications full access for every API scope**.
7. Click **Create**
8. Copy the **API Key**.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FhESjE19JM5YcT7QIfzbT%2F3.png?alt=media&#x26;token=3f415320-a294-4f81-9d52-fb2a1b836fb9" alt=""><figcaption><p>Provide Full Access Key</p></figcaption></figure>

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FJ7jYeTQfSI1GwIQk6kzi%2F4.png?alt=media&#x26;token=79d06cf2-3a50-42ed-a87b-6986e8694252" alt="" width="375"><figcaption><p>Copy API Key</p></figcaption></figure>

9. Visit the **Shopjar app**.
10. Navigate to **Settings -> Integration**.
11. Under **Klaviyo**, toggle the enable button.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2F390FYa2uSIFsJfyycmdi%2Finteration.png?alt=media&#x26;token=e4e2d664-638d-4080-950c-84d31f9a5a6c" alt=""><figcaption><p>Klaviyo Shopjar Integration</p></figcaption></figure>

9. Paste the **API Key**.
10. 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.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FcoNVqdkIZp1dXeGb2I08%2F6.png?alt=media&#x26;token=8777638f-967a-4ede-86e4-fcfbb08d94f3" alt=""><figcaption><p>Shopjar Shopjar in Klaviyo</p></figcaption></figure>

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.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FEJPGCO7zJ6ZCR2q4Zj70%2F7.png?alt=media&#x26;token=f89edd30-09ff-43ea-9690-69d8c6e5cf2e" alt=""><figcaption><p>Klaviyo Events and Custom Properties</p></figcaption></figure>

## 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)**

<table><thead><tr><th width="308">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_referrer_name }}</code></td><td>Displays referrer’s full name</td><td><code>John Smith</code></td></tr><tr><td><code>{{ event.sj_event_referrer_email }}</code></td><td>Displays referrer’s email address</td><td><code>john@example.com</code></td></tr><tr><td><code>{{ event.sj_event_referrer_first_name }}</code></td><td>Displays referrer’s first name</td><td><code>John</code></td></tr><tr><td><code>{{ event.sj_event_referrer_last_name }}</code></td><td>Displays referrer’s last name</td><td><code>Smith</code></td></tr><tr><td><code>{{ event.sj_event_referral_url }}</code></td><td>Displays referral URL</td><td><code>https://shopjar.com/referral_link</code></td></tr><tr><td><code>{{ event.sj_event_store_name }}</code> </td><td>Displays store name</td><td><code>Shopjar</code></td></tr><tr><td><code>{{ event.sj_event_store_url }}</code></td><td>Displays store's URL</td><td><code>https://shopjar.com</code></td></tr></tbody></table>

**Shopjar – Email When Referrer Earns a Reward for Successful Referral**

<table><thead><tr><th width="313">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_referrer_name }}</code></td><td>Displays referrer’s full name</td><td><code>John Smith</code></td></tr><tr><td><code>{{ event.sj_event_referrer_email }}</code></td><td>Displays referrer’s email address</td><td><code>john@example.com</code></td></tr><tr><td><code>{{ event.sj_event_friend_first_name }}</code></td><td>Displays referred friend’s first name</td><td><code>Emily</code></td></tr><tr><td><code>{{ event.sj_event_friend_last_name }}</code></td><td>Displays referred friend’s last name</td><td><code>Clark</code></td></tr><tr><td><code>{{ event.sj_event_friend_email }}</code></td><td>Displays referred friend’s email address</td><td><code>emily@example.com</code></td></tr><tr><td><code>{{ event.sj_event_coupon }}</code></td><td>Displays reward coupon code</td><td><code>REFER10</code></td></tr><tr><td><code>{{ event.sj_event_coupon_expiry_at }}</code></td><td>Displays coupon expiry date</td><td><code>30 Sep 2026</code></td></tr><tr><td><code>{{ event.sj_event_rule_title }}</code></td><td>Displays referral rule title</td><td><code>Refer &#x26; Earn</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_dashboard_url }}</code></td><td>Displays referrer dashboard URL</td><td><code>https://shopjar.com/dashboard</code></td></tr></tbody></table>

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

<table><thead><tr><th width="312">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_referrer_name }}</code></td><td>Displays referrer’s full name</td><td><code>John Smith</code></td></tr><tr><td><code>{{ event.sj_event_referrer_email }}</code></td><td>Displays referrer’s email address</td><td><code>john@example.com</code></td></tr><tr><td><code>{{ event.sj_event_referrer_first_name }}</code></td><td>Displays referrer’s first name</td><td><code>John</code></td></tr><tr><td><code>{{ event.sj_event_referrer_last_name }}</code></td><td>Displays referrer’s last name</td><td><code>Smith</code></td></tr><tr><td><code>{{ event.sj_event_rule_title }}</code></td><td>Displays referral rule title</td><td><code>Invite Friends</code></td></tr><tr><td><code>{{ event.sj_event_coupon_code }}</code></td><td>Displays referral coupon code</td><td><code>FRIEND15</code></td></tr><tr><td><code>{{ event.sj_event_coupon_expire_at }}</code></td><td>Displays coupon expiry date</td><td><code>15 Oct 2026</code></td></tr><tr><td><code>{{ event.sj_event_store_url }}</code></td><td>Displays store URL</td><td><code>https://shopjar.com</code></td></tr><tr><td><code>{{ event.sj_event_store_name }}</code></td><td>Displays Store's name</td><td><code>Shopjar</code></td></tr><tr><td><code>{{ event. sj_event_referrer_link }}</code></td><td>Displays referrer's link</td><td><code>https://shopjar.com/referrer</code></td></tr></tbody></table>

**Shopjar – Email When a Friend Claims a Reward**

<table><thead><tr><th width="294.5">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_friend_name }}</code></td><td>Displays friend’s full name</td><td><code>Emily Clark</code></td></tr><tr><td><code>{{ event.sj_event_friend_first_name }}</code></td><td>Displays friend’s first name</td><td><code>Emily</code></td></tr><tr><td><code>{{ event.sj_event_friend_last_name }}</code></td><td>Displays friend’s last name</td><td><code>Clark</code></td></tr><tr><td><code>{{ event.sj_event_friend_email }}</code></td><td>Displays friend’s email address</td><td><code>emily@example.com</code></td></tr><tr><td><code>{{ event.sj_event_coupon }}</code></td><td>Displays reward coupon code</td><td><code>WELCOME10</code></td></tr><tr><td><code>{{ event.sj_event_coupon_expiry_at }}</code></td><td>Displays coupon expiry date</td><td><code>20 Oct 2026</code></td></tr><tr><td><code>{{ event.sj_event_rule_title }}</code></td><td>Displays referral rule title</td><td><code>Friend Reward</code></td></tr><tr><td><code>{{ event.sj_event_referrer_name }}</code> </td><td>Displays referrer's full name</td><td><code>John Smith</code></td></tr><tr><td><code>{{ event.sj_event_referrer_first_name}}</code></td><td>Displays referrer's first name</td><td><code>John</code></td></tr><tr><td><code>{{ event.sj_event_referrer_last_name }}</code></td><td>Displays referrer's last name</td><td><code>Smith</code></td></tr><tr><td><code>{{ event.sj_event_referrer_email }}</code></td><td>Displays referrer's email address</td><td><code>john@example.com</code></td></tr><tr><td><code>{{ event.sj_event_store_name }}</code></td><td>Displays store's name</td><td><code>Shopjar</code></td></tr><tr><td><code>{{ event.sj_event_store_url }}</code></td><td>Displays store's URL</td><td><code>https://shopjar.com</code></td></tr></tbody></table>

**Shopjar – Notify Admin After Referral Sale**

<table><thead><tr><th width="295">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_order_value }}</code></td><td>Displays total order value</td><td><code>$300</code></td></tr><tr><td><code>{{ event.sj_event_sales_url }}</code></td><td>Displays admin sales/order URL</td><td><code>https://shopjar.com/admin/orders/456</code></td></tr><tr><td><code>{{ event.sj_event_referrer_name }}</code></td><td>Displays referrer’s full name</td><td><code>John Smith</code></td></tr><tr><td><code>{{ event.sj_event_referrer_email }}</code></td><td>Displays referrer’s email address</td><td><code>john@example.com</code></td></tr><tr><td><code>{{ event.sj_event_referrer_first_name }}</code></td><td>Displays referrer’s first name</td><td><code>John</code></td></tr><tr><td><code>{{ event.sj_event_referrer_last_name }}</code></td><td>Displays referrer’s last name</td><td><code>Smith</code></td></tr><tr><td><code>{{ event.sj_event_store_name }}</code></td><td>Displays store's name</td><td><code>Shopjar</code></td></tr><tr><td><code>{{ event.sj_event_store_url }}</code></td><td>Displays store's URL</td><td><code>https://shopjar.com</code></td></tr></tbody></table>

## 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**

<table><thead><tr><th width="313.5">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_affiliate_name }}</code></td><td>Displays affiliate’s full name (first &#x26; last)</td><td><code>David Lee</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_email }}</code></td><td>Displays affiliate’s email address</td><td><code>david@example.com</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_first_name }}</code></td><td>Displays affiliate’s first name</td><td><code>David</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_last_name }}</code></td><td>Displays affiliate’s last name</td><td><code>Lee</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_dashboard_url }}</code></td><td>Displays the affiliate’s account page URL</td><td><code>https://shopjar.com/dashboard</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_url }}</code></td><td>Displays the affiliate link</td><td><code>https://shopjar.com/affiliate-link</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_code}}</code></td><td>Displays the affiliate code</td><td><code>DAVID10</code></td></tr></tbody></table>

**Shopjar – Notify When an Affiliate Earns a Commission**

<table><thead><tr><th width="321.5">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_affiliate_name }}</code></td><td>Displays affiliate’s full name</td><td><code>David Lee</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_email }}</code></td><td>Displays affiliate’s email address</td><td><code>david@example.com</code></td></tr><tr><td><code>{{ event.sj_event_friend_first_name }}</code></td><td>Displays customer’s first name</td><td><code>Sarah</code></td></tr><tr><td><code>{{ event.sj_event_friend_last_name }}</code></td><td>Displays customer’s last name</td><td><code>Johnson</code></td></tr><tr><td><code>{{ event.sj_event_friend_email }}</code></td><td>Displays customer’s email address</td><td><code>sarah@example.com</code></td></tr><tr><td><code>{{ event.sj_event_rule_title }}</code></td><td>Displays commission rule title</td><td><code>10% Commission</code></td></tr><tr><td><code>{{ event.sj_event_amount }}</code></td><td>Displays commission amount</td><td><code>$15</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_dashboard_url }}</code></td><td>Displays affiliate dashboard URL</td><td><code>https://shopjar.com/dashboard</code></td></tr><tr><td><code>{{ event.sj_event_store_name }}</code></td><td>Displays store name</td><td><code>Shopjar</code></td></tr><tr><td><code>{{ event.sj_event_store_url }}</code></td><td>Displays store's URL</td><td><code>https://shopjar.com</code></td></tr></tbody></table>

**Shopjar – Notify When Payout Is Processed for an Affiliate**

<table><thead><tr><th width="313">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_affiliate_name }}</code></td><td>Displays affiliate’s full name</td><td><code>David Lee</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_email }}</code></td><td>Displays affiliate’s email address</td><td><code>david@example.com</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_first_name }}</code></td><td>Displays affiliate’s first name</td><td><code>David</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_last_name }}</code></td><td>Displays affiliate’s last name</td><td><code>Lee</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_dashboard_url }}</code></td><td>Displays affiliate dashboard URL</td><td><code>https://shopjar.com/dashboard</code></td></tr><tr><td><code>{{ event.sj_event_paid_amount }}</code></td><td>Displays payout amount</td><td><code>$120</code></td></tr><tr><td><code>{{ event.sj_event_store_name }}</code></td><td>Displays store name</td><td><code>Shopjar</code></td></tr><tr><td><code>{{ event.sj_event_payment_method }}</code></td><td>Displays the payment method</td><td><code>Store Credit</code></td></tr></tbody></table>

**Shopjar – Notify When Commission Is Redeemed as a Coupon**

<table><thead><tr><th width="317.5">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_affiliate_name }}</code></td><td>Displays affiliate’s full name</td><td><code>David Lee</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_email }}</code></td><td>Displays affiliate’s email address</td><td><code>david@example.com</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_first_name }}</code></td><td>Displays affiliate’s first name</td><td><code>David</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_last_name }}</code></td><td>Displays affiliate’s last name</td><td><code>Lee</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_dashboard_url }}</code></td><td>Displays affiliate dashboard URL</td><td><code>https://shopjar.com/dashboard</code></td></tr><tr><td><code>{{ event.sj_event_paid_amount }}</code></td><td>Displays redeemed amount</td><td><code>$50</code></td></tr><tr><td><code>{{ event.sj_event_coupon_code }}</code></td><td>Displays coupon code</td><td><code>REDEEM50</code></td></tr><tr><td><code>{{ event.sj_event_coupon_expiry_at }}</code></td><td>Displays coupon expiry date</td><td><code>15 Oct 2026</code></td></tr></tbody></table>

**Shopjar – Notify Administrators When an Affiliate Application Is Received**

<table><thead><tr><th width="321.5">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_affiliate_name }}</code></td><td>Displays affiliate’s full name (first &#x26; last)</td><td><code>David Lee</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_email }}</code></td><td>Displays affiliate’s email address</td><td><code>david@example.com</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_first_name }}</code></td><td>Displays affiliate’s first name</td><td><code>David</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_last_name }}</code></td><td>Displays affiliate’s last name</td><td><code>Lee</code></td></tr><tr><td><code>{{ event.sj_event_store_name }}</code></td><td>Displays store name</td><td><code>Shopjar</code></td></tr><tr><td><code>{{ event.sj_event_store_url }}</code></td><td>Displays store's URL</td><td><code>https://shopjar.com</code></td></tr></tbody></table>

**Shopjar – Notify Administrators When an Affiliate Sale Is Made**

<table><thead><tr><th width="324">SHORTCODE</th><th>DESCRIPTION</th><th>EXAMPLE</th></tr></thead><tbody><tr><td><code>{{ event.sj_event_order_value }}</code></td><td>Displays the order value</td><td><code>$250</code></td></tr><tr><td><code>{{ event.sj_event_sales_url }}</code></td><td>Displays sales/admin order URL</td><td><code>https://shopjar.com/admin/orders/123</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_name }}</code></td><td>Displays affiliate’s full name</td><td><code>David Lee</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_email }}</code></td><td>Displays affiliate’s email address</td><td><code>david@example.com</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_first_name }}</code></td><td>Displays affiliate’s first name</td><td><code>David</code></td></tr><tr><td><code>{{ event.sj_event_affiliate_last_name }}</code></td><td>Displays affiliate’s last name</td><td><code>Lee</code></td></tr><tr><td><code>{{ event.sj_event_store_url }}</code></td><td>Displays store's URL</td><td><code>https://shopjar.com</code></td></tr></tbody></table>

## 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**.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FpaJxlvnfapmUBg8QiT0O%2F2.png?alt=media&#x26;token=7ee560e3-ef88-46bd-8f2c-3a4175ed861b" alt=""><figcaption><p>Create Flow</p></figcaption></figure>

3\. Select **Build Your Own**

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2F4lvDFh51rV7RXPFXJWel%2F4.png?alt=media&#x26;token=cb877f53-720e-4737-8996-b24924e0e9c0" alt=""><figcaption><p>Click Build your own</p></figcaption></figure>

4. Enter the **Flow Name** and select the **Tag or Create New Tag**.
5. Click **Create Flow**.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FGvcGOZhSVE8uBDa0kRTD%2FScreenshot%202025-02-26%20at%205.14.39%20PM.png?alt=media&#x26;token=2004c014-bc61-4f0f-8349-e00014e841ef" alt=""><figcaption><p>Create Flow</p></figcaption></figure>

\
6\. Choose **Your Metrics** and click on **API**.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2F2Mo1pTBshs37sZt83dOM%2F5.png?alt=media&#x26;token=66330180-f8bc-448f-83fb-9cbe2fa37a24" alt=""><figcaption><p>API Metrics</p></figcaption></figure>

7. Select **ShopJar -** Shopjar-Email when a friend claims a rewar&#x64;**.**

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2Fs0sItNHy1DpWdVMfIzif%2F6.png?alt=media&#x26;token=30ae19ab-78aa-43f5-8a04-713c7573de1d" alt=""><figcaption><p>New Event</p></figcaption></figure>

8. Click **Save**
9. Check the metrics and click **Save** on the **Set Up Trigger** page.
10. Confirm and save the trigger selection.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2Flej1fdY9b6JggKwLeAQ9%2FScreenshot%202025-02-27%20at%2012.15.00%20PM.png?alt=media&#x26;token=184a4a49-4040-4769-9e59-6d5611e1fc0e" alt=""><figcaption><p>Confirm and Save trigger</p></figcaption></figure>

11. Drag and drop **Email** from the **Actions Tab**.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2F3JY2HfzAj4mShuqIErQA%2F7.png?alt=media&#x26;token=1b20e676-59df-415b-8fe0-ac3f5e0d8222" alt=""><figcaption><p>Add Email Trigger</p></figcaption></figure>

12. Click on **Email#1** to customize your email.
13. Click **Select Template**.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2Fg2J2P8UhH49jXGrB4PTp%2F10.png?alt=media&#x26;token=d5259159-af50-4424-8ea1-d76630ad4276" alt=""><figcaption><p>Select Template</p></figcaption></figure>

14. Choose an existing template or create a blank email.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2F9I9ZmXhksqzML39MFEBi%2F9.png?alt=media&#x26;token=bf87e515-475e-4188-b514-a92f928aa995" alt=""><figcaption><p>Choose a Template</p></figcaption></figure>

15. Add **Custom Properties** by clicking **Add Personalization**.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FHsxF5zJ4nFPZQas8bCrG%2F12.png?alt=media&#x26;token=39f34b1b-242a-468c-8226-67ad7c5c2e95" alt=""><figcaption><p>Add Personalization</p></figcaption></figure>

16. Insert the required properties and preview the content.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2F49j0kAwigSOsp9mlWGlM%2F14.png?alt=media&#x26;token=b5af33a0-8741-43e3-95cc-3b89f5fea49c" alt=""><figcaption><p>Add Custome Properties</p></figcaption></figure>

17. You can preview the mail content by clicking **Preview & test**.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FkWb9PpxIfHHPpR6Sk2Nb%2F15.png?alt=media&#x26;token=72c7380c-74b7-47ef-9401-829a4bc5075e" alt=""><figcaption><p>Preview and Save Template</p></figcaption></figure>

18. Click **Save**.
19. To make the flow live, click **Review and Turn On**.

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2F33qqmOax1rsLWTF00GYQ%2F16.png?alt=media&#x26;token=f3403005-3a06-4f09-ab02-8323e5ed3724" alt=""><figcaption><p>Review and Save</p></figcaption></figure>

\
20\. In the **Review and Turn On** dialog box, choose **Live** from the dropdown and click **Turn On**

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FfcDmkXvIImVnbJwK0BoU%2F18.png?alt=media&#x26;token=df1af84b-b8bc-4903-b8fd-0315a120b6c4" alt=""><figcaption><p>Review and Turn On - Click Update Status</p></figcaption></figure>

<figure><img src="https://2355701265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlqBPcpO5gfPUmUbHuqBK%2Fuploads%2FMNoQxnDBbDt6yYUDtFtr%2F19.png?alt=media&#x26;token=524a5e76-e413-4fb9-b22e-5f9c86c96a55" alt=""><figcaption><p>Click Save</p></figcaption></figure>

Similarly, you can create other trigger events to fit your Referral and affiliate program requirements

## Links for Reference

[Referral Program Shortcodes](#referral-program-shortcodes)

[Affiliate Program Shortcodes](#affiliate-program-shortcodes)

[Referral Program Email Triggers](#referral-program-email-triggers)

[Affiliate Program Email Triggers](#affiliate-program-email-triggers)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shopjar.co/integration/klaviyo-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
