Klaviyo Integration

Learn how to integrate Klaviyo with Afflr in order to send personalized mails for various actions in the affiliate program

Klaviyo empowers businesses with powerful email marketing tools enabling targeted campaigns and increased engagement. It helps to deliver data-driven strategies to drive sales and foster long-term customer relationships.

Integrate Afflr with Klaviyo

To get the API Key

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

  2. Select Settings

Klaviyo Settings
  1. Select the API Key

  2. Click Create Private API Key

Create Private API
  1. Give a name to the API Key

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

  3. Click Create

Grant Access
  1. Copy the API Key

Copy API Key
  1. Visit Afflr app

  2. Navigate to settings ->Integration

  3. Under Klaviyo, click the Configure button

Configure Klaviyo
  1. Paste the copied API Key

  2. Toggle the enable button

  3. Click Save

Enable Klaviyo

To check if Klaviyo is successfully integrated with Afflr, navigate to Klaviyo Home -> Audience -> Profile

Check if "Afflr bot" is present under the profile.

Afflr Bot in Klaviyo

Klaviyo Trigger Events & Custom Properties in Afflr

Klaviyo triggers certain actions (like sending email or SMS) based on events (like new sign-up). Using Afflr with Klaviyo, you will get access to nine triggers.

Custom properties enable the personalization of the mail content including store name, affiliate name, etc.

You can check the trigger events and custom properties by navigating to the dashboard -> Audience -> Profile and clicking on the Afflr bot.

Klaviyo Events and Custom Properties

The following triggers are available with Afflr:

S.No

Trigger

Function

1

Referral code changed

Triggered when referral code of affiliate is changed

2

New referral sale

Triggered when an affiliate makes a new sale

3

Payout sent

Triggered when payout is sent to the affiliate

4

Signed up as an affiliate via sign up form

Triggered when an affiliate signs up using sign up form

5

Signed up as an affiliate via manual creation

Triggered when an affiliate is added manually by the admin

6

Signed up as an affiliate via manual upload

Triggered when an affiliate list is imported to the app

7

Affiliate rejected for a program

Triggered when an affiliate is rejected from joining a program

8

Affiliate changed program

Triggered when an affiliate is assigned a new program

9

Affiliate approved for a program

Triggered when an affiliate is approved into a program

You can use these triggers to set up an event to perform any action through Klaviyo.

There are various custom properties available that can be added to your mail or SMS.

Property

Definition

Example

afflr_affiliate_code

The affiliate code of the affiliate you are sending mail to will be displayed

Welcome10

afflr_affiliate_commission

The lifetime commission earned by the affiliate will be displayed

1000

afflr_affiliate_link

The affiliate link of the affiliate you are sending mail to will be displayed

your-store-domain.myshopify.com?afflr_id=Welcome10

afflr_affiliate_paid_commission

The commission already paid to the affiliate will be displayed

300

afflr_affiliate_sales_revenue

The total revenue earned through the affiliate's sales will be displayed

5000

afflr_affiliate_source

The source through which the affiliate joined the program is displayed

Manual_Create

afflr_affiliate_status

The status of the affiliate is displayed

APPROVED

afflr_affiliate_unpaid_commission

The commission balance yet to be paid will be displayed

700

afflr_currency_code

The currency in which transactions take place will be displayed

USD

afflr_program_name

The program name of the trigger is displayed

Give $10, Get $10

updated_at

The time and date of any updation that occurred will be displayed

2024-05-09T09:30:34.202Z

Custom Properties of Events

Every Trigger event has its own set of custom properties that you can use to personalize the mail to affiliates.

Property

Definition

Example

affiliate_name

The name of the affiliate is displayed

John

affiliate_email

The email ID of the affiliate is displayed

john@xymail.com

You can use the above two properties on all events to display the affiliate name and email

Following are the additional properties available in some events:

EVENT 1: REFERRAL_CODE_CHANGE

Property

Definition

Example

affiliate_new_referralCode

The new referral code after the change is displayed

WelcomeJohn10

EVENT 2: PAYOUT_SEND

Property

Definition

Example

payout_amount

The amount sent as a payout to the affiliate is displayed

1000

payout_date

The date when the payout is sent is displayed

25-04-2024, 3:37:48 PM

payout_method,

The mode of payment is displayed

Coupon

payout_affiliate_notes

Any additional note mentioned during the payout will be displayed

Payment Sent

EVENT 3: NEW_REFERRAL_SALE

Property

Definition

Example

sales_amount

The total value order of the sales is displayed

250

EVENT 4: AFFILIATE_CHANGE_PROGRAM

Property

Definition

Example

new_program_name

The name of the new program assigned to the affiliate is displayed

Get 15% Give 15%

Creating email workflow in Klaviyo

Let us demonstrate in this section how to send an email to an affiliate in the "Give $10, Get$10" program when a new sale is made.

  1. To activate a trigger, navigate to dashboard -> Flows

  2. Click 'Create Flow'

Create Flow
  1. Click 'Create From Scratch'

Create From Scratch
  1. Enter the name of the flow and select the tag

  2. Click 'Create Flow'

Create Flow
  1. Choose 'Your Metrics'

  2. Click on API

API Metrics
  1. Click on "Afflr - New referral sale"

New Event
  1. Click on Add beside the Profile filter

Profile Filter
  1. Select Add Profile Filter

  2. Select the condition as "Properties about someone", Dimension as "afflr_program_name", Dimension value as "Give $10, Get$10"

  3. Click Save

Save Filter
  1. In the Set up Trigger page, check the metrics and click the save button

  1. In the 'Confirm your trigger selection' dialog box, click confirm and save

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 on Select Template

Select Template
  1. Select from several preexisting templates to customize it or create your own template by clicking 'Create blank email"

  1. You can add custom properties by clicking Add Personalization

  1. You can find all custom properties by scrolling. To personalize the content, click on the required property and then click Insert.

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

  2. Click save after the changes

  1. Click Save after changes are made

  2. To make the flow live, click on 'Review and turn on' in the right top corner

  1. Review and Turn on Dialog box appears. You can choose the Live option from the drop-down box and then click Turn on

Similarly, you can create other trigger events to suit your affiliate program.

Using custom properties in email

Dynamic customer properties in email

Last updated