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.
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.
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