V5 Ultimate
Systems & integration · The complete guide

B2MML MessageBusiness To Manufacturing Markup Language Message

TL;DR

B2MML messages are XML payloads that implement ISA‑95’s neutral information models to connect ERP and MES/MOM. In GMP/ISO 13485 settings, they must be validated, secure, and auditable under Part 11/Annex 11 and GAMP 5. V5 orchestrates B2MML‑aligned exchanges so production, quality, labs, and warehousing transact on one execution record, supporting genealogy, review‑by‑exception, and effective CAPA feedback.

Reviewed · By V5 Ultimate compliance team· 3,500 words · ~16 min read

01What it is

A B2MML message is an XML document that implements the ISA‑95 enterprise‑control integration models to exchange manufacturing information between business systems (ERP, APS, QMS) and plant systems (MES/MOM, LIMS, WMS, CMMS). The schema families cover master data (materials, equipment, personnel, process segments), operations artifacts (definitions and schedules), and execution feedback (performance, genealogy, consumption/production). Because these payloads are standardised and strongly typed, they enable loosely coupled integrations that preserve manufacturing context while remaining system‑agnostic.

In regulated manufacturing, B2MML messages often constitute, or feed, electronic records that underpin eBMR/eDHR, release by exception, deviation/CAPA triggers, and serial/lot genealogy. Consequently, message design, transport, storage, and replay must be validated (GAMP 5), controlled (Annex 11/Part 11), and secured (NIST SP 800‑82) to assure integrity, authenticity, and traceability.

02Alignment with ISA‑95 and ISA‑88

B2MML encodes the ISA‑95 information models so that business and manufacturing systems share a common vocabulary and structure. ISA‑95 Part 2 defines object models (e.g., equipment, personnel, material, process segment), while Part 3 and Part 4 define operations activities (definition, scheduling, dispatching, data collection, performance). B2MML exposes these as XML types and documents—such as OperationsDefinition, ProcessSegment, MaterialDefinition, OperationsSchedule, and OperationsPerformance—providing a canonically structured handshake between ERP/MES and adjacent systems. When batch processes are involved, data structures harmonise with ISA‑88 recipes (e.g., mapping process segments to unit procedures/operations), supporting coherent eBMR/eDHR generation.

ISA‑95 LevelTypical B2MML Messages and Endpoints
Level 4 (ERP/APS/QMS)MaterialDefinition, ProductDefinition, PersonnelClass, EquipmentClass (master data); OperationsSchedule (planned orders); Quality specification references
Level 3 (MES/MOM/LIMS/WMS/CMMS)OperationsDefinition, ProcessSegment, OperationsDispatch (internal); OperationsPerformance (production, consumption, genealogy, nonconformance); Equipment/Personnel assignments
Level 2 (SCADA/DCS/PLC gateways)Aggregated execution data summarized to OperationsPerformance; equipment state/capability snapshots to OperationsCapability
Level 1/0 (Sensing/Actuation)Not typically B2MML; signals/events mediated via Level 2 and normalized upstream

03XML schemas and message structure

B2MML publishes XSDs for families such as Common, Equipment, Personnel, Material, ProcessSegment, OperationsDefinition, OperationsSchedule, OperationsPerformance, and OperationsCapability. A message instance typically includes a document root (e.g., OperationsSchedule), one or more transactions (e.g., ProcessSegmentInformation or OperationsRequest elements), business identifiers (site/area/line/unit), and temporal context (planned vs. actual start/finish in ISO 8601). Master data keys (material, equipment, personnel) are referenced consistently across documents to enable deterministic joins for genealogy.

  • Identifiers: Use globally unique keys (often combining site+code+revision) and version attributes to enable idempotent upserts and traceable supersession.
  • Time and units: Enforce ISO 8601 timestamps with time zone offsets and explicit UCUM or ISA‑95 unit definitions; never rely on implicit defaults.
  • State models: Carry execution and quality states (e.g., Scheduled, Dispatched, InProcess, Complete, Released, Rejected) with timestamps for each transition to support review‑by‑exception.
  • Extensibility: Constrain extensions to namespaced, schema‑validated additions; avoid schema‑breaking vendor fields that erode portability.

04Common message flows in regulated plants

Typical enterprise‑to‑plant flows send planned work and constraints downstream and return actual execution data upstream. Master data synchronization ensures both sides resolve to a single set of keys and classifications. Quality and maintenance systems subscribe to the same flows for immediate impact analysis.

  1. ERP/APS → MES: OperationsSchedule with work orders/batches, due dates, quantities, and material/equipment/personnel requirements; MaterialDefinition/ProductDefinition and revision effectivity.
  2. MES → ERP/QMS: OperationsPerformance with production quantities, consumption by lot/serial, scrap/rework, equipment/personnel usage, and deviations/nonconformances; genealogy linkages.
  3. LIMS ↔ MES: Sample requests tied to OperationsSchedule/ProcessSegment; results posted to OperationsPerformance or quality status attributes, gating release.
  4. WMS ↔ MES: Material lot status and location, kitting/dispense confirmations; inventory adjustments driven by executed consumption from OperationsPerformance.
  5. CMMS ↔ MES: Equipment state/capability updates (OperationsCapability) impact schedulability; executed work orders reflected as downtime context in performance.

05Identifiers, master data, and genealogy

Data integrity in B2MML depends on consistent identifiers across systems. MaterialDefinition/ProductDefinition should carry the authoritative item code, description, revision, and—if applicable—GS1 keys (e.g., GTIN for saleable items). MaterialLot instances must include lot/expiry/retention attributes and quality status. Equipment and Personnel should reference standard hierarchies and classes to support capability checks and segregation of duties. When serialisation is in scope, use structured serial ranges and, where applicable, GS1 SSCC for handling units to tie warehousing to manufacturing.

  • Master data governance: Single system of record for each object type; downstream systems subscribe via B2MML deltas with clear effectivity dates.
  • Genealogy: OperationsPerformance should enumerate consumed lots/serials with quantities and step context, and produced lots/serials with parentage, enabling full one‑up/one‑down traceability.
  • Change control: Revisions to ProductDefinition/ProcessSegment must be versioned; schedules reference explicit versions to prevent silent drift.
  • Location context: Include GLN or site/area/line identifiers so multi‑site operations avoid key collisions and facilitate recall scoping.

06Compliance, electronic records, and auditability

When B2MML messages constitute or feed GxP records (e.g., batch data, DHR elements, deviation triggers), they fall under electronic records controls. Part 11 and Annex 11 require integrity, authenticity, accurate and complete copies, retention, and audit trails. Interface transactions that create, modify, or delete GxP data must be attributable (who/when/what), with secure timestamps, controlled access, and appropriate review. Where e‑signatures are applied (often in the MES or QMS), the signature must be uniquely linked to the corresponding record and meaningfully capture intent (review, approval, verification).

07Validation and lifecycle management (GAMP 5)

GAMP 5 advocates a risk‑based approach to interfaces: qualify only what matters to product quality and patient/user safety, but do so thoroughly for message transformations and mappings that affect regulated records. Typical deliverables include a URS for integration behavior, data mappings, risk assessments (e.g., failure modes of schedule and performance flows), configuration specs, and test protocols covering nominal, boundary, and error paths. Traceability from requirements to test evidence should extend down to message element level for critical data (e.g., lot, quantity, unit, step, date/time, equipment).

  • Static testing: XSD validation, namespace conformance, and schema‑derived class mappings for canonical models.
  • Dynamic testing: End‑to‑end runs covering new/changed/cancelled schedules; re‑dispatch; partial completions; scrap; rework; lot splits/merges; time zone changes; daylight saving transitions.
  • Negative testing: Invalid identifiers, duplicate messages (idempotency), late arrivals/out‑of‑effectivity, unit mismatches, and security failures.
  • Lifecycle: Versioned schemas, documented change impact analysis, regression tests, and controlled deployment with back‑out plans.

08Security, segmentation, and resilience for message transport

NIST SP 800‑82 recommends network segmentation between enterprise (Level 4) and manufacturing (Level 3) with demilitarized zones, application gateways, and brokered exchanges. B2MML is payload‑centric; it can traverse multiple transports (web services, message queues, SFTP drops) so long as confidentiality, integrity, and availability are protected. TLS for data‑in‑transit, mutual authentication, least‑privilege service accounts, and whitelisting are baseline. For resilience, design idempotent processing keyed by message ID and version, implement durable queues with dead‑letter paths, and provide replay mechanisms that preserve original timestamps for audit credibility.

  • Authentication/authorization: Role‑based access for producers/consumers; separate duties for schema maintenance vs. runtime operations.
  • Payload integrity: Hashing/signing of payloads and logging of checksums; enforce schema validation at ingress.
  • Time integrity: Use synchronized, secure time sources; capture sent/received/processed timestamps with offsets.
  • Operational monitoring: Message‑level SLAs, alerting for stuck queues and retries, and dashboarding of success/failure by flow.
  • Business continuity: Active‑active or warm‑standby brokers, tested failover, and message de‑duplication post‑recovery.

09Implementation patterns and anti‑patterns

B2MML defines payloads; you choose the transport and orchestration. Mature plants favour brokered, asynchronous exchanges to decouple ERP and MES timing while supporting back‑pressure and retries. Synchronous APIs may be used for query‑style reads (e.g., status lookup), but execution events should avoid hard dependencies that couple production to upstream system latency. Canonical mapping layers shield applications from churn in endpoints and allow consistent enrichment (e.g., site codes, GLNs) and validation (units, effectivity).

  • Preferred patterns: Publish/subscribe via message queues; contract‑tested canonical models; strict schema and unit validation; content‑based routing by site/product.
  • Conditional patterns: SFTP file drops when brokers are unavailable—hardened with atomic file moves, checksums, and pickup acknowledgements.
  • Anti‑patterns: Free‑text fields for critical data; hard‑coded application‑specific IDs in place of governed keys; point‑to‑point spaghetti; uncontrolled schema drift; silently ‘fixing’ units/rounding during mapping.

10Testing, release, and steady‑state operations

Before go‑live, execute interface IQ/OQ that exercises the transport, security, and schema gates, followed by PQ scenarios representative of actual manufacturing: campaign scheduling, partial batches, overtime shifts, material substitutions, holds, and deviations. Capture golden messages and expected results as regression artifacts. Operationally, treat the interface as a controlled asset: patch transport components under change control, monitor SLA compliance, and perform periodic challenge tests for replay, failover, and access control. Maintain message retention and reprocessing procedures proportional to record retention and recall horizon.

  • Release readiness: Dry runs with mirrored production loads; validation of time zone edge cases; data migration of in‑flight orders.
  • Steady‑state: Daily health checks, backlog burn‑down metrics, and ticketed replays with auditable approvals.
  • Continuous improvement: Interface KPIs (e.g., message lead time, failure rate, rework due to mapping errors) tied to ISA‑95 Level 3 performance dashboards.

11How V5 handles B2MML messaging

V5 Ultimate implements a canonical, ISA‑95‑aligned messaging layer for schedules, definitions, and performance across MES, QMS, eBMR/eDHR, LIMS, WMS, and Maintenance. It enforces schema validation, identifier governance, and unit/time normalization at ingress and egress, with durable queues, replay, and end‑to‑end auditability. Quality‑critical fields (e.g., material lot, quantity, step timestamps, approver attribution) are treated as controlled data elements subject to Part 11/Annex 11, and interface tests are traceable to requirements under a GAMP 5 lifecycle.

12Frequent pitfalls and how to avoid them

Integration failures in regulated plants rarely stem from XML syntax; they come from semantics, governance, and operations. Avoid the following failure modes and apply targeted controls.

  • Ambiguous keys: Two systems generate different ‘master’ lot IDs; control with a single system of record and explicit key mapping with effectivity.
  • Unit confusion: Upstream plans in kg, downstream execution in g—lock UCUM units and automate unit conversions only where validated and traceable.
  • Time ambiguity: Messages lack time zone offsets; enforce ISO 8601 with offsets and persist sent/received/processed times.
  • Silent corrections: Mapping layer ‘fixes’ bad data; reject at gate with explicit error reporting to preserve data integrity (MHRA/Annex 11).
  • Schema drift: Vendor updates break consumers; freeze versions, publish deprecation timelines, and regression test under change control.
  • Security shortcuts: Shared generic accounts and plaintext transfers; implement mutual TLS, unique service principals, and brokered DMZ patterns (NIST SP 800‑82).

Frequently asked questions

Q.Is B2MML a transport protocol or an API?+

Neither. B2MML is a set of XML schemas that define payload structure derived from ISA‑95. You can move B2MML messages over brokers, web services, SFTP, or APIs, provided you preserve security and integrity.

Q.Do B2MML messages need to be Part 11 compliant?+

If they create, modify, or are relied upon as part of electronic GxP records (eBMR/eDHR, deviations, release), then yes: apply Part 11/Annex 11 controls on identity, audit trails, accurate and complete copies, retention, and system validation.

Q.How do we handle versioning and idempotency?+

Include message IDs and document/version attributes; design consumers to upsert deterministically and ignore duplicates. Maintain clear effectivity dates for master data and schedules to prevent race conditions.

Q.Can we extend B2MML for site‑specific needs?+

Yes, but use namespaced, schema‑validated extensions and document them. Avoid overloading standard elements or adding free‑text for critical data, which undermines portability and validation.

Q.What testing evidence do inspectors expect for interfaces?+

Risk‑based test protocols mapped to requirements, covering nominal and error paths; schema validation; security/segregation checks; replay and recovery; and retained message copies with audit logs for the defined retention period.

Primary sources

Further reading

See B2MML Message working on a real shop floor

V5 Ultimate ships with the B2MML Message controls already wired in — audit trail, e-signatures, validation evidence. Free trial, no credit card, onboard in days, not months.