Klaviyo
The Klaviyo Webhook integration is currently in private beta. We're excited for the public release expected in January 2022. Please reach out to your Klaviyo account rep to request access to the webhooks action in Klaviyo Flows.

Step 1: Flows

From your Dashboard, navigate to your Flows page and use the Create Flow button, or select an existing one by clicking Edit Flow.

Step 2: Actions

If you're creating a flow from scratch, select your Trigger event, set any necessary filters, and click Save the Done to access the Actions step.
Drag and drop the Webhook action into your flow:

Step 3: Webhook Configuration

Under the configuration settings on the left, you'll want to enter the following values to trigger a mailing by sending data our Mailing API:
URL
https://api.heypoplar.com/v1/mailing/
HEADERS
Text
Authorization
Bearer *Test or Production Access Token*
We strongly recommend using the Test Access Token provided in the API section of your Poplar account, to ensure your trigger is set up successfully. After confirming the requests are successfully coming through to the History tab of your campaign for a period of time, swap in the Production token to go live.
Your JSON payload should contain all the data you'd like to share with the platform. This includes recipient info such as name, address, customer ID, and/or email, along with any custom merge tags that may be present if you're using dynamic creative.
campaign_id and optionally creative_id will also have to be included in the payload, to tell the trigger which Poplar campaign and creative to point to. If creative_id is not specified, the platform will automatically randomize between all active creative under the campaign (ideal setup for A/B testing). If a creative is set to Default, the trigger will only fire the defaulted creative.

Emails for Address Enrichment

If you have customer email addresses and want to use them to mail with Poplar's Address Enrichment feature, use the code below as a template for your JSON Body:
1
{
2
"recipient": {
3
"email" : "{{ person.email|default:'' }}"
4
},
5
"campaign_id": "***Insert Campaign ID***",
6
"creative_id": "***Insert Creative ID***"
7
}
Copied!

Address Data

If you have customer Shipping or Billing addresses stored in Klaviyo and want to use them for mailing, use the code below as a template for your JSON Body:
1
{
2
"recipient": {
3
"email" : "{{ person.email|default:'' }}",
4
"first_name": "{{ person.first_name|default:'' }}",
5
"last_name": "{{ person.last_name|default:'' }}",
6
"company": "{{ person|lookup:'$organization'|default:'Company' }}",
7
"address_1": "{{ person|lookup:'$address1'|default:'' }}",
8
"address_2": "{{ person|lookup:'$address2'|default:'' }}",
9
"city": "{{ person|lookup:'$city'|default:'' }}",
10
"state": "{{ person|lookup:'$region'|default:'' }}",
11
"postal_code": "{{ person|lookup:'$zip'|default:'' }}"
12
},
13
"campaign_id": "***Insert Campaign ID***",
14
"creative_id": "***Insert Creative ID***"
15
}
Copied!

Conditional Splits

If some of your customers in the flow have properties filled out for only email or an email & address you'll want to use a conditional split block to filter on a customer address field. Then you can set up two webhooks one specific for email append and one with address fields.
Without the conditional split we'll respond with a 400 error on any customers triggered in the flow that have blank address data.
Setting up a conditional split to handle both address records and email only records.

Step 4: Preview Webhook & Test Trigger

After entering your JSON Body code, click Preview Webhook to view a sample customer profile and ensure all the desired data is being pulled into each field.
The Profile Properties will show all the data for the sample customer, and the Payload Preview will show what data is being pulled into the webhook to be passed to the platform.
Data that appears under Profile Properties isn't guaranteed to be passed to the platform, always make sure the desired data is present in the Payload Preview as well.
Send Test Request to push the webhook preview to Poplar to confirm the connection is successful. If the trigger goes through successfully, you'll see a 201 "Error" in Klaviyo:
201 indicates a successful trigger
If you receive anything but 201 or if you receive a 400 error, consult our Common Questions section below or reach out to [email protected] for assistance.

History Tab

Head to the History tab of your campaign within your Poplar account to see successful tests come through:
Click into one of the mailers to see a PDF proof with the user data applied. Scroll down to the Request Details to confirm the data coming through the platform matches your Klaviyo JSON payload.

Step 5: Go Live!

Once you've confirmed the connection is successful and customer data is coming through to Poplar as desired, swap your Production Access Token in place of your Test token under HEADERS. Make sure to Save your updates, the set your Webhook action to Live!

Manual

The manual setting will accumulate customers when they reach this step in the flow, and will only pass to Poplar if triggered manually.

Common Questions

Why am I receiving a 403 Error after cloning an existing webhook?

For security purposes, if you clone a webhook the access token entered under HEADERS will be hashed at the end:
We recommend copy and pasting your access token again, then re-trying the test to see if it is successful.
Last modified 26d ago