What’s a Webhook?

Published on June 22, 2018/Last edited on June 22, 2018/8 min read

What’s a Webhook?
AUTHOR
Namkyu Oh
Solutions Consultant at Braze

It happens to all of us. You’re in a meeting, and someone throws around a term that FEELS familiar and SOUNDS familiar—but if you were put on the spot and asked, in front of all your peers, what it actually meant, you’d be stuck hemming and hawing until either the meeting ends or you panic, pull the fire alarm, and flee the building in tears.

As marketing and customer engagement becomes increasingly data-driven and dependent on technology to reach its full potential, it can feel like there are more and more of these terms: SDK and PII and API. Today, we’re going to take a quick look at one of the more evocative sounding of these need-to-know terms, namely the humble “webhook.”

So, what’s a webhook?

Essentially, a webhook is a communication from one application or service to another that takes place following a pre-selected event. Webhooks are a type of HTTP callback and are sometimes referred to as a “reverse API,” though that doesn’t do a lot to clarify what webhooks are and how they work.

Okay—but could you maybe clarify what webhooks are and how they work?

It’s like this: in the internet era, no digital system is an island (or, if it is, it shouldn’t be). Disconnected systems lead to disconnected user experiences, and brands that care about building sustainable relationships with their customers need ways to for their different technologies to communicate effectively.

Webhooks are one of those ways.

At its core, a webhook is an event-based method for two separate systems to take effective action based on data that is transmitted in real time. That message between the application isn’t the digital version of “sup,” but rather the passage of vital information that’s needed to provide the receiving system with a set of instruction on when and how to perform a specific task. Because of this, webhooks can provide marketers with more dynamic and flexible access to data and programmatic functionality, and also empower them to set up triggered workflows and customer journeys that streamline processes.

Wait, what makes webhooks different from APIs?

Both APIs and webhooks are used to support communications between distinct digital systems, but how those communications are carried out and what situations they’re each best suited for tend to be a little different.

When you leverage an API to communication between systems, it tends to be a call-and-response action: the initial system makes an API call to the receiving system’s API endpoint, and gets a response (in the form of data, images, or other digital assets). With webhooks, the communication functions more like a list of instructions—the first system tells the second what to do (for instance, add 10 loyalty points to a customer’s airline loyalty account) as well as when, exactly, it should do it (e.g. when that customer completes their fifth flight booking). That “If This, Then That” aspect of webhooks gives them a ton of flexibility and makes them a powerful tool for filling gaps in your customers’ brand experience.

At their best, webhooks can be a powerful way to support automated marketing practices. As long as there’s an event and service that’s capable of acting on that event, marketers can use even non-app, non-website events to drive and influence their customers’ brand experiences. Webhooks can build tight connections—often in situations where API integrations aren’t workable or would be too costly—and can help ensure that technologies that are valuable to your marketing are actually in sync with each other, when and where it makes the most sense.

Um, how about an example?

Quizlet enables studiers to review information through flashcards, tests, and games. With five study modes, the online platform wanted to nudge users to check out different modes and games they weren’t already using. But when collecting the highly nuanced data they needed to effectively run its campaigns, Quizlet ran into two issues: Accuracy and data usage. They wanted to retain the full-spectrum of historical data for every user’s mode usage and efficiently collect new information, but struggled to ensure data accuracy without collecting far more data than they needed.

The engineering team at Quizlet took an agile, collaborative approach when determining their next steps, turning to their marketing team for further help on optimizing data collection. By bouncing ideas off of each other, Quizlet landed on using webhooks to effectively address their data issue.

Every time a Quizlet user selected a study mode in the app or on the web (logged in state only), that event was collected by the Braze SDK and sent to Braze via a Rest API. That event triggered an Action-Based Campaign, which in turn sent a webhook with a JSON object personalized via Liquid to the Braze Rest API users/track endpoint if the following criteria was met. Each of the seven study modes were set up with their own webhook and re-eligibility was disallowed to ensure that new data points were not being created for a person who used the same mode more than once- each user profile would use up to seven data points to represent the seven possible study modes they could be using.

Are there any guidelines about when to use webhooks?

Well, yeah—of course there are.

One big one to keep in mind: time is money. Or, at least, the value of the data you have on your customers begins to decline the moment that it’s generated—and that means that managing and acting on the data you have in the moment is a key factor in the effectiveness of your customer engagement efforts.

Webhooks can be a key part of making that happen. Beyond supporting the sending of customer outreach via OTT messaging platforms like Facebook messenger, Line or Kik, webhooks can also be a key tool for ensuring that essential actions happen seamlessly for your users.

At Braze, one common practice that we see a lot from our customers is using webhooks to send discounts or credits to a user when they carry out particular actions. With Braze’s action-based engagement, brands can list out the types of triggering events that warrant handing out a discount—and then, as soon as the Braze platform receives notice that a user has carried out a relevant event (which could be viewing a certain product or beating a certain level in a mobile game or abandoning a digital shopping cart), a webhook can be sent to a client’s backend or the Braze API for handling user profile updates, automatically adding the appropriate credit to that individual’s account in real time.

Note that making this experience happen requires no engineering, no pulling of lists, no tagging of additional information—just the initial setup of a webhook between the relevant systems. That’s a big win when you’re looking to ensure a cohesive customer experience without making your engineering team support you around the clock.

Makes sense. Any other big use cases?

It’s also common to see webhooks used to update to other technologies or servers about key user actions that happen outside their specific purview. For instance, if a user clicks unsubscribe on an email (meaning that you’re no longer legally allowed to send them messages in that channel), it’s smart to have a webhook set to alert and ping other systems—such as an analytics database or CRM—with that same information, ensuring a holistic view of that users’ behavior.

Beyond that, consider leaning into webhooks’ fundamental flexibility—this is a tool that’s made to support a wide range of actions and creative approaches to addressing customer engagement needs. You don’t see a lot of customer engagement platforms adding direct mail as a channel, for instance, but with webhooks it’s possible for brands to leverage those platforms’ support for targeted, segmented outreach to send postcards or other direct mailers to customers via direct mail services like Lob. By embracing that flexibility, it’s possible to use webhooks to push your marketing strategy in new, innovative directions without major new expense or engineering support. That’s a big deal.

Anything else?

Don’t lose sight of what makes webhooks special. Unlike APIs, they don’t require an initial request to function—and because they don’t need to poll and type of database to operate, webhooks can truly operate in real time as new information becomes available and triggers actions. These qualities make it possible for webhooks to tightly connect systems, even when the technology ecosystems you’re working with aren’t as integrated together as you might like.

When you’re working with systems that aren’t built to work together, marketers often find themselves in positions where they have to make due with incomplete context or delayed information, resulting in subpar or frustrating brand experiences for their brand’s customers. Alongside APIs and SDKs, webhooks give marketers the ability to set up and trigger actions off any event that happens on their app or website in real time. That can be transformative. This ability to take immediate, appropriate action is central to effective in-the-moment interactions between and a brand and its customers and can make webhooks as important a channel for customer engagement as things like email or push notifications.

So take the opportunity to see whether webhooks can help connect your systems more effectively and send the data necessary to power the brilliant brand experiences you dream of supporting. Your customers will thank you.

Related Tags

Releated Content

View the Blog

Join the movement to journey orchestration.

The move to highly-intelligent, always-on journey orchestration is happening. And much of it is happening on our platform. Join brands of all sizes who are taking the craft of customer engagement to the next level.