Articles on: Communications

Webhooks

Webhooks can be used to connect your system with Nector to get notified on various events.

In this article you will learn how to create and manage webhooks.

For a list of webhooks and the data associated with each webhook, please refer this article for more info: https://nector.crisp.help/en/article/webhook-details-sent-to-delivery-url

Visit the Webhooks Page on your nector dashboard

As the first step enable the webhooks by toggling the status button under the Basic Settings. After enabling you will see the below view.




Request sent from nector to webhook uri has a TTL of 10 seconds, if the request takes more than 10 seconds, it will fail on nector's side. Nector will retry the request for a maximum of 5 times, with exponential delay.

Add New Webhook



Now switch to the Send Webhooks tab and click on the Create button, a popup will open

There are many webhooks supported on nector. If you don't know which to choose, here are the two webhooks that are most relevant and commonly used:

Wallet Coins Rewarded: This webhook will be sent whenever wallet coins are rewarded on nector.
Coupon Is Created: This webhook will be sent whenever a customer uses his wallet coins to get a discount/coupon code on nector.

Now select the event on which you want to send webhook, input the Webhook Uri to which the webhook should be sent, also input Webhook Secret in case you want to verify on your side if the webhook came from nector or not, and add any filters based on which webhook sending should be restricted

To verify the webhook, refer to the value of x-nector-webhook-secret value in the received webhook header, the x-nector-webhook-secret is sha256 of Webhook Secret you have set on nector.




For example,

To send Wallet Reward Webhook to (https://eolw7ilfauomfv3.m.pipedream.net) url whenever wallet coins are rewarded to a customer on nector, you would create the webhook as shown above.

The Webhook Secret can be any value as per your business needs.

Once you have entered all the details, click on the Create button in the popup.

Webhooks can also be sent for other things like when a new customer is referred, for coin expiry notification, for review request, and more. To learn how to setup these webhooks, look into those respective articles.



Edit a webhook



Switch to the Send Webhooks tab and click on the webhook that you want to edit.

Here, you can change the Webhook Uri to which this webhook needs to be sent, also you add or remove prefix from webhook topic. And you can edit the applied filters too. Once the changes are done, click on the Update button.


Delete a webhook



Switch to the Send Webhooks tab and click on the webhook that you want to delete.

Here, click on the Delete button at the top right area of this page and confirm the action.


Updated on: 28/03/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!