There is beauty in simplicity, and the webhooks is a good example of that. A fancy word for callbacks across the internet, webhooks are surprisingly simple but powerful way to connect your application to the rest of the world. Interested parties may subscribe to certain events in an application, and when that event does occur, they will be notified so they can do their own thing. In the world of business applications in the Microsoft ecosystem, this sounds awfully familiar of Power Automate. It's something like that, although webhooks have a different audience; the developers.
The webhook connector for Dime.Scheduler aims to connect any application, not just the standard connectors for systems such as Business Central. As Dime.Scheduler's main deliverable are appointments, it is currently the only entity that is published back to the underlying back-office systems. This applies to each connector, including this one.
A recap of the default publishing process
As soon as a transaction is executed on the planning board, the underlying system is notified. We achieve this by adding a number of identifiers to each unit of work. See the table below for an overview of those discriminators.
|A unique value that describes where the record was created.
Examples: BC Tenant X, BC Tenant Y, CRM HQ
|Describes the table, list or source where the item was created in the back-office system.
Examples: service orders in BC, opportunity in CRM, sales order in BC, etc.
|A unique value that can always trace back to the item in the underlying back-office system.
Examples, SO100 for a service order, J005 for a job, etc.
The source app is then compared to the list of connectors that have been registered, and the app will route the message back to the correct connector. For instance, when an appointment is created for a service order of the USA tenant of BC, Dime.Scheduler is clever enough to know that it should publish the change to that tenant and not the Canada administration. The routing continues to navigate to the correct table (i.e. it runs the routing by the source type) so the correct workflows can be executed. In this example of a service order, the BC connector will create a resource allocation line.
The publishing process for webhooks
The webhook connector roughly follows the same flow, with the exception that the process stops when the HTTP POST request is made. As this is a generic connector, Dime.Scheduler does not provide additional steps to link the appointments back to the originating system. In other words, you'll need to take care of what happens as soon as you've received the message from Dime.Scheduler.