How to Send Production and Labor Reporting from MES to ERP
how to send production and labor reporting from MES to ERP
Also searched as
- MES to ERP production confirmation integration
- post labor hours from MES to ERP work order
- MES backflush vs operation confirmation ERP
- shop floor data collection to ERP job transactions
Short answer
Treat the ERP work order as the system of record for cost and quantity, and the MES as the system of record for what physically happened. Send one confirmation message per operation (or per shift or lot) containing work order, operation sequence, good quantity, scrap quantity with reason, and labor start/stop per employee and work center, post it through the ERP's supported transaction API, and make the message idempotent so a retry never double-posts.
Applies to: Any MES (commercial or custom) feeding Infor SyteLine, Infor LN, Infor M3, NetSuite, SAP, Dynamics or Epicor; patterns apply to both discrete and routing-based manufacturing
How to wire production and labor reporting
- 1Decide the reporting grain: per operation completion, per lot or container, or per shift. Finer grain gives better WIP visibility but raises message volume and the odds of partial failures.
- 2Pick one owner for each fact. ERP owns work order, routing, standards and costing. MES owns timestamps, operator, machine and actual counts. Never let both edit the same quantity.
- 3Define the message: work order number, operation sequence, work center or resource, employee ID, start and end time, good qty, scrap qty plus reason code, rework qty, and a unique message ID generated by the MES.
- 4Map each field to the ERP's own transaction: for SyteLine the job transaction and labor posting IDOs, for SAP a production order confirmation (CO11N style, or the confirmation BAPIs and APIs), for NetSuite a work order completion and operation completion, for Dynamics a production journal.
- 5Post through the supported API or service layer, never by writing to ERP tables. Store the ERP document number returned and link it to the MES message ID.
- 6Enforce idempotency: before posting, check whether the message ID already has an ERP document. On timeout, retry with the same ID rather than creating a new one.
- 7Route failures to an exception queue (closed operation, wrong sequence, over-reporting, locked job) with an owner and a daily review, instead of silently dropping them.
- 8Reconcile nightly: compare MES counts and hours per work order against ERP posted quantities and labor, and flag differences above a tolerance.
Pick the right confirmation model
There are three common models. Operation confirmation posts quantity and time when each routing step finishes; it gives accurate WIP by step and accurate labor costing. Backflush posts materials and labor against the parent item when the last operation completes, which is simpler but hides where time and scrap actually occurred. Time-and-attendance style labor feeds post hours to a job or cost center independent of quantity, which suits indirect labor and long-running jobs.
Most aerospace, defense and electronics shops need operation confirmation because they must prove which step produced which lot, and because scrap at step 40 has a different cost than scrap at step 90. Backflush is acceptable for high-volume repetitive lines where routing steps are not individually traceable. Choose per product family, not once for the whole plant.
What the message must carry
A reliable payload is small but strict. The work order and operation sequence are the join keys; resource and employee are needed for labor and capacity reporting; good, scrap and rework quantities must be separate numbers, never a single net figure, because the ERP posts them to different accounts or locations. Timestamps should be UTC with the plant time zone carried separately, otherwise daylight saving shifts create phantom overtime.
Include a unique message ID and a version or sequence number. If the operator corrects a count in the MES after the first send, the correction must be a compensating message that references the original, not a second independent confirmation.
{
"messageId": "MES-2026-10-19-000412",
"workOrder": "WO-100234",
"operationSeq": 40,
"workCenter": "CNC-12",
"employeeId": "E1042",
"startUtc": "2026-10-19T06:02:11Z",
"endUtc": "2026-10-19T09:47:50Z",
"goodQty": 46,
"scrapQty": 2,
"scrapReason": "SCR-DIM",
"reworkQty": 0
}Idempotency, ordering and failure handling
The most common integration defect is double posting after a timeout: the ERP committed the transaction but the response never reached the MES, so the MES retries and the ERP posts again. Store the MES message ID on the ERP transaction (a user-defined field, reference text or an integration log table you own) and have the integration layer check it before every post.
Ordering matters too. An operation 40 confirmation that arrives before operation 30 is posted can be rejected by the ERP, or worse, accepted and later corrupt move quantities. Use a per work order queue so messages for the same order are processed in sequence, while different orders run in parallel. Failed messages should block only their own work order, not the whole feed.
Labor specifics
Decide whether the ERP receives raw clock punches or computed hours. Computed hours are easier to post, but raw punches let the ERP apply its own shift, overtime and premium rules. Whichever you choose, document it, because payroll and cost accounting will ask. Multi-machine operation, where one operator runs two machines, needs an allocation rule such as splitting elapsed time by machine, otherwise labor is double counted.
Indirect time (setup, waiting for material, maintenance) should post to indirect codes or cost centers, not to the work order, unless your costing method capitalises setup into the job. Align those codes with the downtime reason list so a stop in the MES maps to a known indirect code.
Common pitfalls
- !Posting quantity net of scrap in one number, which destroys scrap accounting and yield reporting.
- !Writing directly into ERP tables to save time; it bypasses validation, costing and audit trails and breaks on upgrade.
- !No idempotency key, so every network timeout creates a duplicate confirmation.
- !Using local time without a zone, producing phantom overtime at daylight saving changes.
- !Letting operators edit counts in both MES and ERP, so the two never reconcile.
- !Dropping failed messages silently instead of queueing them with an owner.
How an ERP-grounded AI assistant handles this
A grounded assistant such as ERPray can answer the reconciliation questions that usually take an analyst a morning: which work orders have MES hours but no ERP labor, which confirmations failed and why, and where posted scrap differs from MES scrap. It reads the ERP under the asking user's role, shows the query it ran, and does not post anything itself. For SyteLine shops, SyteRay can help draft the IDO-level integration and review the mapping, with a human approving any write-back.
Frequently asked questions
Should the MES post to the ERP in real time or in batches?
Near real time per operation completion is the better default because planners and customer service see accurate WIP. Batch (every few minutes or per shift) is acceptable when the ERP API is slow or rate limited. Whichever you choose, keep the message idempotent and queue per work order so batching does not change correctness.
Can I skip the MES and have operators report directly in the ERP?
Yes, for simple shops. The ERP's own shop floor screens or terminals may be enough if you do not need machine data, electronic work instructions or detailed traceability. An MES earns its cost when you need automatic machine counts, genealogy, or paperless routing, not just because it exists.
How do I handle a count correction after the confirmation was posted?
Send a compensating message that references the original message ID and carries the delta, then let the integration call the ERP's reversal or adjustment transaction. Do not edit the posted ERP document directly, since that breaks the audit trail and any downstream costing that already consumed it.
Where should employee and work center master data live?
Keep one master and sync it one way. Usually the ERP or HR system owns employees and work centers, and the MES receives them. Mismatched IDs between the two systems are a leading cause of rejected labor postings, so validate IDs at the interface and reject early with a clear message.
Related
How to Calculate OEE from MES Data and ERP Standards
OEE equals Availability times Performance times Quality. Availability comes from MES run and stop events against planned production time, Performance compares actual output to the ideal cycle time (usually the routing standard from the ERP), and Quality is good units divided by total units. The numbers are only trustworthy if planned time, ideal cycle time and the good/scrap split are defined once and used consistently.
How-toHow to Design Scrap and Downtime Reason Codes for MES and ERP
Keep one governed list of reason codes with a small hierarchy, owned in a single system and synchronised to the other. Separate scrap reasons from downtime reasons, mark each downtime code planned or unplanned and each scrap code as process, material, design or operator related, and map codes to ERP accounts or cost categories where accounting needs them. Fewer, clearer codes beat long lists nobody uses correctly.
AdvancedISA-95 and B2MML: How to Integrate ERP with MES
ISA-95 defines the boundary between business systems (Level 4, the ERP) and manufacturing operations (Level 3, the MES) and the information that crosses it. B2MML is the XML implementation of those models. In practice you exchange a ProductionSchedule from ERP to MES, and ProductionPerformance, plus material and equipment information, back, mapping each element to your ERP's work order and confirmation APIs.
How-toHow to Close a Job Order in SyteLine
Close a job order from Production > Job Orders once every routing operation is reported complete and the finished quantity has been received, then run Close Jobs to post the remaining WIP balance to variance and lock the job from further transactions.
AdvancedHow to Connect OPC UA Machine Data to Your ERP
Do not connect OPC UA servers straight to the ERP. Read machine tags through an edge gateway or MES, convert signals into business events (cycle complete, stop, state change, count), attach the work order context, and post summarised confirmations to the ERP through its supported API. The ERP wants quantities, times and reasons per order, not millions of raw tag values.
How-toHow to Sync an NCR From Your QMS to ERP Quarantine and MRB Disposition
The reliable pattern is two events: when the NCR opens, the ERP moves or flags the affected lot or serial into a non-nettable quarantine status; when the Material Review Board closes it, the disposition (use as is, rework, repair, scrap, return to vendor) triggers exactly one matching ERP transaction. The NCR number is the key that ties both sides together.
AI for ERPAI shop floor assistant for operators working inside your ERP
An on-prem AI copilot answers operator questions against your ERP work instructions, travelers, and routings in plain language, at the machine, without a screen full of menus.
AI for ERPAI for Infor SyteLine and CloudSuite Industrial
Add grounded AI to Infor SyteLine or CloudSuite Industrial: natural-language answers, agents over IDOs and ION, on-prem or CloudSuite deployment.
Stuck on MES to ERP integration?
Talk to engineers who work inside MES to ERP integration every week, and who build private AI that answers these questions from your own ERP data.