no-translate

Webhooks overview

General information on webhooks and why you need them
Napisany przez Konstantine
Zaktualizowano 2 lata temu

Webhooks come very handy when you need all your data to be always up-to-date and synced between your HelpCrunch account and your own app or a third-party app.

If you feel like webhooks are something new to you, we recommend checking this definitive guide first.

In a few words, HelpCrunch acts as a webhook provider, pushing real-time updates as they happen, so you don't need to constantly call our REST API to check if there have been any changes to your customers or chats.

Webhooks can drastically reduce the number of GET requests to the REST API, which will help you always stay within the API limits.

Technically, real-time updates are HTTP POST requests that are sent to your publicly accessible URL (endpoint). 

In order to get those real-time updates, you should setup webhooks in your HelpCrunch account, subscribe to the corresponding events and process webhook requests in your own app.

When to use webhooks

Let's say you have your own CRM system and you want all new customers to be immediately added to the CRM when they start a new chat with your team via HelpCrunch widget.

The bad option is to call our Get all customers REST API method every hour and check if there are new customers, but this will not be in real-time and will not work at all if you have a large customer base, because this method allows you to get not more than 100 customers within one request. This will make you exceed the REST API limits quickly and you won't be able to send any follow-up requests for a while.

The good option is to setup a webhook that will trigger an event when a new customer is added to your HelpCrunch account. You can then process that request on your backend, extract all necessary information about the customer and add it to your CRM.

If you don't find some customer data in the body of the webhook request, you can use Get a single customer REST API method to get all the information about that customer.

In order to sync back the same customer data when some information changes in your CRM, you can use Update customer REST API method. Webhooks will not work in this case as they allow only to receive data from your HelpCrunch account and in no way to update them.

Read Next → Setting up webhooks

Czy odpowiedzieliśmy na Twoje pytanie?