Appearance
Webhooks
Platform settingsAutomationWebhooksPermission:
settings.integrations.vieworsettings.integrations.manageOpen in Roari ERP (new tab)Also known as
- webhook
- callback
- event subscription
- push notification
- integration
- HTTP POST
- outbound events
- signing secret
- HMAC
- Zapier
A webhook sends events from Roari ERP to another system the moment they happen: when a sales order is confirmed, goods are received or an invoice is posted, Roari ERP POSTs a signed JSON message to the address you give. Use webhooks to keep a shop, a data warehouse or a messaging tool in step without polling the API.
See your webhooks
Go to SettingsWebhooks. Each row shows the Endpoint address, the first Events it subscribes to (and how many more), its Status (Active or Paused) and the Last delivery, with a green or red diamond for success or failure. Select a row to open the webhook and its delivery log. With none yet, the page says No webhooks yet.
Add a webhook
- Select New webhook.
- Fill in the drawer (see the table).
- Copy the Signing secret with the copy icon and store it in the receiving system.
- Select Add webhook. You see Webhook added and the webhook opens.
- Select Send test to check that the receiving system answers. See Webhook.
| Field | Required | What to enter |
|---|---|---|
| Endpoint URL | Yes | The receiving address, starting with https://. Otherwise: Use an https:// address. |
| Events | Yes | One or more events to send, for example Sales order confirmed or Stock below reorder point. Search by name. Empty: Subscribe to at least one event. |
| Signing secret | Generated | A random secret (whsec_…) used to sign every message. Show it with the eye icon, copy it, or generate a new one with the arrows icon. |
| Active | No (default on) | Paused webhooks keep their settings but send nothing. |
What the receiving system gets
Each event arrives as an HTTP POST with a JSON body holding the event's id, type (for example sales.order.confirmed), occurred_at, the record (aggregate_type, aggregate_id) and its data. The headers identify and sign it:
| Header | Content |
|---|---|
X-ERP-Event | The event type. |
X-ERP-Delivery | A unique delivery id; use it to ignore duplicates. |
X-ERP-Signature | sha256= followed by the hex HMAC-SHA256 of the exact body, keyed with the signing secret. Recompute it and compare before trusting the message. |
X-ERP-Attempt | The attempt number, on retries. |
The receiving system should answer with a 2xx status within 10 seconds. Failed deliveries are retried automatically, with growing intervals. Addresses on private networks are refused.
Differences by role
- Viewing webhooks needs Permission:
settings.integrations.view; adding, changing, testing and deleting them needs Permission:settings.integrations.manage. Account admin users can always do it.
Related
- Webhook: edit, test, delivery log
- Workflow rules: call a webhook only when conditions match
- API keys: let other systems call Roari ERP
- Tenant administration
