Designing Modern Integrations in Business Central
Design patterns for Business Central integrations, built around an integration message table with an AL interface handler. It covers duplicate detection, idempotency keys, error classification, delayed reply, correlation IDs, durable workflows, polling, business events (in preview) and 3PL warehouse integration. It also shows AI agents guided by the BC quality knowledge base.
- Introduction and session overview
- Traditional integration scenario and modern approach
- AI agents with BC quality knowledge base
- Spec-driven development and agent-guided tech design
- Information flow visualization and integration patterns
- Integration message layer design and benefits
- Duplicate detection and handling
- Idempotency key pattern
- Error classification strategy
- Error classification implementation
- Delayed reply pattern
- Correlation IDs and message tracing
- Durable workflows and durable functions concept
- Atomic operations and job queue pattern
- Data flow and webhook limitations
- Polling best practices and incremental reads
- Stage and exit pattern and idempotency for polling
- Business events for outbound integration
- Business events for scalable integrations
- Real-world black Friday case study
- Outbound business events and avoiding direct calls
- Integration patterns and message tables with idempotency
- Integration orchestration and external platforms
- BC quality and community integration repositories
- Spec-driven development with agent-generated documentation
- Agent-generated feature architecture and code
- Knowledge base refinement and community contributions
- API throttling and external service control
- JSON parsing and data exchange definition
- Integration message table design patterns
- 3PL warehouse integrations and webhook architecture
- Network timeouts and performance considerations
- Message prioritization, retention policies, and open source
Overview
The session argues that Business Central is an ERP system and not an integration service, and presents patterns that make integrations easier to test, trace and recover. The core is a single integration message table with a type field and a message handler interface. Error handling, scheduling and retries are implemented once and reused across integrations. Supporting patterns include idempotency keys, runtime error classification, delayed replies, correlation IDs, and small atomic steps run through job queues, inspired by Azure durable functions.
The speakers also cover inbound and outbound data flow. Inbound webhooks need a separate integration service. Polling should use incremental reads and a stage-and-exit approach. Outbound business events, which are in preview, can notify external systems, with payload requests directed to a read replica. In a demo, an agent trained on the BC quality knowledge base and a community integration repo produced a technical design and an extension from a written brief. Q&A covers API throttling, JSON parsing, 3PL warehouse integration, network timeouts, message prioritization and retention.
Key points
- Store integration requests in a message table with a type field and a message handler interface, instead of making direct HTTP calls during posting. Error handling, scheduling and retries are then built once.
- Duplicate handling and idempotency keys are described as needed from day one. The speakers say Business Central has no platform mechanism today to prevent double posting.
- Classify errors at runtime and route them to the right owner, rather than only logging them. A dispatcher service compares failed messages against an error table.
- Business Central cannot listen to external endpoints. Inbound webhooks need a separate integration service that converts them to integration messages.
- Poll with a setup table that stores the last pull time, and keep the polling job limited to fetching into a staging table.
- Business events are in preview. Delivery can be delayed by more than 5 minutes, which the speakers say makes them unsuitable for real-time inventory sync. Full payload requests should go to a read replica.
- The speakers say the Business Central cloud has a hard-coded network timeout of 1 minute. In Q&A they said their message retention keeps completed messages for one week and failed messages for one month.
Features
| Feature | Status | At | Evidence |
|---|---|---|---|
| AI agents for integration design | status not stated, demoed | 4:35 | |
| BC quality knowledge base | status not stated, demoed | 4:48 | |
| Spec-driven development for integrations | status not stated, demoed | 7:26 | |
| Information flow visualization | status not stated | 9:56 | |
| Integration message layer | status not stated, demoed | 11:22 | |
| Integration message table with interface pattern | status not stated, demoed | 13:21 | |
| Duplicate detection and handling | status not stated | 14:44 | |
| Idempotency key pattern | status not stated | 16:51 | |
| Error classification system | status not stated | 18:21 | |
| Notification dispatcher service | status not stated | 20:32 | |
| Delayed reply pattern | status not stated | 23:40 | |
| Correlation ID mechanism | status not stated | 24:37 | |
| Durable workflows in Business Central | status not stated | 26:10 | |
| Integration message workflow pattern | status not stated | 30:57 | |
| Inbound webhooks via integration service | status not stated | 32:17 | |
| Polling with incremental reads | status not stated | 34:57 | |
| Stage and exit pattern for polling | status not stated | 36:03 | |
| Idempotency key for polling | status not stated | 36:55 | |
| Business events for outbound integration | preview | 37:40 | “Unfortunately, still in preview after a couple of years as well.” (38:02) |
| Business events with read replica | status not stated | 38:48 | |
| Business events multi-system subscription | status not stated | 39:25 | |
| Business events for integrations | preview, demoed | 41:57 | “I think we know the reason why it’s still in preview. It’s not instantaneously.” (42:52) |
| Outbound business events limitations | status not stated | 44:47 | |
| Integration message tables pattern | status not stated | 46:45 | |
| Idempotency keys for integration messages | status not stated | 48:47 | |
| Retry configuration for integration messages | status not stated | 50:02 | |
| External integration services instead of job queues | status not stated | 52:37 | |
| BC quality knowledge base repo | status not stated, demoed | 54:50 | |
| Community integration public GitHub repo | status not stated, demoed | 56:30 | |
| Good and bad knowledge patterns for agents | status not stated, demoed | 56:57 | |
| Agent skills documentation with architectural decisions | status not stated, demoed | 58:01 | |
| Spec-driven development with agents | status not stated, demoed | 58:35 | |
| Agent-generated technical documentation | status not stated, demoed | 59:55 | |
| Integration message layer pattern | status not stated, demoed | 1:00:13 | |
| Agent-generated feature breakdown and plans | status not stated, demoed | 1:01:25 | |
| Message handler interface pattern | status not stated, demoed | 1:02:14 | |
| AI-generated extension code | status not stated, demoed | 1:03:40 | |
| Living knowledge base refinement | status not stated, demoed | 1:03:16 | |
| Agent error correction and knowledge update | status not stated, demoed | 1:05:47 | |
| BC quality repository for integrations | status not stated | 1:05:29 | |
| External service controller for API throttling | status not stated | 1:09:48 | |
| JSON parsing in Business Central | status not stated | 1:11:02 | |
| Data exchange definition for configurable parsing | status not stated | 1:11:58 | |
| Integration message table pattern | status not stated | 1:13:38 | |
| Warehouse shipment and receipt integration | status not stated, demoed | 1:16:57 | |
| Warehouse returns and transfer orders | status not stated | 1:18:08 | |
| Webhook abstraction layer for 3PL integrations | status not stated | 1:19:04 | |
| Webhook integration layer | status not stated, demoed | 1:19:32 | |
| Business Central cloud network timeout | status not stated | 1:20:35 | |
| Job queue categories for message ordering | status not stated | 1:22:48 | |
| Integration message code open source | status not stated | 1:23:59 | |
| Message table retention policies | status not stated | 1:24:58 |
AL objects mentioned
As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.
- other “BC quality” at 5:02
- table “integration message table” at 17:48
- table “integration error table” at 22:29
- interface “message handler interface” at 1:02:30
- enum “directions for enum” at 1:04:18
- table “interesting message” at 1:04:18
- other “integration message” at 1:13:38
- other “data exchange definition” at 1:12:16
- other “warehouse shipment” at 1:17:30
- other “warehouse receipt” at 1:17:30
- other “message table” at 1:24:58
- other “job queue categories” at 1:23:23
Not found in BC28-30: table “integration message table”, table “integration error table”, interface “message handler interface”, enum “directions for enum”, table “interesting message”.
Quotes
- 3:30 “They wanted to have some kind of website or some kind of storefront thing that uh when their customers placing orders, you want to”
- 4:48 “the Microsoft came up with this great concept of BC quality. I think many of you have heard about this and may many of”
- 5:29 “when we run our agents in the uh environment, the agents already knows that what are the good practices about Business Central uh integrations,”
- 12:29 “What this is about is basically like a table which contains uh where where basically anything that you want to stream as an inbound”
- 12:41 “It’s not for reading. If you wanted to read data or external system wants to read the data, they probably can go into queries”
Disclaimers in the video
- 6:56 other: we plan to create a pull request to Microsoft, so this will be part in its original repo for the Microsoft
- 38:02 preview: Business Events still in preview after a couple of years
- 42:52 preview: I think we know the reason why it’s still in preview. It’s not instantaneously. There can be cases, which is …
- 44:22 other: we hoping and we pushing Microsoft to hopefully they will fix it because from our perspective, nothing like this is acceptable.
- 1:03:16 other: Your knowledge base or the repo on the BC quality one is like a living document
- 1:04:30 other: I can’t like confirm it correctly without running it
- 1:08:09 coming-later: within like few weeks time the let me the knowledge that we created will be on the BC quality one
- 1:09:04 not-in-this-release: No, it’s That’s actually been stopped, the FTP client. So, there won’t be a typical client in Business Central.
- 1:23:59 other: all of this code would be open source
Presenters (as heard): Tharanga Chandrasekar, Vlad, Trong, Trung, Jeremy.
