ADR-0004 — ERP: Microsoft Dynamics¶
| Status | Accepted |
| Date | 2025 |
| Deciders | Flooris development team / Zwerfkei management |
Context¶
The Zwerfkei platform requires authoritative data for product pricing, stock levels and availability. This data must come from a central system of record that reflects the actual business state, including supplier pricing, discounts and warehouse inventory.
Decision¶
Microsoft Dynamics (Navision/Business Central) is used as the ERP system and acts as the source of truth for:
- Product pricing (base price, discounts, customer-specific pricing).
- Stock availability per product variant.
- Customer account data (for B2C customers).
Rationale¶
- Microsoft Dynamics is already in production use within the Zwerfkei organisation.
- Migrating to a different ERP is out of scope; the platform must integrate with the existing system.
- The ERP holds accurate, real-time business data that cannot be maintained separately in the webshop without significant duplication risk.
Integration Pattern¶
| Direction | Description |
|---|---|
| ERP → Zwerfkei | Prices, stock levels and customer data are synchronised to the Zwerfkei Backend on a scheduled basis and/or via webhook/event. |
| Zwerfkei → ERP | Confirmed orders are pushed to Dynamics for stock deduction and financial registration. |
Availability latency
Stock availability in the Zwerfkei storefront may lag behind ERP by the duration of the sync interval. A final stock check is performed at checkout to prevent overselling.
Consequences¶
- The Zwerfkei Backend must maintain an integration layer (API client) for Microsoft Dynamics.
- Price and stock data in the Zwerfkei database are treated as a cache; the ERP is always authoritative.
- Changes to the ERP data model or API may require updates to the Zwerfkei integration layer.