Since version 22 an extension can publish an external business event, and Power Automate, Logic Apps and Dataverse can subscribe to it with no polling. What an external business event is, how it differs from an AL event, declaring one, what payload to send, and the patterns that keep a flow from doing something it should not.
Integration events (the events post) are for AL code inside the tenant. External business events are the same idea pointed outward: a named event your extension raises, that Power Automate (and anything else that speaks the Business Central connector) can trigger on, with a payload, without polling an API every minute.
codeunit 50140 "CON Shipment Events"
{
[ExternalBusinessEvent('ShipmentReleased', 'Courier shipment released', 'A courier shipment has been released for collection.', EventCategory::"CON Courier")]
procedure ShipmentReleased(ShipmentNo: Code[20]; Carrier: Text; ShipmentSystemId: Guid)
begin
end;
}
The attribute names the event, gives it a display name and description (which appear in Power Automate's trigger picker), and a category (an enum extension of EventCategory). The procedure body is empty; calling the procedure is raising the event. The parameters are the payload: keep them to identifiers and a few scalars. The subscriber fetches the rest through the API using the SystemId.
Raise it from your Mgt. codeunit at the business moment: after the shipment is released and committed (an external event raised inside a transaction that then rolls back is still delivered, so raise after the commit point or from OnAfter positions that imply success).
In Power Automate: trigger "When a business event occurs" (Business Central connector), pick the environment, company, category and event; the parameters arrive as dynamic content. Then do whatever the business wants: post to a Teams channel, create a Planner task, write a row to Dataverse, call the courier's own Power Platform connector, email the customer. Logic Apps and Dataverse's Business Central virtual tables can subscribe the same way.
| Need | Use |
|---|---|
| Another AL extension reacts | Integration or business event (AL) |
| Power Automate / Logic Apps reacts | External business event |
| Another system needs the record data | API, triggered by the event or a webhook subscription on the API page |
| Change detection without code | Webhook subscriptions on standard API pages |
ShipmentReleasedV2 and keep the old one for a release.External events are also what Copilot agents and the Dataverse integration increasingly build on, so an extension that raises them at its business moments is ready for whatever the business connects next.