Skip to main content

ERP Connector Data Mapping Specification

Introduction​

This reference defines the ERP data elements and their MachineMetrics field names. Use it with the custom connector guide and the SDK documentation supplied with your connector project. For a pre-built connector, use its guide for the implemented records and configuration.

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​

This reference covers Parts, Part Operations, Work Orders, Work Order Operations, Resources, Persons, Reasons, Labor Tickets, and Timesheets. It also explains the relationships and metadata that connect those records.

Three Different Contracts​

LayerWhat it describesHow to use it
ERP schema and ERP Data StudioStored records, references, relationships, and fields exposed for inspection.Understand which record you are viewing and how it relates to other records.
Connector and SDK payloadThe values a particular import/export path accepts and how it serializes them.Follow the SDK version installed in your connector and the selected API's payload contract.
Customer setupERP accounts, permissions, resource mappings, operator links, and workflow choices.Follow Setup and Verification and your connector guide.

A field visible in ERP Data Studio is not automatically a field to send in an ERP import. Some values are assigned by MachineMetrics or supplied by the authenticated company context. An SDK REST payload can serialize a numeric value as a string even when the stored field is numeric.

The API Name column identifies the field. Check the selected API's naming and types before constructing requests. Do not use a read/query response as an import payload without checking that contract.

Required vs Optional Fields​

The Required/Optional annotations describe integration guidance. They do not describe database nullability, every SDK constructor, or every connector's validation rules. For example, an open work order can have a null closed date, and an ERP ticket ID may not exist until the ERP accepts the ticket.

Tables with a Mapping notes column describe stored fields without implying that every exposed field is a required connector input. Confirm required fields, defaults, and supported entities for your connector's installed SDK and endpoint. SDK-version labels describe the payload contract; confirm feature availability for the installed connector.

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.


Parts​

A Part identifies a manufactured item and its revision and method. Within a company, the identity is the combination of partNumber, partRevision, and method. Part number alone is not sufficient when revisions or methods differ.

FieldAPI nameLogical typeMapping notes
Part numberpartNumberstringERP part identifier.
Part revisionpartRevisionstringRevision component of the part identity. Preserve the connector's normalization for an unused revision.
MethodmethodstringMethod/routing component of the part identity. Use the value expected by the connector; do not substitute a different method label during updates.
Created / updatedcreatedAt, updatedAtdatetimeStored record timestamps; see Identifiers and Sync Metadata.
Custom fieldscustomFields, customFieldsSchemaRefobject / referenceOptional extension data; see Custom Fields.

ERP Data Studio's Parts view uses this composite identity and shows related part operations and work orders. The part's display name is exposed as partName on Part Operations; it is not a separate name field in the Part payload described here.

Part Operations​

A Part Operation describes a step in the part's routing. A Work Order Operation describes that step for a particular production order. Several work orders can therefore reference the same part operation.

The routing-step identity is the part identity plus sequenceNumber, within a company. partOperationRef is a separate MachineMetrics reference to the stored row.

FieldAPI nameLogical typeMapping notes
Part identitypartNumber, partRevision, methodstringsIdentifies the parent Part. Keep all components consistent with that record.
Operation sequencesequenceNumbernumberIdentifies the step within the routing. Some SDK send models use a string representation.
ResourceresourceIdstringERP resource assigned to the routing step.
Part display namepartNamestringHuman-readable part name exposed on the part operation.
DescriptiondescriptionstringDescription of the routing step.
Cycle timecycleTimeMsnumberExpected cycle time, in milliseconds.
Setup timesetupTimeMsnumberExpected setup time, in milliseconds.
Quantity per partquantityPerPartnumberParts produced per cycle.
Stored referencepartOperationRefreferenceMachineMetrics row identifier used for lookup in ERP Data Studio. Do not substitute an ERP operation number.
Created / updatedcreatedAt, updatedAtdatetimeStored record timestamps.
Custom fieldscustomFields, customFieldsSchemaRefobject / referenceExtension data for this routing step.

In flattened SDK imports, operationDescription supplies the Part Operation's description, and partOperationCustomFields supplies its custom fields. The similarly named opCustomFields belongs to the Work Order Operation instead. Check the flattened-row contract before assigning data that varies by order to a shared routing step.

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 IDERP order identifier; see the full order key in Identifiers and Sync Metadata.✅ 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.✅ RequiredquantityRequirednumber1.0
StatusCurrent state of the work order. Map ERP values deliberately; see Enumerations for the SDK vocabulary and endpoint-specific behavior.✅ 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 IDERP order identifier; see the full order key in Identifiers and Sync Metadata.✅ 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.✅ RequiredsequenceNumbernumber1.0
Resource IDWorkcenter or machine identifier.✅ RequiredresourceIdstring1.0
Start QuantityThe number of parts that have been completed on the WOO.⚪ OptionalstartQuantitynumber1.0
Finish QuantityThe number of parts required to be made.✅ RequiredfinishQuantitynumber1.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.✅ RequiredscheduledFinishDatedatetime1.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.⚪ OptionalquantityPerPartnumber1.0
StatusOperation status. Map ERP values deliberately; see Enumerations for the SDK vocabulary and endpoint-specific behavior.✅ 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.✅ RequiredsequenceNumbernumber1.0
Resource IDResource where labor occurred.✅ RequiredresourceIdstring1.0
Person IDOperator performing work.✅ RequiredpersonIdstring1.0
Labor Ticket IDIdentifier assigned by the ERP. It may be absent before a new outbound ticket has been accepted by the ERP. See Identifiers and Sync Metadata.Connector-specificlaborTicketIdstring1.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.⚪ OptionalgoodPartsnumber1.0
Bad Parts ProducedNumber of scrapped/rejected parts.⚪ OptionalbadPartsnumber1.0
TypeType of labor. Must be mapped to one of the following enumerations: SETUP, PRODUCTION, INDIRECT (map ERP → MM enumerations).✅ Requiredtypestring1.0
StateTicket state, such as OPEN or CLOSED. Other values depend on the connector and workflow; see 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

Timesheets​

Timesheets record person-level clock-in/out sessions separately from job labor tickets. ERP Data Studio exposes a MachineMetrics Timesheet reference, Person ID, clock-in and clock-out timestamps, source system, external transaction ID, terminal ID, and created/updated timestamps. An open session has no clock-out timestamp.

Timesheet support and synchronization direction must be confirmed for each connector. The labor-ticket mapping above does not define a Timesheet mapping contract. See Timesheets for the user-facing fields and verified connector behavior.

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

Resource-Group Membership​

isResourceGroup marks a resource as a group. It does not identify the group's members. The schema represents membership separately in erp.resource_group_membership.

Schema fieldMeaning
memberOfResourceIdResource ID of the group.
hasMemberResourceIdResource ID of the member resource.
memberOfCompanyIdCompany context for the group.
hasMemberCompanyIdCompany context for the member.
createdAt, updatedAtTimestamps on the membership record.

For example, if a group contains two machine resources, the relationship is represented by a membership row for each member. The group and member IDs refer to Resource records. These schema fields describe the relationship; they are not a universal SDK import payload.

Resource-group membership is also distinct from mapping a MachineMetrics machine for labor or scheduling. Configure Record labor as and Schedule jobs as in MES Settings. A MachineMetrics machine group and an ERP resource group should not be treated as the same record merely because their names match.

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

Reason Mappings and Labor-Ticket Reasons​

An ERP reason has both an ERP-facing identifier (reasonId) and a MachineMetrics reference (reasonRef). The schema also exposes links to MachineMetrics reason records:

FieldMeaning
reasonRefMachineMetrics reference for the ERP reason row.
rejectReasonRefReference to the mapped MachineMetrics reject reason, when present.
annotationTypeRefReference to the mapped MachineMetrics annotation/downtime category, when present.

The Reasons view in ERP Data Studio exposes those mappings. For the effect of missing reject mappings in ERP Driven mode, see Rejected Parts and Reject Reasons.

A reason's existence in the lookup table does not by itself associate it with a labor ticket. The relationship erp.rel_labor_ticket_reason links laborTicketRef to reasonRef; labor exports can expose the resulting reasons relationship.

The current SDK's MMSendLaborTicket also supports a reasonId for the import path that writes this association. Its REST serializer omits an unset reason rather than sending a null. Do not assume that an omitted reason and an explicit null have the same update behavior, or that every connector uses this path.

Identifiers and Sync Metadata​

Keep ERP business IDs separate from MachineMetrics references. Do not replace one with the other because both look numeric.

RecordBusiness identity within the companyMachineMetrics reference, where exposed
PartpartNumber + partRevision + methodComposite identity; no separate Part reference in the described Part query.
Part OperationPart identity + sequenceNumberpartOperationRef
Work OrderworkOrderId + lot + split + subFull composite order identity.
Work Order OperationFull order identity + sequenceNumberworkOrderOperationRef
ResourceresourceIdResource ID in its company context.
PersonpersonIdPerson ID in its company context.
ReasonreasonIdreasonRef
Labor TicketlaborTicketId assigned by the ERPlaborTicketRef
TimesheetPerson/session record; external transaction ID may be presenttimesheetRef

Company context is part of record identity and authorization. Depending on the API, it can be supplied by the authenticated session rather than by a writable companyId field. Preserve empty lot, split, sub, revision, and method components according to the connector's normalization rules.

MetadataMeaning and limits
createdAtWhen the stored record was created. This is not automatically the ERP transaction date.
updatedAtWhen the record was updated. Import cursors and ERP change-tracking fields have their own contracts.
syncedAtSync metadata exposed on labor-ticket and SDK Timesheet records. Interpret it with the connector's sync path; it is not proof that the ERP has posted a transaction.
machineRef, machineGroupIdMachineMetrics references exposed on some resource or labor records. They are distinct from an ERP resourceId; availability depends on the entity and API.

The Person-to-operator link is configured through ERP Data Studio → Persons. Resource and reason mappings link different records and should be checked separately.

Custom Fields​

Supported ERP entities can carry schema-bound extension data in addition to their standard fields.

FieldTypeMeaning
customFieldsobject or nullCustom values attached to this record.
customFieldsSchemaRefreference or nullReference to the custom-fields schema associated with those values.

ERP Data Studio displays these values in a read-only Custom fields section on entity detail pages. Where configured, the labor-ticket edit form also offers editable custom fields based on their schema. This does not make every entity's custom JSON or schema editable; use the fields offered by the record's form.

The SDK's full-payload helpers distinguish omission from an explicit null: undefined fields are omitted, while null values can be included. Its REST serializers and entity-specific paths can handle custom data differently. Use the helper and endpoint contract for the installed SDK rather than replacing omitted data with an empty object or null.

For flattened work order imports, the current SDK separates values for the four entities created from a row:

EntityValues propertySchema-reference property
PartpartCustomFieldspartCustomFieldsSchemaRef
Part OperationpartOperationCustomFieldspartOperationCustomFieldsSchemaRef
Work OrderworkOrderCustomFieldsworkOrderCustomFieldsSchemaRef
Work Order OperationopCustomFieldsopCustomFieldsSchemaRef

Keep shared Part and Part Operation data consistent across rows that refer to the same identity. Put order-specific values on the order or order operation.

Load Sequence​

Load referenced records before the records that depend on them. The exact import calls and batching depend on the connector and API.

  1. Resources, Reasons, and Persons: Establish lookup records first. If importing resource-group membership, create both the group and its member Resources before their relationship.
  2. Parts and Part Operations: Create the Part before its routing steps. Keep the full part identity consistent across rows.
  3. Work Orders and Work Order Operations: Create the parent order and the referenced routing data before its operations. Flattened SDK imports can build these related entities from the same rows.
  4. Transactions and relationships: Load labor tickets after their referenced people, resources, orders, and operations. Associate reasons only after the ticket and reason exist. A Timesheet references a Person and does not require a job operation.

Use the SDK's entity-specific or flattened import methods for the installed version. Do not assume that one call imports every relationship or that labor-ticket support also imports Timesheets.


Enumerations​

The current SDK documents the following known values. Work order and operation statuses are string fields; the SDK's status types also accept strings outside these lists. A connector must map ERP states to the intended MachineMetrics workflow rather than assuming an unrecognized value behaves like a known one.

RecordKnown values in the SDK
Work OrderRELEASED, NOT RELEASED, COMPLETED, PENDING, CANCELLED, ACTIVE, DELETED
Work Order OperationRELEASED, NOT RELEASED, ACTIVE, COMPLETED, CANCELLED, DELETED
Labor Ticket typeThe send/receive models use strings; documented workflows use SETUP, PRODUCTION, and INDIRECT.
Labor Ticket stateThe receive model describes OPEN, CLOSED, and CANCELLED; the field is a string, not a universal two-value enum.

The SDK's comparison helper normalizes case and spacing and treats CANCELED as CANCELLED. Use the intended canonical value when mapping an ERP state. An ERP's closed order/operation state should map to COMPLETED, not an invented order status of CLOSED. This distinction does not change the CLOSED labor-ticket state.

Implementation Notes​

Use the tables above for field requirements rather than maintaining a second list of the same rules.

  • Keep datetime values in ISO 8601 format, with an explicit UTC or local offset. Date values can use YYYY-MM-DD.
  • Every operation must reference its parent work order, with a sequence number that identifies the operation within that order.
  • Resources and people referenced by labor tickets must exist before those tickets are loaded.
  • A SETUP or PRODUCTION ticket references a work order, operation, resource, and person.
  • Keep employee active flags current to avoid assigning labor to inactive people.
  • Match scrap reason identifiers and codes to the ERP's reason records when reporting bad parts.

Follow Load Sequence when implementing the import. Confirm any ERP-specific extraction format with your implementation team; the record relationships must be preserved regardless of transport.