Domain Events is a work in progress and currently neither deployed nor supported. It will supersede the webhooks functionality when in production.

Domain Events

Domain Events is a mechanism for notifying external clients of internal events in Stream/Flow. A client can register a subscription for domain events, together with a URL where notifications can be posted to. When an event occurs in the system, Flow will send a notification to Azure EventGrid, which in turn will notify registered subscribers. Normally, notification will be performed using POST calls to registered webhook urls, containing a payload with a json message with the event type, event date and any associated data such as CaseId.

The WebHook payload will always contain as little information as possible, and it will be up to the integrator to use the Flow API to fetch extra information if needed.

It is important that the service that receives webhooks from Flow does so quickly. Any event processing must be decoupled from the process of receiving the webhook, in order to reduce latency and risk of timeouts. Default timeout is set to 5 seconds.

For testing purposes you can use a service like webhook.site to set up an endpoint that receives an event.

It is important to note that we cannot guarantee that WebHooks are sent 100% of the time. EventGrid supports automatic re-notification on failure of delivery. Where delivery is critical it is recommended integrators have a backup plan (for instance a repeating job that does updates the data every night).


Table of contents