Skip to main content

ERP Integration Methods


Connect your Enterprise Resource Planning (ERP) system to MachineMetrics to synchronize work orders, operations, and production data between your business systems and the shop floor.

SectionDescription
OverviewHow MachineMetrics ERP integration works
Method 1: Auto ImporterScheduled CSV-based imports
Method 2: REST APIReal-time bidirectional sync via API
Method 3: Pre-Built ERP ConnectorsTurnkey integrations for popular ERP systems
Method 4: Custom Connector DevelopmentBuild and deploy your own connector with the SDK and mmdev
ERP Data StudioView, validate, and troubleshoot ERP data
Data Flow Best PracticesInbound and outbound data recommendations

Overview​

MachineMetrics integrates with ERP systems to enable:

  • Work Order Synchronization: Import jobs, operations, and routings from your ERP
  • Production Data Export: Send completed parts, cycle times, and labor data back to your ERP
  • Real-Time Visibility: Track job progress against ERP-planned quantities
  • Automated Updates: Eliminate manual data entry with automatic syncing

Supported Integration Methods​

MethodBest ForComplexity
Auto ImporterScheduled CSV-based importsLow
REST APIReal-time bidirectional syncMedium
ERP ConnectorsPre-built integrations (contact Sales)Low
Custom ConnectorSDK + mmdev scaffold and deployHigh

Getting Started​

These prerequisites apply to the CSV and API methods below. For pre-built connectors, use Setup and Verification.

Prerequisites​

Before setting up an ERP integration:

  1. MachineMetrics Account: Manager or Executive level permissions required
  2. API Key: Generated from Settings → API Keys with appropriate scopes
  3. ERP Export Capability: Your ERP must be able to export data as CSV or connect via API
  4. Network Access: The system running the integration must reach api.machinemetrics.com (or api.machinemetrics-us-gov.com for GovCloud)

API Endpoints​

EnvironmentAPI URL
Standardhttps://api.machinemetrics.com
GovCloudhttps://api.machinemetrics-us-gov.com

Method 1: Auto Importer (CSV-Based)​

The Auto Importer is the simplest way to sync operations data from your ERP. It monitors a folder for CSV files and automatically uploads them to MachineMetrics.

How It Works​

┌─────────────┐     ┌──────────────────┐     ┌────────────────────┐
│ Your ERP │────▶│ Monitored │────▶│ MachineMetrics │
│ System │ │ Folder (CSV) │ │ Cloud │
└─────────────┘ └──────────────────┘ └────────────────────┘
▲
│
Auto Importer
(watches folder)

Setup Instructions​

Step 1: Prepare Your Folder Structure​

  1. Create a new folder for your operations data (e.g., C:\MachineMetrics\Imports)
  2. Inside that folder, create a subfolder named operations

Step 2: Generate an API Key​

  1. Navigate to Settings → API Keys in MachineMetrics
  2. Click Create API Key
  3. Select the following scopes:
    • ERP (required)
    • Reporting (required)
  4. Click Save Changes
  5. Copy and securely store your API key: it will only be shown once

Step 3: Install the Auto Importer​

  1. Download the Auto Importer executable
  2. Run mm-auto-importer.exe
  3. Enter the path to your monitored folder (e.g., C:\MachineMetrics\Imports)
  4. Paste your API key when prompted
  5. Choose an installation directory
  6. Recommended: Check "Launch on startup" to ensure continuous operation
  7. Click Install, then Finish

Step 4: Configure Your ERP Export​

Set up your ERP to export operations data as CSV files to your monitored folder. Files must follow the MachineMetrics Operations CSV format.

Required CSV columns:

  • PartNumber
  • OperationNumber
  • WorkcenterName (must match machine name in MachineMetrics)
  • ExpectedParts
  • ExpectedCycleTime (seconds)

Optional columns:

  • WorkOrderNumber
  • DueDate
  • SetupTime
  • Description

Step 5: Verify Operation​

  1. A command prompt window should display "watching path" followed by your folder
  2. Place a test CSV in your monitored folder
  3. The file will be renamed with .done suffix once successfully uploaded
  4. Check MachineMetrics to confirm the operations appear

Important: Do not close the command prompt window; the Auto Importer stops if the window is closed. Use Windows Task Scheduler for persistent operation (see below).

For servers or workstations that restart:

  1. Open Task Scheduler from the Start Menu
  2. Click Create Basic Task
  3. Name it "MachineMetrics Importer"
  4. Select trigger: When the computer starts
  5. Select action: Start a program
  6. Configure:
    • Program/script: Path to file-uploader.exe
    • Arguments: -p C:\Your\Folder\Path -t Your-Api-Key
  7. Click Finish

Troubleshooting Auto Importer​

IssueSolution
Authentication errorsVerify API key has ERP and Reporting scopes
No data appearingCheck CSV format matches MachineMetrics requirements
Files not processedConfirm folder path is correct in importer config
Importer stops runningSet up as Windows Scheduled Task

Method 2: REST API Integration​

For real-time, bidirectional integration, use the MachineMetrics REST API.

API Authentication​

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Common API Endpoints​

EndpointMethodPurpose
/reports/productionPOSTRetrieve production metrics
/operationsGET/POSTManage operations
/jobsGET/POSTManage work orders
/machinesGETList machines

Example: Retrieve Production Data​

curl -X POST "https://api.machinemetrics.com/reports/production" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"start": "2024-01-01T00:00:00Z",
"end": "2024-01-31T23:59:59Z",
"data": [
{"metric": "totalParts"},
{"metric": "goodParts"},
{"metric": "rejectedParts"},
{"metric": "timeInCycle"}
],
"groupBy": [
{"group": "machine"},
{"group": "day"}
],
"flatten": true
}'

API Key Scopes​

When creating an API key, select scopes based on your integration needs:

ScopePermissions
erpRead and write access for ERP integration
reportingRead access to reportable data
managerFull control of manager-level functionality
manager.readRead-only access to system settings, jobs, users
operator.jobsJob control and access to job lists

Developer Resources​

For complete API documentation, visit: developers.machinemetrics.com


Method 3: Pre-Built ERP Connectors​

MachineMetrics offers pre-built connectors for popular ERP systems. These connectors provide turnkey integration with minimal configuration.

Available Connectors​

Use the ERP Connectors overview for supported systems and setup guides, including Dynamics 365 Finance & Operations, Business Central, NetSuite, Infor LN, Epicor Kinetic, and other ERPs. Confirm requirements with your SDM.

Requesting a Connector​

Contact your SDM to confirm the connector, ERP version, and deployment requirements. Follow Setup and Verification and the ERP-specific guide. Enter credentials directly in Edge Services; do not share them with MachineMetrics staff.


Method 4: Custom Connector Development​

When no pre-built connector matches your ERP or integration requirements, you can build and deploy your own connector using the @machinemetrics/mm-erp-sdk and the MachineMetrics mmdev CLI.

This path is for developers and implementation teams who will:

  1. Scaffold a project from the generic-erp-connector template (mmdev create).
  2. Implement using CONNECTOR-GUIDE.md and SDK reference docs shipped with your project.
  3. Deploy on infrastructure you control; run the connector on a laptop, VM, or server you operate.

→ Creating Your Own Connector: full guide on the developer site

→ ERP Connector Data Mapping Specification: field-level reference for every entity your connector must supply

Developer tools: mmdev CLI · ERP Connectors overview


ERP Data Studio​

Use ERP Data Studio to inspect imported records and map ERP employees to MachineMetrics operators. In versions with the current role rules, Admin, Manager, Executive, and IT Admin users can add and edit general records. Other users have read-only access. Labor tickets have an additional permission check. See ERP Data Studio permissions for deletion permissions, labor-ticket rules, and deployed-version checks. Machine-to-resource mappings are configured in MES Settings.

Data Flow Best Practices​

For pre-built connectors, follow Concepts and Data Flow and your connector guide. The recommendations below describe file and API integration patterns.

Inbound (ERP → MachineMetrics)​

  • Sync Frequency: Daily or per-shift for batch operations; real-time for active job tracking
  • Data Validation: Ensure workcenter names in your ERP match machine names in MachineMetrics exactly
  • Unique Identifiers: Use consistent part numbers and operation numbers across systems

Outbound (MachineMetrics → ERP)​

  • Production Counts: Use the API to pull good parts, rejected parts, and cycle times
  • Labor Data: Retrieve operator run data for labor ticket updates
  • Downtime: Export categorized downtime for root cause analysis in your ERP


Getting Help​