Event-Based Integration Between a Plant MES and Dynamics 365 Supply Chain Management

The standard MES messages and production order business events, a queue between plant and ERP, one canonical message set with a thin adapter per plant, and daily reconciliation of status, scrap and consumption.

Integrate a plant MES, such as Siemens Opcenter, with Dynamics 365 Supply Chain Management through events rather than flat files. Supply Chain Management raises business events when production orders are released or change status, and its MES integration API accepts standard messages to start an order, report good and scrapped quantity, report material consumption, report time per operation and end the order. Put a queue between plant and ERP so neither waits for the other, define one canonical message set with a thin adapter per plant, and reconcile order status, scrap and consumption between both systems every day. Solzet designs and builds this integration, from the adapters to the reconciliation reports.

Why replace flat file exchange between the MES and the ERP with events?

Flat files were the easy first integration: the ERP drops released orders in a folder, the MES drops back a file of output and consumption once an hour or once a shift. They keep working until volume, a second plant or an audit exposes what they hide. A file is all or nothing, so one bad line holds back or half-posts a whole batch. Files arrive out of order and sometimes twice. There is no status per message, so nobody can say which confirmation failed and why. And inventory in the ERP is always one file behind the floor, which is exactly when planning and sales make promises from it.

Event-based integration turns each shop floor action into its own message with its own status. An order released in the ERP reaches the MES in near real time; a consumption reported on the floor reaches inventory the same way; a failure is one message to fix and resend, not a file to pick apart.

ConcernFlat filesEvents and messages
LatencyAs often as the file schedule runsNear real time per shop floor action
Failure handlingA whole file fails or partly postsOne message fails and is fixed and reprocessed on its own
Duplicates and orderHard to detect; depends on file namesMessage identifiers and per-order sequence
VisibilityA folder and a log fileA status per message in Supply Chain Management and in the integration layer
Adding a plantAnother file format to agree and parseAnother thin adapter onto the same canonical set

What does Supply Chain Management provide out of the box for third-party MES integration?

Microsoft documents a standard integration for third-party MES in Supply Chain Management (Microsoft Learn: integrate with third-party manufacturing execution systems). Outbound, the MES listens to business events for released production orders and production order status changes, and reads reference data such as products, bills of materials and routes through data entities or OData. Inbound, the MES calls one API endpoint with a message type and a JSON payload, and the messages are queued and processed by batch in Supply Chain Management. The Time and attendance licence key must be enabled, and incoming messages are monitored on the Manufacturing execution systems integration page under production control setup, where failed messages can be reviewed, corrected and processed again.

Two processing rules shape the design. Messages for one production order are processed in the order they are received, but messages for different orders can be processed in parallel. A failing message is retried a set number of times and then marked as failed, and Microsoft suggests an alert, which can be sent externally as a business event, so a failure reaches a person or the MES. Field lists, version requirements and options change, so check the current Microsoft Learn page before you design payloads. Where operators work in Supply Chain Management itself, Microsoft's own production floor execution interface is the alternative to a third-party MES; this guide is for plants that run one.

ProcessDirectionMessage type or event
Production order released or status changedSupply Chain Management to MESBusiness events
Start production orderMES to Supply Chain ManagementProdProductionOrderStart
Report good and scrapped quantityMES to Supply Chain ManagementProdProductionOrderReportFinished
Report material consumption (picking list)MES to Supply Chain ManagementProdProductionOrderPickingList
Report time used for an operation (route card)MES to Supply Chain ManagementProdProductionOrderRouteCard
End production orderMES to Supply Chain ManagementProdProductionOrderEnd

Where does the queue sit between the plant and the ERP?

In the middle, on both directions. Business events from Supply Chain Management go to an endpoint such as an Azure Service Bus topic, and a plant adapter subscribes and calls the MES. Messages from the MES go to the plant adapter, which writes them to a queue, and a sender reads the queue and calls the Supply Chain Management MES API. Neither side waits for the other: if the ERP is in a maintenance window or the plant network drops, messages wait in the queue and are delivered in order when the other side returns, instead of failing on the floor.

The queue is also where duplicates are stopped and failures are parked. Every message carries an identifier, every handler is idempotent so a resend does not post twice, and a message that cannot be delivered goes to a dead-letter queue with enough context to replay it. Those design rules apply to every Dynamics 365 integration we build and are set out on Azure integration services for Dynamics 365, so this page does not repeat them.

  • Outbound: production order business events to a Service Bus topic, one subscription per plant adapter.
  • Inbound: plant adapter to a queue per plant or per message family, then a sender to the MES API.
  • Ordering: messages for the same production order kept in sequence, for example with sessions keyed on the order number.
  • Buffering on the plant side as well, so a lost connection to the cloud does not stop production reporting.
  • Monitoring on silence as well as errors: a plant that has sent nothing for an hour during a shift is an alert.

Why one canonical message set with a thin adapter per plant?

Because plants differ and the ERP should not have to know. One plant runs Siemens Opcenter, another runs a different MES or an older version, a third reports from machine controllers through a historian. If each plant has its own mapping straight into Supply Chain Management, every change in the ERP becomes a change in every plant integration. Instead, define one canonical message set, close to the standard Supply Chain Management messages, and give each plant a thin adapter that only translates the plant's format into it. The adapter maps; it does not decide. Business rules such as which journal to use, when to end a job or how to treat over-production live in one place, next to the canonical set, where they can be tested once.

The canonical envelope adds what the standard payload does not carry: a message identifier, the plant, the source system, a timestamp from the floor and a sequence number per order. Those fields make deduplication, ordering and reconciliation possible across plants.

Canonical messageMaps toNotes
Order releasedProduction order business events plus reference data by data entity or ODataThe adapter fetches the BOM and route version the order uses, not the current default
Order startedProdProductionOrderStartSent once per order; a repeat is ignored by message identifier
Output reportedProdProductionOrderReportFinishedGood and error quantities with an error cause; batch or serial numbers where tracked
Material consumedProdProductionOrderPickingListConsumption and scrap per item, with batch and location where tracked
Operation time reportedProdProductionOrderRouteCardHours and quantities per operation and resource
Order endedProdProductionOrderEndOnly after all output and consumption for the order has been accepted

How do you handle reference data, message order and custom fields?

Reference data flows from the ERP, not the other way round. Items, bills of materials, routes and resources are mastered in Supply Chain Management and read by the adapter through data entities or OData, so the MES works from the BOM and route version the order was released with. When a plant needs data the standard entities do not expose, a custom data entity is cleaner than a second channel.

Order matters at the order level. Supply Chain Management keeps messages for one production order in sequence, but only in the sequence it receives them, so the integration layer must deliver them in the order they happened on the floor: start before output, output and consumption before end. When a plant needs to send something the standard payloads do not carry, such as a customer-specific quality attribute, extend in X++ with a custom message type or by extending the processing, rather than overloading a standard field. The standard messages and their extension points change between versions, so confirm them against the current Microsoft Learn documentation before you build.

How do you reconcile order status, scrap and consumption between the MES and the ERP?

Events make the integration fast; reconciliation is what lets finance and production rely on it. Even with queues and idempotent handlers, a message can be rejected for a business reason such as a closed period, a blocked item or a missing batch, and sit as failed until someone acts. A daily reconciliation compares what the MES recorded with what Supply Chain Management posted, per order, and turns differences into a short worklist for production and finance rather than a month-end surprise.

What to compareMES sideSupply Chain Management side
Order statusOrders started, running and completedProduction order status, started and ended orders
OutputGood quantity per order and batchReported as finished quantity
ScrapError quantity and cause per order and operationError quantities and scrap on report as finished, picking list and route card journals
ConsumptionMaterial used per item and batchPosted picking list consumption
TimeHours per operation and resourcePosted route card hours
Integration healthMessages sentMessages processed, failed and waiting on the Manufacturing execution systems integration page

What changes when the MES integration is moved during an AX 2012 upgrade?

If your MES today reads released orders from a SQL Server view on Dynamics AX 2012 and writes output back through a stored procedure, the upgrade forces the change: finance and operations apps in the cloud do not open the production database to direct connections. How to find those direct table integrations and plan their replacement inside a fixed upgrade timeline is covered on AX 2012 to Finance and Operations: data upgrade, EDI and MES. The target design on this page is what those integrations should become.

If you are choosing between keeping a third-party MES and moving operators onto Microsoft's own production floor features, decide that before building adapters. That choice depends on the plant's processes and equipment, and it is part of the scope we agree on our Supply Chain Management implementation work and in the manufacturing industry overview.

What does Solzet deliver for an MES integration with Supply Chain Management?

Solzet designs and builds the integration between your plant MES and Dynamics 365 Supply Chain Management. We map each plant's shop floor events to the standard Supply Chain Management messages, define the canonical message set and its envelope, build the queues, the plant adapters and the sender on Azure, configure the production order business events and the reference data entities, write X++ extensions where a plant needs data the standard messages do not carry, and deliver the daily reconciliation of order status, output, scrap, consumption and time. Our own senior consultants and developers do the work, with your MES owner agreeing the plant side of each interface. The integration practice is described on Azure integration services for Dynamics 365, and how Supply Chain Management connects to Finance and Customer Engagement on CRM and ERP integration.

For the commercial side, buyers who would rather not carry Microsoft licensing can choose a custom CRM. We recommend the right solution: Dynamics 365 (Customer Engagement, Business Central or Finance and Operations), Power Platform, or a custom-built CRM. One team for CRM, ERP and the integration between them.

What do people ask us?

Can Siemens Opcenter or another MES integrate with Dynamics 365 Supply Chain Management without flat files?

Yes. Supply Chain Management raises business events for released production orders and status changes, and its MES integration API accepts standard messages for starting orders, reporting output and scrap, consumption, operation time and ending orders. Any MES that can call an API or publish events can use them through an adapter.

Which MES messages does Supply Chain Management support as standard?

Microsoft Learn documents message types for start production order, report as finished with good and error quantities, material consumption through the picking list, time used through the route card, and end production order. Check the current documentation for fields and version requirements before designing payloads.

Why put a queue between the MES and the ERP?

So neither side waits for the other. Messages wait in the queue during an ERP maintenance window or a plant network outage and are delivered in order afterwards. The queue is also where duplicates are stopped and failed messages are parked for replay.

What is a canonical message set and why does it matter with several plants?

It is one agreed set of production messages, close to the standard Supply Chain Management messages, that every plant adapter translates into. Business rules live in one place, and adding a plant or changing an MES means a new thin adapter rather than a new integration.

In what order are MES messages processed in Supply Chain Management?

Messages for one production order are processed in the order received, while messages for different orders can be processed in parallel. The integration layer must therefore deliver each order's messages in the order they happened on the floor.

How do you know the MES and the ERP agree?

With a daily reconciliation per order: status, good quantity, scrap, consumption and hours on both sides, plus the count of failed and waiting messages. Differences become a worklist for production and finance instead of a month-end correction.

Does Solzet build MES integrations for Supply Chain Management?

Yes. Solzet designs the canonical message set, builds the queues and plant adapters on Azure, configures the business events and reference data, writes X++ extensions where needed and delivers the reconciliation, with its own consultants and developers.

Which solution is right for your business?

Tell us what you need. A senior consultant replies within one business day with a recommendation (Customer Engagement, Business Central, Finance and Operations, Power Platform or a custom-built CRM), not a sales script.