Webhooks
Have OmniBooks tell your other systems the moment something happens, such as an invoice posted, a payment received, a deal won or a till sale. Add an endpoint, choose the events, check deliveries, send a test, and see why a delivery failed.
A webhook is a message OmniBooks sends to another system when something happens in your books. Your online shop can hear that a payment arrived, your warehouse system that an order was confirmed, and a Make or n8n scenario that a deal was won, without asking OmniBooks again and again.
Each message is a signed JSON message sent to an https:// address. It carries the record exactly as the API returns it. Developers find the details, with code to check the signature, at omnibooks.online/developers/webhooks.
Adding an endpoint
- Open Settings → Webhooks. You need the
settings.editpermission (owners and administrators have it). - Choose Add endpoint and enter the address that receives the messages. It must start with
https://and be on the public internet. Addresses on your own network or this server are refused. - Tick the events to send, or Every event. Every event also includes events added later.
- Choose Add endpoint and copy the signing secret straight away (it starts with
whsec_). It is shown once. The receiving system uses it to check that a message really came from OmniBooks. - Choose Send test. OmniBooks sends a
webhook.testmessage at once and tells you what your system answered.
Events
| Area | Events |
|---|---|
| Contacts | contact created, contact changed |
| Items | item created, item changed |
| Sales | invoice, credit note and debit note posted or voided; quotation accepted; sales order confirmed |
| Purchases | bill (also supplier credits and debit notes) posted or voided |
| Payments | payment received, receipt voided, supplier payment made, supplier payment voided |
| Point of sale | till sale completed (with the till app) |
| CRM | lead created, deal won, deal lost (with the CRM app) |
Items and contacts imported from a file don't send created events. A till sale is sent when it completes, not when the shift posts.
Who sees what
An endpoint receives only what the member who added it may see. That means the right permission, the app installed, and a record in one of their branches if their access is limited to some branches. CRM events need the right to see every lead and deal. If the member loses access to the company, the endpoint is switched off.
When the other system doesn't answer
Your system should answer within 10 seconds with a success code (2xx). Any other answer is retried: after 1 minute, 5, 15, then 1, 3, 6 and 12 hours, then every 12 hours, for three days. After three days the delivery is marked Failed.
- If every delivery to an endpoint has failed for three days, the endpoint is switched off. The people who manage settings get a notice. Fix the receiving system, then choose Switch on.
- Pause stops sending for a while. Events wait, up to three days, and go out when you switch the endpoint back on.
- A message can occasionally arrive twice, or out of order. Each message has an event id (the same on every retry), so the receiving system can ignore repeats.
The delivery log
Choose Deliveries on an endpoint to see the last 50 messages. Each row shows its event, when it was sent, how many tries it took, its state, and the first part of your system's answer. Body shows exactly what was sent. Send again sends the same event once more, at once. The log keeps 30 days.
Keeping it safe
- New secret makes a new signing secret. The old one stops working at once, so update the receiving system straight away.
- Remove endpoints you no longer use. Removing one also deletes its delivery log.
- Zapier, Make and n8n can subscribe themselves through the API with a key that has the Subscribe and unsubscribe webhooks scope (the OmniBooks app for Zapier does this when you turn a Zap on). Their subscriptions show the key's name, and they stop when the key is revoked.
- Live demos send no webhooks.
Not built yet
Events for stock levels, purchase orders, expense claims, HRMS and payroll, and anything sent other than as JSON over HTTPS.