Skip to main content

ERP Connector Data Mapping Specification

Introduction

This document defines the data elements required to build an ERP Connector for MachineMetrics (MM). It serves as the authoritative mapping specification for integrating any ERP system with MM.

The document is intended for three audiences:

  • ERP customers and IT teams – who need to understand what data must be provided.
  • MachineMetrics internal staff – who configure and validate integrations.
  • Automation agents (e.g., MCP or Cursor) – which use this document as structured guidance to generate queries, mappings, or API calls when building a connector.

How to Use This Document

Each section (Work Orders, Work Order Operations, Resources, Persons, Labor Tickets, Reasons) describes:

  • Field Name – the ERP field to map.
  • Description – its role in MM.
  • Requirement – marked as ✅ Required (must be provided) or ⚪ Optional (enhances functionality).
  • API Name – the equivalent MM field (in camelCase) for direct use in queries or API calls.
  • Data Type – generic data type to guide schema mapping (string, integer, number, date, datetime, boolean).
For agents (MCP, Cursor, or LLM-based tools)

Use the API Name column when generating mappings or transformation code. The Required/Optional flags should be treated as constraints when validating integration completeness.


Required vs Optional Fields

  • Required – Must be provided to enable core ERP-to-MM functionality.
  • Optional – Improves reporting, visibility, or flexibility but not strictly required for connector operation.

Data Synchronization Overview

ERP Connectors must support both:

  • Historical load – imports work orders, operations, and other records up to a defined date to initialize MM.
  • Incremental syncs – ongoing updates that only pull new or modified records using the updatedAt field (or ERP equivalent).

Different tables (e.g., Work Orders, Labor Tickets) may use different sync strategies, but all must include a reliable change-tracking field to avoid unnecessary data transfer.

For details on the required order in which to load this data, see the Load Sequence section at the end of the mapping specifications.


Work Orders

Work order data is the foundation of the ERP Connector. These fields define the unique identifier for each work order, its scheduling information, quantities, and part details. MachineMetrics uses this data to display accurate work order progress, calculate OEE, and tie machine activity back to ERP-defined jobs.

ERP Connector Guidance
  • When possible, extract work orders and work order operations together. This ensures every operation is consistently linked with its parent work order and avoids "orphaned" operations.
  • If your ERP has multiple scheduling or due date fields, choose the one that best represents the actual production schedule on the shop floor.
  • In some ERPs, the customer name is not stored directly on the work order. In this case, it may need to be retrieved by joining the work order → sales order → customer master chain.
Field NameDescriptionRequired/OptionalAPI NameData TypeSDK
Work Order IDUnique identifier for the work order✅ RequiredworkOrderIdstring1.0
LotRefers to a material batch. If not used, default to an empty string.✅ Requiredlotstring1.0
SplitBatch number if order split for staggered delivery. If not used, default to an empty string.✅ Requiredsplitstring1.0
SubRefers to a child work order linked to a main work order, often used for sub-assemblies. If not used, default to an empty string.✅ Requiredsubstring1.0
DescriptionDescription of the work to be done.⚪ Optionaldescriptionstring1.0
Scheduled Start Date/TimePlanned start date/time.✅ RequiredscheduledStartDatedatetime1.0
Scheduled End Date/TimePlanned end date/time.✅ RequiredscheduledEndDatedatetime1.0
Due DateDate work order must be completed.✅ RequireddueDatedate1.0
Closed DateActual date the work order was closed. May be null or blank until the work order is closed; an open or active work order will not have one. The connector must be able to pull this value once it is populated.✅ RequiredclosedDatedate1.0
Quantity RequiredPlanned production quantity.✅ RequiredquantityRequiredinteger1.0
StatusCurrent state of the work order. Must be mapped to one of the following enumerations: RELEASED, NOT RELEASED, COMPLETED, CANCELED, ACTIVE (map ERP → MM enumerations).✅ Requiredstatusstring1.0
Method / Job TypeType of work.⚪ Optionalmethodstring1.0
Part NumberPart identifier.✅ RequiredpartNumberstring1.0
Part RevisionPart revision/version.⚪ OptionalpartRevisionstring1.0
Part DescriptionText description of part.⚪ OptionalpartDescriptionstring1.0
Part Family/Product LineERP grouping/category.⚪ OptionalpartFamilystringUpcoming
Customer NameERP customer name.⚪ OptionalcustomerNamestringUpcoming
PriorityERP scheduling/priority indicator.⚪ OptionalpriorityintegerUpcoming
Updated AtTimestamp of last update, used for syncing data.✅ RequiredupdatedAtdatetime1.0

Work Order Operations

Operations (or sequences) are the steps required to complete a work order. Operation data enables MachineMetrics to show where in the process a job is, track sequence-specific performance, and capture cycle/setup times for OEE.

ERP Connector Guidance
  • When extracting work orders and work order operations together, repeated fields linking work order operations to the work order (work order ID, lot, split, sub) are not required.
  • Each operation must have a valid Resource ID (workcenter/machine) that exists in the ERP's resource list. This ensures MachineMetrics can tie production activity and labor tickets back to the correct machine or workcenter.
Field NameDescriptionRequired/OptionalAPI NameData TypeSDK
Work Order IDUnique identifier for the work order✅ RequiredworkOrderIdstring1.0
LotRefers to a material batch. If not used, default to an empty string.✅ Requiredlotstring1.0
SplitBatch number if order split for staggered delivery. If not used, default to an empty string.✅ Requiredsplitstring1.0
SubRefers to a child work order linked to a main work order, often used for sub-assemblies. If not used, default to an empty string.✅ Requiredsubstring1.0
Sequence NumberOperation/sequence identifier.✅ RequiredsequenceNumberinteger1.0
Resource IDWorkcenter or machine identifier.✅ RequiredresourceIdstring1.0
Start QuantityThe number of parts that have been completed on the WOO.⚪ OptionalstartQuantityinteger1.0
Finish QuantityThe number of parts required to be made.✅ RequiredfinishQuantityinteger1.0
Expected Reject RateThe % of parts expected to be bad when the job (operation) is done.⚪ OptionalexpectedRejectRatenumber1.0
Scheduled Start Date/TimePlanned start for operation.✅ RequiredscheduledStartDatedatetime1.0
Scheduled End Date/TimePlanned end for operation.✅ RequiredscheduledEndDatedatetime1.0
Closed DateActual date the operation completed.⚪ OptionalclosedDatedate1.0
Cycle Time (ms)Expected cycle time per part in milliseconds.⚪ OptionalcycleTimeMsinteger1.0
Setup Time (ms)Expected setup time in milliseconds.⚪ OptionalsetupTimeMsinteger1.0
Production Hourly Burden RateHourly cost of running the operation in production.⚪ OptionalproductionBurdenRateHourlynumber1.0
Setup Hourly Burden RateHourly cost to setup the operation.⚪ OptionalsetupBurdenRateHourlynumber1.0
Operation TypeDescribes the type of work the operation represents.⚪ OptionaloperationTypestring1.0
Quantity per PartParts produced per cycle.⚪ OptionalquantityPerPartinteger1.0
StatusOperation status. Must be mapped to one of the following enumerations: RELEASED, NOT RELEASED, COMPLETED, CANCELED, ACTIVE (map ERP → MM enumerations).✅ Requiredstatusstring1.0
Updated AtTimestamp of last update, used for syncing data.✅ RequiredupdatedAtdatetime1.0

Labor Tickets

Labor tickets track operator activity such as clock-in/clock-out, production reporting, and scrap. They tie operator activity back to specific work orders, operations, resources, and people so MachineMetrics can attribute labor and production accurately.

For customers

At minimum, ensure that operator IDs and timestamps are accurate, as these fields drive labor tracking and traceability.

Field NameDescriptionRequired/OptionalAPI NameData TypeSDK
Work Order IDAssociated work order.✅ RequiredworkOrderIdstring1.0
LotRefers to a material batch. If not used, default to an empty string.✅ Requiredlotstring1.0
SplitBatch number if order split for staggered delivery. If not used, default to an empty string.✅ Requiredsplitstring1.0
SubRefers to a child work order linked to a main work order, often used for sub-assemblies. If not used, default to an empty string.✅ Requiredsubstring1.0
Operation Sequence NumberAssociated operation/sequence.✅ RequiredsequenceNumberinteger1.0
Resource IDResource where labor occurred.✅ RequiredresourceIdstring1.0
Person IDOperator performing work.✅ RequiredpersonIdstring1.0
Labor Ticket IDUnique identifier of the labor ticket from ERP.✅ RequiredlaborTicketIdstring1.0
Transaction DateStart date of the labor.✅ RequiredtransactionDatedatetime1.0
Clock-In TimestampStart time for labor.✅ RequiredclockIndatetime1.0
Clock-Out TimestampEnd time for labor.⚪ Optional at clock-in / ✅ Required at clock-outclockOutdatetime1.0
Good Parts ProducedNumber of good parts reported.⚪ OptionalgoodPartsinteger1.0
Bad Parts ProducedNumber of scrapped/rejected parts.⚪ OptionalbadPartsinteger1.0
TypeType of labor. Must be mapped to one of the following enumerations: SETUP, PRODUCTION, INDIRECT (map ERP → MM enumerations).✅ Requiredtypestring1.0
StateDescribes the state of the labor ticket: OPEN, CLOSED (map ERP → MM enumerations).✅ Requiredstatestring1.0
CommentAdditional context about the work related to this ticket.⚪ Optionalcommentstring1.0
Updated AtTimestamp of last update, used for syncing data.✅ RequiredupdatedAtdatetime1.0

Resources (Workcenters / Machines)

Resource data defines the machines, workcenters, or labor pools where work is performed. This ensures that MachineMetrics can tie machine signals to the correct ERP-defined resource.

For customers

Make sure your ERP's resource IDs match the naming convention used on your shop floor to avoid mapping confusion.

Field NameDescriptionRequired/OptionalAPI NameData TypeSDK
Resource IDWorkcenter or machine identifier.✅ RequiredresourceIdstring1.0
NameA colloquial name for the resource, sometimes also just the resource ID.⚪ Optionalnamestring1.0
Resource GroupWhether the resource is an individual machine or a group of machines.⚪ OptionalisResourceGroupboolean1.0
Resource DescriptionDescription of resource.⚪ Optionaldescriptionstring1.0
TypeType of machine, such as Lathe or Mill.⚪ Optionaltypestring1.0
Production Hourly Burden RateHourly cost of running this operation in production.⚪ OptionalproductionBurdenRateHourlynumber1.0
Setup Hourly Burden RateHourly cost to setup this operation.⚪ OptionalsetupBurdenRateHourlynumber1.0
Updated AtTimestamp of last update, used for syncs.✅ RequiredupdatedAtdatetime1.0

Persons (Operators / Employees)

Person data defines who is performing the work. Linking operators ensures labor tickets and performance metrics are attributed to the correct individual or team.

For customers

If your ERP uses employee numbers or short codes, share these consistently so they can be tied to MachineMetrics operator logins.

Field NameDescriptionRequired/OptionalAPI NameData TypeSDK
Person IDUnique ERP operator/employee identifier.✅ RequiredpersonIdstring1.0
First NameEmployee/operator first name.⚪ OptionalfirstNamestring1.0
Last NameEmployee/operator last name.⚪ OptionallastNamestring1.0
Active FlagWhether employee is active/terminated.⚪ OptionalisActiveboolean1.0
Updated AtTimestamp of last update, used for sync.✅ RequiredupdatedAtdatetime1.0

Reasons (Scrap Codes)

Reasons capture the standardized codes for scrap or reject reporting. When labor tickets report bad parts, MachineMetrics requires a valid reason code to categorize and sync this information with ERP.

For customers

Ensure ERP scrap/reject codes align with MM expectations to avoid mismatches during labor ticket submission.

Field NameDescriptionRequired/OptionalAPI NameData TypeSDK
Reason IDUnique identifier for the reason code.✅ RequiredreasonIdstring1.0
Entity TypeIndicates the context the reason applies to, such as machine downtime or rejected parts (quality).⚪ OptionalentityTypestring1.0
CategoryCategory of reason (scrap, downtime, etc.).⚪ Optionalcategorystring1.0
CodeShort ERP scrap/reject code.⚪ Optionalcodestring1.0
DescriptionFull description of scrap/reject reason.⚪ Optionaldescriptionstring1.0
Updated AtTimestamp of last update, used for syncing reasons.✅ RequiredupdatedAtdatetime1.0

Load Sequence

When integrating with MachineMetrics, data must be loaded in a specific sequence to ensure that references between records (e.g., labor tickets pointing to employees, operations tied to work orders) remain valid.

note

This sequence is handled automatically when using the MachineMetrics ERP SDK. If you are not using the SDK, you must follow these rules manually to avoid broken references or sync errors.

  1. Resources, Reason Codes, and Persons — Load master/lookup tables first. These provide the reference data needed for downstream records.
  2. Work Orders and Operations — Next, load work orders together with their operations to establish parent–child relationships before transactions.
  3. Labor Tickets — Finally, load labor tickets. These require work orders/operations, resource, and employee references to already exist.

Enumerations

  • WORK ORDER STATUS: RELEASED, NOT RELEASED, COMPLETED, CANCELED, ACTIVE
  • WORK ORDER OPERATION STATUS: RELEASED, NOT RELEASED, COMPLETED, CANCELED, ACTIVE
  • LABOR TICKET TYPE: SETUP, PRODUCTION, INDIRECT
  • LABOR TICKET STATUS: OPEN, CLOSED

Appendix: ERP Connector Rules (for LLMs and Implementers)

General Data Integration Rules

  • RULE: Every entity (Work Order, Operation, Resource, Labor Ticket, Person, Reason) must include an updatedAt (or equivalent) field for incremental syncs.
  • RULE: ERP Connector must support both historical data load (initial import) and incremental syncs (ongoing).
  • RULE: Each table may use its own sync mechanism (e.g., last modified date, sys.id), but must guarantee incremental sync efficiency.
  • RULE: Field enumerations must be mapped to MM ENUMERATIONS exactly (all caps). Example: Work Order Status → (RELEASED, NOT RELEASED, COMPLETED, CANCELED, ACTIVE).
  • RULE: Datetime strings should be in ISO 8601 format (e.g., 2025-04-17T03:29:00.000Z for UTC/Zulu time or, RECOMMENDED, 2025-04-17T03:29:00.000-05:00 for local time with offset).
  • RULE: Date strings should be in ISO 8601, e.g. 2025-04-17T00:00:00.000-05:00 or 2025-04-17.

Work Orders

  • RULE: Work Orders and Operations must be extracted as a flat file to ensure operations are always linked to their parent work orders.
  • RULE: Work Orders must contain a unique Work Order ID.
  • RULE: Due Date must be extracted consistently; if multiple ERP date fields exist, select the one representing shop floor schedule commitments.
  • RULE: Customer Name may require joining Work Order → Sales Order → Customer Master. Always resolve to a human-readable name when possible.

Work Order Operations

  • RULE: Every Operation must reference a valid parent Work Order.
  • RULE: Each Operation must have a Sequence Number that uniquely identifies it within the Work Order.
  • RULE: Resource IDs in operations must match valid ERP Resource table entries (workcenters/machines). Operations with unmapped resources should be excluded or flagged.
  • RULE: Operation status must be mapped to MM ENUMERATIONS (RELEASED, NOT RELEASED, COMPLETED, CANCELED, ACTIVE).

Resources

  • RULE: Every Resource ID in Operations or Labor Tickets must exist in the ERP Resource (Workcenter/Machine) table.
  • RULE: Resource descriptions are optional, but if provided, they should match shop floor naming to avoid operator confusion.

Labor Tickets

  • RULE: Labor Ticket Type must be mapped to MM ENUMERATIONS (SETUP, PRODUCTION, INDIRECT).
  • RULE: Every Labor Ticket must reference a valid Person ID in the Persons table.
  • RULE: Every SETUP or PRODUCTION type Labor Ticket must reference a valid Work Order, Operation, Resource, and Person.
  • RULE: If bad parts are reported, a valid Reason Code must be supplied (see Reason Codes section).

Persons (Operators/Employees)

  • RULE: Active Flag must be maintained to prevent assigning tickets to inactive employees.

Reason Codes

  • RULE: If bad parts are reported in Labor Tickets, Reason Codes must be included.
  • RULE: Reason IDs and Codes must be unique across the ERP.

Load Sequence

  • RULE: Entities must be loaded in this order:
    1. Resources, Reason Codes, and Persons (lookup tables).
    2. Work Orders and Operations (parent/child relationships).
    3. Labor Tickets (dependent transactions).
  • RULE: ERP SDK enforces this automatically. If not using SDK, ERP Connector must implement load sequencing manually.