5 examples of using webhooks

In many cases, an integration’s performance hinges on its ability to sync data in real-time. Whenever this applies to an integration you’re looking to build, you can use webhooks.

We’ll help you determine when, exactly, it makes sense to use webhooks in your integrations by covering how they work and several use cases they’re well suited to support.

What is a webhook?

It’s a specific, event-driven method of sharing information between applications in real-time. 

Here’s how it generally works: Once a predefined event occurs in an application (the “source application”), it makes a POST request to a URL endpoint that was registered by another application (the “destination application"). 

The destination application then processes the information provided in the request and takes the appropriate set of follow-up actions within their system.

Visual illustration of a webhook

As a side note, webhooks shouldn’t be used interchangeably with polling. API polling refers to the process of making repeated requests to an API endpoint, so this method doesn’t allow you to retrieve data in real-time. 

Related: What is a webhook? Here’s what you need to know

Webhook examples

We’ll cover 5 examples, where the first 2 are internal use cases (i.e., integrations built between applications used inside an organization) and the last 3 are customer-facing (i.e., integrations built between your product and the applications your clients and prospects use).

Notify reps in chat when a new lead comes in

To help your reps reach out to sales qualified leads (SQLs) quickly and successfully, you should alert them whenever a lead becomes an SQL via the application they already work in.

To facilitate this, you can register a webhook in your marketing automation platform that listens for leads becoming SQLs. 

Whenever this happens, the application (e.g., Marketo) makes a POST request to the webhook endpoint registered by your business communications platform (e.g., Slack), allowing this app to then message the assigned rep key details on the lead.

Webhook example with Marketo and Slack

Create an invoice when a deal is marked as “closed-won”

Once a rep closes a deal, finance needs to create an invoice quickly in order to deliver it as soon as possible.

With this in mind, you can register a webhook in your CRM (e.g., Salesforce) and listen for opportunities that get marked as “closed-won”. 

Once this happens for a given opportunity, the CRM makes a POST request to the webhook endpoint registered by the ERP system. The ERP system can then automatically create an account for the client that just closed and create their first invoice, using the information provided by the payload.

Webhook example with Salesforce and NetSuite

Related: API polling examples

Create target candidate profiles in your clients’ ATSs immediately

Imagine you offer a product that uses AI and machine learning to help clients identify target candidates for specific roles. 

To help clients add the candidates you recommend to their ATSs seamlessly and quickly—so that their recruiters can become aware and follow up with these candidates on time—clients can register a webhook in your product and listen for any candidates that are recommended. Once this happens, your product would make a POST request to the webhook endpoint with a variety of information on the client, leading the new candidate’s account to get created and fully-populated.

Webhook example with your product and clients' ATS solutions

Add new employees from clients’ HRIS solutions as users in your product instantly

To help clients provision users quickly, easily, and accurately so that new hires can get onboarded to your product effectively, you can use webhooks as follows: A client registers a webhook endpoint from your product in their HRIS solution that listens for new employees. When this event occurs, the HRIS makes a POST request to the webhook endpoint with critical information on that employee—allowing the employee to get added to your product with all the information that’s needed to provision them successfully.

Webhook example with clients' HRIS solutions and your product

Upload signed contracts from your product to clients’ file storage systems automatically 

Say you provide an e-signature platform, like DocuSign. To help your clients automatically add their fully-executed contracts from your platform to their file storage system—where they can be securely stored and easily accessed—in real-time, your clients can use a webhook as follows: 

They register a webhook in your product that listens for newly-signed contracts. Once a contract is fully executed, the webhook makes a POST request to the client’s file storage system’s URL endpoint, allowing their system to retrieve the file and store it in the appropriate location.

Webhook example with your product and clients' file storage platforms

Related: Examples of API integrations

Build customer-facing integrations that use webhooks with ease through Merge

Merge, a single API that lets you add hundreds of integrations to your product, supports 3rd-party webhooks to help your product receive data payloads in real-time. And, in the event that a 3rd-party platform doesn’t support webhooks, you can use Merge’s.

You can learn more about using webhooks with Merge by scheduling a demo with one of our integration experts.