Triggering direct mail from your Klaviyo Marketing Automation Tool is made to be simple with the Postalytics/Klaviyo Integration. With a bit of set up to connect the two accounts, Postalytics will be “listening” and ready to receive your data for print, mail and tracking!

What's Needed to Get Started?

  • A Postalytics Account
  • A Postalytics Triggered Drip Campaign
  • A Klaviyo Account with an Owner, Admin, or Manager Role (to manage API keys)
  • A Workflow set up within Klaviyo

Additionally, Postalytics will need the following permissions:

  • Accounts (read)
  • Lists (read & write)
  • Events (read & write)
  • Tags (read & write)
  • Metrics (read & write)

Let's Get Set Up!

Begin by navigating to the the Connect page, within your Postalytics account. You'll find this in the drop down menu under your user name.

Head to the marketplace by clicking on 'Connect App Marketplace' in the upper righthand corner, then select 'details' under the Klaviyo icon. You’ll be taken to the following page:

Click 'Add Integration', and a popup will appear, giving you the opportunity to name your integration, as well as enter the API key from your Klaviyo account. This is necessary to allow Postalytics to “talk” with your Klaviyo account.

              Leave this window open. Next, open a separate tab and login to your Klaviyo account. You’ll be able to obtain and make changes to your API keys from your account's Settings page under the API Keys tab. To manage API keys, you must have an Owner, Admin, or Manager role on the account.

Klaviyo API keys tab showing public and private keys, and Create Private API Key with arrow and blue background

For more information on obtaining your API key, please visit: Get API credentials | Klaviyo Developer

Copy and paste the Klaviyo API key into the box on the Postalytics popup page that you left open previously, then click ‘Next’.

On the following screen, you’ll be able to select which event updates you would like Postalytics to sync back as metrics on the matching contact. Note that event metrics are only supported for Klaviyo profiles with an associated email. 

With this option, you can easily set up direct mail to be a trackable part of your multi-channel marketing strategy or other automated workflows. 

Learn more about Tracking Postalytics Campaign Events As Metrics In Klaviyo.

Select which, if any, events you would like updates on and click ‘Next’.

                    

Postalytics will now wait for a test webhook sent from a Klaviyo webhook flow in order to connect and set up the data mapping. Leave this window open.

Navigate back to your Klaviyo account, then head to Flows and click ‘Create Flow’ to create a new workflow. Create it using with the Trigger of your choice. Postalytics recommends ‘When a profile is added to a list’. 

Next, add an action, and search for the action "Webhook". A webhook here will be used to send data to Postalytics from your various triggers for Triggered Drip Campaigns.

In the webhook, you’ll set up the following details:

  1. Set the method to POST. 

  2. The URL will come from the wizard window left open in Postalytics. 

Under "Send a test Webhook from Klaviyo" within the Postalytics wizard window, there is a test URL available to copy, this is the listening point we will be sending the initial set up to. Copy this URL and paste it into the URL field of the webhook action within your Klaviyo workflow.

  1. Under "Headers", add two sections. 

    1. The first is "Authorization", and the data field is the "Authorization" listed in the Postalytics window under "Request Headers", just below the URL that was copied in the previous step. Be sure to include the word "Basic" when copying the Authorization.L 

    2. The second is "Content-type" and the data field is "application/json"

Your webhook should resemble the following:

To transfer data, you will need to add the details you wish to send within the JSON body portion of the webhook. Copy the following text and paste it into the JSON body. These fields are the minimum required information for a profile to have mail sent to. Additional fields may be added as you need. We’ve included email as the id here so that events can be synced back.

{

"id":"{{person.Email|default:''}}",

"first":"{{person.first_name|default:''}}",

"last":"{{person.last_name|default:''}}",

"address":"{{person|lookup:'$address1'|default:''}}",

"address2":"{{person|lookup:'$address2'|default:''}}",

"city":"{{person.City|default:''}}",

"state":"{{person.Region|default:''}}",

"zip":"{{person|lookup:'$zip'|default:''}}"

}

Save your webhook. 

It's Time to Test it Out!

Now it is time to test to make sure the workflow is active. In the bottom left-hand corner of the window, click the 'Preview Webhook' button, and select a profile to test with. Scroll to the bottom of the modal window, and you should see the following:

This payload should match the profile data of the account used for testing. Click 'Send Test Request'. 

Return to the open wizard window in Postalytics. You should now have the ability to map the fields coming in from Klaviyo to the proper fields used by Postalytics. 

For each field, scroll through and match them together.  

               

Click 'Complete' once they are mapped properly. 

Your Klaviyo Integration is Ready!

To use Klaviyo for a specific campaign, you’ll need to create a new Triggered Drip Campaign, selecting Klaviyo as source of data, then completing all of the remaining steps to set up the campaign. 

Alternatively, for a Smart Send Campaign, you may import contacts directly from Klaviyo. See “Import Lists from Klaviyo for Smart Send Campaigns” for more details.

Once your Triggered Drip Campaign is set up, some of the details from it will need to be added to the webhook workflow created within Klaviyo. 

Open your campaign list, find the newly created campaign, click on the ellipsis next to it, and select 'Settings'. 

This will bring you to a page with the information about your current active Triggered Drip Campaign. 

 

 

Copy the Webhook URL, and add that as the URL in our Klaviyo workflow webhook instead. 

The original URL used in the set up step was a test URL for the initial connection only. 

Each campaign you create will require its own Klaviyo workflow webhook pointing to the individual Triggered Drip Campaign's specific URL. Additionally, all workflows in Klaviyo will need to be flipped from draft mode to live mode.