Webhooks — configuring them
Settings → Integrations → Webhooks. A webhook is an address outside that is sent what happens here, as it happens.
Permissions
| Permission | What it allows | Granted to |
|---|---|---|
webhook.read | See webhooks, what they receive and how delivery is going | Manager |
webhook.manage | Add, change, switch off and remove webhooks; issue secrets; send again | Administrator only |
Where a company's events go is the same kind of decision as where its money goes, so changing it is an administrator's.
Adding one
- Address.
https://, on the public internet. An address that is, or resolves to, a private, loopback, link-local or reserved network is refused — when you save it and again before every send, because a name can be pointed somewhere else after it was checked. Redirects are not followed. - Events. One or more event types, or families:
stock.*is every stock event, including ones added in later versions. The list on the screen is every event this version raises. - Secret. Issued when you add the webhook and shown once. Copy it into the receiver then. Only its last four characters are kept beside the webhook; the secret itself is sealed in the vault, readable by nothing but the sender. New secret replaces it at once — update the receiver straight away.
Send a test queues a signed webhook.ping, so you can check the receiver
before anything real happens.
When a receiver is down
Each delivery is tried at once, then after 1 minute, 5 minutes, 30 minutes, 2, 6 and 12 hours. After the seventh failure it ran out of tries and waits in the deliveries list. A failing webhook says failing since with the time of the first failure, and clears on the next success.
- Send again starts a delivery from its first attempt — for after the receiver is fixed.
- Let it go decides it will not be sent, with a reason that is kept.
Switching a webhook off holds its deliveries; switching it back on sends them. Remove deletes the webhook, its deliveries and its secret.
A webhook that is slow or down holds up only its own deliveries — never the others, and never the work that raised the events.
On premises
WEBHOOK_ALLOW_PRIVATE_NETWORKS=true lets a webhook point at a private
address, and accepts plain http:// there. Leave it off anywhere the servers
share a network with anything you would not want a form field to reach.
A message broker
A fleet that wants MQTT rather than HTTP connects an Event broker on the
Services tab. Every event is then published to it as well, under
erp/<company>/<type with / for .>.