Webhooks
Webhook plugin is a perfect tool to optimize your store. The main purpose of the Webhook Plugin is to update events regularly and then continue to send a notification to the selected URL. It will save your resources and avoid pooling your API.
A webhook (also called a web callback or HTTP push API) is a way for GrandNode to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately, for example in CRM, ERP, or any kind of third-party. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both providers and consumers. With the Webhook plugin, you will be able to send a new order to your ERP system immediately, without the need to trigger the API once a minute, or once an hour.
The biggest advantages of webhooks:
- Update an event in a short time
- Significantly helps to synchronize data across several web applications
- Possibility to send lead-data to your ERP or CRM
Currently supported events:
- ProductUpdated,
- UpdateStock,
- OrderPlaced,
- OrderCanceled,
- OrderRefund,
- CustomerRegistered,
- CustomerUpdated
- EmailSubscribed,
- EmailUnsubscribed.
Possibility to select which webhooks will be sent to a specified subscriber.
How to create a webhook?
It's a very simple process. First of all, we would need to configure default settings. After successful installation please go to Admin panel -> Extensions -> Webhooks -> Settings.
It's time to select webhooks, triggers, that will be used in your store. It's not necessary to mark every webhook.
After that, go to Admin panel -> Extensions -> Webhooks -> Manage Webhooks. Press the Add subscriber button and create your first webhook.
Provide the URL of the webhook, its name, and select trigger. Save changes and that's all. Ensure that Webhook sender task is enabled and time interval is set.
If you want to test it, please download our sample webhook client. It will receive our webhook when somebody will make an action. You can
get it here.
Create webhook, as a webhook URL set the following URL:
When you save changes, please copy the secret key.
Open the solution, in the
WebhookController.cs file insert the copied secret key. Rebuild and run the application and try to make an action that will trigger webhook. You should be able to see it in
Admin panel ->
Extensions ->
Webhooks ->
Webhooks.