# ISA-95 and B2MML: How to Integrate ERP with MES

> Source: https://netray.co/erp-help/mes-isa-95-b2mml-erp-integration-how-to
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

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.

## Kind

advanced

## System

mfg-systems

## Erp

ERP and MES integration

## Module

ISA-95 / B2MML

## Query

ISA-95 B2MML integration between ERP and MES how to

## Alternate Queries

- B2MML production schedule ProductionPerformance example
- ISA-95 level 3 level 4 integration
- ISA-95 part 2 object model ERP MES
- B2MML XML ERP to MES work order

## Applies To

ISA-95 (IEC 62264) based integrations using B2MML XML or equivalent JSON, against any ERP with a web service, IDO, BAPI or REST interface

## Steps

### How to implement an ISA-95 / B2MML interface

**Items:**

Draw the Level 3 / Level 4 boundary: ERP owns orders, materials, costing and customers; MES owns detailed scheduling, execution, genealogy and machine interaction.

List the information flows you need: master data (material, equipment, personnel), ProductionSchedule (ERP to MES), ProductionPerformance (MES to ERP), and optionally ProductionCapability and ProductionRequest.

Select the B2MML version your MES vendor supports and obtain its XSDs; do not mix versions between the two sides.

Map ISA-95 elements to ERP objects: ProductionRequest or ProductionSchedule to production/work order, SegmentRequirement to routing operation, MaterialRequirement to BOM component, EquipmentRequirement to work center.

Define identifiers: a stable ID for each order, segment and material that both systems recognise, plus a unique message ID for idempotency.

Build the transport (REST, SOAP, message queue, or an iPaaS) with schema validation on receipt and a dead-letter queue for rejects.

Return ProductionPerformance with ProductionResponse, SegmentResponse, material actuals (consumed, produced) and personnel and equipment actuals, and post them to the ERP via its supported confirmation API.

Test with sample messages for edge cases: split orders, rework, partial completions, cancelled orders and re-sent messages.

## Sections

### What ISA-95 gives you, and what it does not

**Body:**

ISA-95 (IEC 62264) is a standard model: a functional hierarchy (Levels 0 to 4), defined activity models, and an object model for information exchanged between enterprise and manufacturing systems. B2MML, maintained by MESA, is the XML schema family that encodes those objects. The value is a shared vocabulary so ERP and MES vendors, and your integrators, mean the same thing by schedule, segment, material lot and performance.

What it does not give you is plug and play. B2MML is intentionally generic, with many optional elements, so two compliant systems still need a mapping agreement: which optional fields are populated, what units are used, and how your ERP's routings map to segments. Treat the standard as the dictionary and your interface spec as the conversation.

### The core messages

**Body:**

ProductionSchedule carries what to make: one or more ProductionRequests, each with SegmentRequirements describing steps, materials, equipment and personnel, along with planned start and end times and quantities. ProductionPerformance carries what happened: ProductionResponses with SegmentResponses, actual quantities consumed and produced, actual times, and the resources used.

Keep messages business-level. The MES should not need the ERP's internal table keys, and the ERP should not receive raw machine data. Machine signals belong to a lower level, reaching the MES through OPC UA or a historian, and are summarised into performance records before crossing to the ERP.

**Code:**

<ProductionPerformance xmlns="http://www.mesa.org/xml/B2MML">
  <ID>PERF-000412</ID>
  <ProductionResponse>
    <ID>WO-100234</ID>
    <SegmentResponse>
      <ID>OP-40</ID>
      <StartTime>2026-10-19T06:02:11Z</StartTime>
      <EndTime>2026-10-19T09:47:50Z</EndTime>
      <MaterialProduced>
        <MaterialDefinitionID>PART-7731</MaterialDefinitionID>
        <Quantity><QuantityString>46</QuantityString><UnitOfMeasure>EA</UnitOfMeasure></Quantity>
      </MaterialProduced>
    </SegmentResponse>
  </ProductionResponse>
</ProductionPerformance>

### Mapping to the ERP

**Body:**

Most ERPs do not speak B2MML natively. You need an adapter: a service or iPaaS flow that transforms between B2MML and the ERP's own interface (for example SyteLine IDOs, M3 MI programs or APIs, SAP BAPIs and OData, NetSuite REST or SuiteScript, Dynamics OData). Keep the transformation logic in one place, versioned and covered by tests, rather than scattered in scripts on either side.

Decide how revisions and effectivity are handled. If an engineering change alters a routing mid-order, the MES must know which segment definition applies to which order. Pass the revision explicitly rather than assuming the latest.

### Versioning, validation and testing

**Body:**

Validate every inbound message against the XSD and fail fast with a clear reason. Version your interface contract, and support at least one previous version during rollouts. Log full message payloads with correlation IDs in a store you can search, since interface troubleshooting is mostly reading messages.

Build a regression set of real messages including ugly ones: duplicate sends, out-of-order segments, quantity zero, missing optional fields, and unit mismatches. Run it on every change to the adapter or either system's upgrade.

## Pitfalls

- Assuming two B2MML-compliant systems will interoperate without a written mapping agreement.
- Mixing B2MML schema versions between the ERP adapter and the MES.
- Sending raw machine telemetry through the ERP interface instead of summarised performance.
- Omitting message IDs, making retries create duplicates.
- Ignoring unit-of-measure differences between systems.
- Letting routing revisions change mid-order without passing the revision to the MES.

## Ai Angle

AI can help at the edges of an ISA-95 project: an assistant grounded in the ERP can explain which routing operations and BOM components would map to which segments, and compare message payloads against posted ERP documents to find mismatches. For SyteLine, SyteRay can help draft and review the IDO-side mapping. It should not generate production interface code unreviewed, and any write-back stays behind human approval.

## Faq

### Is B2MML the same as ISA-95?

**Answer:** No. ISA-95 is the standard (IEC 62264) defining models and terminology. B2MML is an XML schema implementation of those models published by MESA International. You can follow ISA-95 concepts using JSON or another format, but B2MML is the best-known XML encoding.

### Do I need B2MML if my MES vendor has a native ERP connector?

**Answer:** Not necessarily. A vendor-supported connector for your ERP and version can be the lower-risk path. B2MML is most useful for multi-vendor environments, for reducing lock-in, or when no maintained connector exists for your ERP.

### Is ISA-95 relevant for cloud ERPs like NetSuite?

**Answer:** Yes, the information model is unchanged. Only the transport and API style differ, usually REST or SOAP web services and an iPaaS rather than on-prem file drops. Mind API rate limits and concurrency governance when sending frequent performance messages.

### What is the difference between ProductionSchedule and ProductionPerformance?

**Answer:** ProductionSchedule is the plan sent from the ERP to the MES: what to produce, when and with what. ProductionPerformance is the actuals reported back: what was made, what was consumed, who and what equipment were used, and when. Together they close the loop between planning and execution.

## Search terms

ISA-95 integration, B2MML ERP MES, IEC 62264, ISA-95 level 3 level 4, ProductionSchedule ProductionPerformance, B2MML XML example, ERP MES interface design, MESA B2MML schema, ISA-95 object model, MES ERP integration standard

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
