Getting Started
Webhooks allow your applications to receive information when customer events occur - such as submitting a product review, completing a survey, or earning loyalty points. This enables seamless integration with your existing tools - whether you want to track reviews in your CRM, send data to custom analytics platforms or trigger custom workflows. This documentation will detail how to configure and test webhooks for Okendo.
Setting Up Webhooks
You can configure webhooks using the Okendo Merchant REST API. Follow the API documentation to create a webhook subscription.
Important Notes:
- Webhook Ordering: Delivery order is not guaranteed. However, each webhook includes a
sequenceNumberthat can be used to order events for the same resource type. - Response Requirements: Your server must respond with an HTTP
2xxstatus code (e.g.,200 OK) within 15 seconds of receiving a webhook event.- Best practice is to immediately acknowledge receipt and delegate processing to an asynchronous task or queue.
Verifying Webhooks
For security purposes, we strongly recommend verifying the webhook signature to ensure that the payloads are coming from Okendo and not a malicious third party.
Refer to this guide for an example of how to verify webhook signatures using the Svix CLI.
Backfilling and Recovering Missed Events
Webhooks only send events that happen after a subscription is created. Failed deliveries are retried automatically, but if your endpoint is unavailable for an extended period, some events may never arrive. To load historical data, or to reconcile your copy after an outage, use the Merchant REST API list endpoints alongside your webhook subscription.
For example, to keep a complete copy of a store's survey responses:
- Subscribe to the
survey_response.create,survey_response.updateandsurvey_response.deletetopics to receive changes as they happen. - Call List Surveys to get every survey in the store, archived surveys included.
- For each survey, page through List Survey Responses using
nextUrlto load existing responses. - Repeat steps 2 and 3 periodically to pick up anything your endpoint missed. Each survey's
dateLastResponseandresponseCounttell you which surveys have new responses since your last run.