You will learn

Learn about webhooks in flows and how they send information from Klaviyo to your third-party tools and applications. It’s important to note that setting up webhooks can be complex. It’s advised to have development knowledge or development resources to correctly complete this setup. If you are looking for these development directions, learn how to add a webhook action to a flow.

What are webhooks?

Simply put, webhooks create a comprehensive way for all your marketing and data tools to talk to one another. As an example, let’s imagine how online banking and fraud protection on your credit card work. If someone fraudulently uses your card, that transaction logs at the retailer and then sends to your bank, who then analyzes it and alerts you via phone or email when there is an issue with your card. This purchase prompted a series of systems to communicate, move this data, and ultimately alert you. These systems are most likely using webhooks to pass this data along. Webhooks:

  • Allow your application to pass information or “call” other applications, tools, and servers via HTTP request.
  • Send information about an event that has occurred (e.g. an order placed, a new customer subscribed, etc.).
  • Can tell your system that an event has happened or notify you of that event.

The webhook sends information to the destination you specify. This lets you share data from Klaviyo with your other marketing tools and applications.

You should not use webhooks to subscribe profiles to new lists.

Key components of webhooks

Webhooks are made of a few pieces:

  • Trigger
    The event that causes a webhook to fire
  • Message (or “the payload”)
    The data sent in the request body, such as details about the profile or the event that triggered the flow. The destination URL is configured separately.
  • Headers
    A place to pass additional information (such as authentication)

Webhooks in flows

Flow webhooks are actions within flows. When a profile reaches the webhook action, Klaviyo sends a POST request to the configured destination with the data you included in the payload, such as details about the profile or the event that triggered the flow. Klaviyo also offers webhooks in Advanced KDP, which work outside of flows.

A flow webhook sends when a profile reaches the webhook action, not necessarily as soon as the profile meets the flow trigger criteria. You can add this action to flows triggered by a metric, list, segment, or date property. A change to a profile property does not itself trigger a flow webhook, although a date property can be used as a flow trigger. In a metric-triggered flow, you can include data from the event that started the flow in the webhook payload.
Examples of metrics that can trigger flows include:

  • Placed Order
  • Started Checkout
  • Subscribed to List

Klaviyo cannot assist with any data issues outside of our system, should the failure be caused by your application or the data not being sent correctly. We suggest reviewing our How to add a webhook action to a flow guide to make sure you have correctly set up the action.

Webhook use cases

It is key to understand the flow triggers that can generate webhooks, as well as some practical use cases on how to implement these with your other applications.

Examples include:

  • Sending a message to re-engage lapsed customers.
  • Sending a message on your customers’ birthday, and giving them a gift in the form of loyalty points.
  • Sending the webhook any time a new subscriber joins your lists. You can send their profile data to another platform.
  • Sending a customer an NPS survey to learn more about your subscribers.
  • Sending a message or POST request that triggers based on a subscriber being added to a segment or list. However, note that we do not support the “Received Email" event as a flow trigger.

Real-world example

You decide to connect Klaviyo to your direct mailing tool so you can communicate with customers online and by mail. Your new customer Shah went to your website and bought a few items from your ecommerce store. You want to send Shah a print catalog of your full collection in the future.

Here is where the webhook can tie these experiences together. You would already have your ecommerce store integrated into Klaviyo. In Klaviyo, you set up a flow triggered by the Placed Order event. Add a webhook action, enter your direct mail tool’s destination URL, and include details like the customer’s name, address, and what they ordered in the payload.

When someone like Shah places an order and reaches the webhook action in the flow, Klaviyo sends the configured payload to your direct mail tool. The tool can then use those details to arrange a print catalog mailing.

What can Klaviyo webhooks not do?

Flow webhooks are not a bidirectional data sync. A flow webhook sends an HTTP request from Klaviyo to the destination you configure; it does not itself bring data from that destination back into Klaviyo. To send data into Klaviyo, use an appropriate integration or API separately.

It’s also important to consider the events that you choose to prompt your information, how often this will happen, and where that data ultimately goes in your system. Klaviyo will provide the framework for connecting your flows data to a platform, but the ultimate value depends on where that information goes after leaving Klaviyo, and what it potentially prompts. Therefore, Klaviyo can only monitor if the webhook is working and not where the data is going or what it is doing after it leaves our system.

Finally, it’s important to consider the data that Klaviyo can and cannot send via a webhook. Klaviyo cannot send certain data points through a webhook based on the way that our flow triggers function. For example, we cannot send email open engagement data for every time that a subscriber opens an email, as you cannot trigger a flow based on opens.

Similarly, while you can use event-based dynamic variables in your webhook payload in an event-triggered flow, the available variables are connected to the original event that triggered the flow (i.e., just like with flow emails). For example, if you have an Abandoned Cart flow triggered by the Started Checkout event, you can use dynamic variables from that event in the webhook’s payload. But, if in the same flow you’re also using a flow filter or split using an Added to Cart metric, you cannot include this additional data in the webhook payload.

Thus, when setting up your webhooks, it’s important to consider what flows can support for data points and what you are looking to achieve in your webhook setup.

Currently, coupon codes, web feeds, and product feeds are not supported in flow webhooks.

Who should set up webhooks?

As noted above, the systems that you connect to Klaviyo, the manner in which the information or data is packaged, and what data or info you choose to grab, are completely at your discretion.

With this in mind, we strongly recommend a development resource to set up webhooks to ensure that the right events are sent from Klaviyo and post correctly in your application. Klaviyo will also provide you with errors if any webhook fails. However, we may not be able to diagnose any deeper issues with the webhook setup, or how the data is ultimately posting to your application.

Requirements and considerations

In addition to making sure you have a developer resource to properly set up your webhook and test it on your accompanying system, Klaviyo has some key requirements for using this functionality:

  • Only user roles who have access to create flows can set up webhooks in Klaviyo. This includes the roles of Manager, Admin, and Owner.
  • For added security, you must have multi-factor authentication (MFA) enabled for your user to add a webhook action to a flow. If it is not enabled, Klaviyo prompts you to set it up when you try to add the action.

Ready to set up?

Webhooks send data from Klaviyo to your other systems or applications. If you are ready to set up a flow webhook, read our developer guide, How to add a webhook action to a flow.

Additional resources

  • Understanding flow triggers and filters

    Learn more about Klaviyo filters which can be used to further narrow triggers or actions in flows. For example, if a flow triggers when someone places an order, a trigger filter could be added to limit this to specific product types. Trigger filters are evaluated alongside the trigger itself to only let certain people into a flow.

  • How to preview a flow trigger setup

    Learn how to use the flow trigger setup preview tool to ensure your flow is set up as you intended. This will help you understand how your flow is going to behave based on the trigger and profile filters you've added.

  • How to add a webhook action to a flow
Was this article helpful?
Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Partners
Hire a Klaviyo-certified expert to help you with a specific task, or for ongoing marketing management.
Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance
Availability varies by location and plan type