Connect your Unified Namespace to Microsoft Dynamics 365 Business Central with a read-only integration for shopfloor execution metrics.
Get the latest version for Business Central
UNS Bridge Connector is a Business Central extension that creates a secure, read-only bridge between your Unified Namespace (UNS) and BC Manufacturing. It ingests aggregated execution KPIs from your production floor and makes them visible on Production Orders and Routing Lines without modifying your planning data.
Understand execution progress without leaving Business Central. View real-time production KPIs on Released Production Orders, track availability and productivity per routing operation, and monitor integration health via the Integration Inbox.
Build a UNS-to-ERP bridge that translates MQTT messages into BC API calls. Use the UNS Topic Mapping API to resolve topic paths to Work Centers, fetch reference data (Items, Routings, Work Centers) to enrich messages, and post execution events with idempotency guarantees.
The extension follows an event-driven architecture with built-in resilience patterns. A UNS Bridge service subscribes to MQTT topics, resolves topic mappings, and posts execution events to Business Central. Messages flow through the Integration Inbox for validation and audit, then persist to the Operation Execution table before updating summary fields on Production Orders.
Every message requires a unique GUID (messageId). If the same messageId is sent twice, the duplicate is safely ignored. This ensures your data stays consistent even with network retries.
Each message includes a sourceTimestamp. If an older message arrives after a newer one has been processed, the older message is acknowledged but does not overwrite the newer data.
When sending an execution event without operationNo, the system dynamically resolves it from the workCenter field. It looks up the Production Order's routing lines and finds the matching operation. If exactly one match exists, it uses that operation. If zero or multiple matches exist, the request fails with a clear error message.
The UNS Topic Mapping feature provides static integration configuration for mapping UNS (Unified Namespace) topics to ERP Work Centers. Mappings are stored in Business Central and fetched by the bridge service at runtime.
Open the UNS Topic Mappings page in Business Central (search for 'UNS Topic Mappings') to create, edit, and delete mappings. Each mapping can be activated or deactivated, and includes validity dates for time-bounded configurations.
| Field | Description |
|---|---|
unsTopic | UNS topic path (e.g., mb/v1/plant/line1/station5/assembly) |
workCenterNo | Target Work Center in Business Central (optional for auto-discovery) |
status | Active or Inactive |
description | Human-readable description of the mapping |
validFrom | Start validity date |
validTo | End validity date (empty = no end) |
The workCenterNo field is optional to support auto-discovery. Your bridge can register newly discovered UNS topics without a Work Center assignment. Users can then assign Work Centers later via the admin UI. Unmapped topics are displayed with an Attention style in the UI.
The primary API for posting shopfloor execution KPIs to Business Central.
POST /api/alpamayo/shopfloor/v1.0/companies({'{'}id{'}'})/executionEventsUse OAuth 2.0 Bearer token with the https://api.businesscentral.dynamics.com resource. The calling user must have the ALP Shopfloor Exec permission set assigned.
{
"messageId": "550e8400-e29b-41d4-a716-446655440000",
"orderNo": "101001",
"operationNo": "10",
"workCenter": "MACH0001",
"qtyProduced": 100,
"qtyRejected": 5,
"runtimeSec": 3600,
"downtimeSec": 300,
"availability": 0.92,
"productivity": 0.85,
"actualCycleTimeSec": 36.5,
"sourceTimestamp": "2024-01-24T10:30:00Z",
"source": "MES-SCADA"
}| Field | Type | Description |
|---|---|---|
messageId | GUID | Unique identifier for idempotency * |
orderNo | Code[20] | Released Production Order number * |
operationNo | Code[10] | Operation number (required if Work Center has multiple operations on the order) |
workCenter | Code[20] | Work Center code (required if operationNo is not specified) |
qtyProduced | Integer | Total quantity produced |
qtyRejected | Integer | Quantity rejected (must be ≤ qtyProduced) |
runtimeSec | Decimal | Runtime in seconds |
downtimeSec | Decimal | Downtime in seconds |
availability | Decimal | Availability ratio (0.0 to 1.0) |
productivity | Decimal | Productivity ratio (0.0 to 1.0) |
actualCycleTimeSec | Decimal | Actual cycle time in seconds |
sourceTimestamp | DateTime | Timestamp from source system (ISO 8601) * |
source | Code[20] | Source system identifier (e.g., MES-SCADA) |
* Required field
Read-only APIs for fetching BC master data. Use these to enrich execution events or validate data before posting.
Manufacturing items with routing and BOM references
GET /api/alpamayo/shopfloor/v1.0/companies()/itemsWork centers with capacity and efficiency data
GET /api/alpamayo/shopfloor/v1.0/companies()/workCentersProduction orders with status, quantity, and dates
GET /api/alpamayo/shopfloor/v1.0/companies()/productionOrdersProduction order routing lines with operation details
GET /api/alpamayo/shopfloor/v1.0/companies()/prodOrderRoutingLinesMessage processing status and error details
GET /api/alpamayo/shopfloor/v1.0/companies()/integrationInboxCRUD operations for UNS topic to Work Center mappings
GET/POST/PATCH/DELETE /api/alpamayo/shopfloor/v1.0/companies()/unsTopicMappingsALP Integration Inbox (50001) - Stores every incoming message with processing status (Received, Processed, Failed) and error details. Used for audit trail and troubleshooting.
ALP Operation Execution (50002) - Stores aggregated execution KPIs per Order/Operation combination. Updated via upsert logic - newer timestamps overwrite older data.
ALP UNS Topic Mapping (50005) - Stores UNS topic to Work Center mappings with validity dates and audit fields.
Production Order - Adds execution tracking fields: ALP Last Exec Update At, ALP Execution Source, and aggregated KPIs (Qty. Produced, Qty. Rejected, Availability, Productivity).
Prod. Order Routing Line - Adds per-operation execution fields: ALP Qty. Produced, ALP Qty. Rejected, ALP Actual Availability, ALP Actual Productivity, ALP Source Timestamp.
For dashboard viewers, production planners, and supervisors. Grants read-only access to all extension tables and pages.
For integration service accounts and bridge applications. Grants insert/modify on execution tables and execute permission on the execution API.
| Role | Permission Sets |
|---|---|
| Dashboard Viewer → ALP Shopfloor View | ALP Shopfloor View |
| Shopfloor Device (SCADA/MES) → ALP Shopfloor View + ALP Shopfloor Exec | ALP Shopfloor View + ALP Shopfloor Exec |
| Integration Service Account → ALP Shopfloor View + ALP Shopfloor Exec | ALP Shopfloor View + ALP Shopfloor Exec |
When validation fails, the API returns 400 Bad Request and the Integration Inbox entry is marked as Failed with an error message. Common errors include:
These sequence diagrams illustrate the key communication patterns between the UNS Bridge and Business Central.
Shows the complete flow from order release through execution to completion.
How the Bridge discovers new UNS topics and registers them for mapping.
Safe handling of duplicate messages due to network retries.
How older messages arriving late do not corrupt newer data.
A typical UNS Bridge follows this flow to translate MQTT messages into BC execution events.
For technical support, contact Alpamayo at [email protected] or visit our website to schedule a consultation.
Supported Languages: English (en-US), German (de-DE)
Source code and technical documentation are available on GitHub.
View on GitHub