On Webhook (SAP Business One) is an automatic notification that the Service Layer from SAP Business One to an external application at a specific event in the system. SAP has supported Webhooks in the Service Layer since SAP Business One 10.0 Feature Package 2602.
Functionality
An event occurs when a business object is created or modified, for example via the Service Layer, the DI API, or the client. The Webhook Messenger Service runs as a background service behind the Service Layer and provides the notifications. To do this, it sends an HTTP POST to the stored Webhook URL. In its basic format, the notification only contains the object key, such as the DocEntry of an invoice. Multiple events can arrive in a single request.
Furnishings
Webhooks are disabled by default for each client. They are initially enabled, and the receiving application provides an endpoint. An event subscription is then created. The subscription contains the webhook URL (HTTPS), the authentication type (None, Basic, HMAC, or OAuth), and the list of events. An event catalog lists the supported events per business object. For customer orders, these include creating, modifying, deleting, closing, canceling, and reopening. The catalog includes system objects as well as custom objects and tables. Normal users are not allowed to manage subscriptions by default. Permission is granted through the general permission „Webhook Manipulation“.
Delivery and error handling
The messenger works asynchronously and therefore does not block SAP Business One. In the event of temporary errors, it automatically repeats delivery at increasing intervals. It maintains the order within a given client as best it can. If a webhook fails permanently, the system automatically disables it. It then has to be reactivated via resume. Through Replay, the service provides missed notifications after. Recipients should therefore recognize duplicate notifications and detect deviations in the order.
Extensions with Feature Package 2608
With Feature Package 2608, Webhooks provide more context. BizObjProps sends selected fields directly with the event instead of just passing the key. This reduces the number of subsequent requests. DeliveryDetails provides status information about delivery and errors directly in the payload. FilterExpr triggers an event only when defined conditions are met. The kontextvariable app.Name recognizes the calling application.
Reference to SAP Business One
The service layer thus evolves from a mere data provider to an event-driven system. External applications receive an immediate notification of changes, instead of having to retrieve data only upon request. At the same time, the new filtering logic replaces part of the connection code previously required in the middleware.
Demarcation
A webhook differs from an OData query. With the OData query, the application requests data. With the webhook, the service layer itself reports an event. Webhooks are regular, productive functions of the service layer. The example project for the Model Context Protocol published with Feature Package 2608 (MCP) is, however, a reference material and not a finished product.
Shopware 6 for SAP Business One
SAP Business One and DATEV - Synchronised
DATEV and SAP Business One Export & Import
Electronic invoices to authorities
SAP Business One Connect for carriers
