How-toIgnition (Inductive Automation) with any ERPIgnition / Production reporting to ERP

How to integrate Ignition with your ERP

Question
how to integrate Ignition with ERP

Also searched as

  • Ignition SCADA to ERP integration
  • Ignition send production counts to ERP database
  • Ignition MES work order download from ERP
  • Ignition Transaction Groups ERP staging table

Short answer

Do not let Ignition write straight into ERP tables. Put a staging layer between them: Ignition writes production events to a staging table or calls an ERP API through a gateway script, and a controlled poster validates and posts them to the ERP. Pull work orders the other way with a scheduled gateway script or Named Query against a read-only view or API.

Applies to: Ignition 8.1 and 8.3 gateways with Perspective or Vision, SQL Bridge (Transaction Groups) and Web Dev modules; any ERP that exposes a database view, REST, SOAP or file interface.

Build a safe Ignition to ERP integration

  1. 1Decide direction and ownership first: the ERP owns work orders, routings, items and BOMs; Ignition owns machine states, counts, cycle times and operator inputs. Write that down per data element.
  2. 2Create a dedicated database connection in the Ignition Gateway (Config, Databases, Connections) pointing at a staging schema, not the ERP production schema.
  3. 3Create a staging table such as mes_event with a GUID event_id, work_order, operation, event_type, qty_good, qty_scrap, reason_code, event_ts, status and error_text columns.
  4. 4Write events from Ignition with a Named Query (system.db.runNamedQuery) or a Transaction Group, with a unique event_id so a retry cannot double-post.
  5. 5Pull open work orders into a local cache table on a gateway timer script, reading from an ERP view or REST endpoint through a read-only account.
  6. 6Run a poster outside Ignition (ERP API call, stored procedure, or integration platform) that reads status = 'NEW' rows, posts them, and marks them 'POSTED' or 'ERROR' with the message.
  7. 7Add a Perspective or Vision screen for supervisors showing ERROR rows with a retry button, so failures are visible and not buried in a log.
  8. 8Test the failure cases: ERP down, work order closed, quantity over-report, duplicate event, and gateway restart in the middle of a post.

Why a staging table beats a direct write

A direct insert from Ignition into ERP tables bypasses the ERP's business logic: costing, inventory transactions, lot and serial control and period checks. Even when it appears to work, you end up with transactions the ERP cannot explain, and a vendor upgrade can change the schema under you. Support teams for most ERPs will not support direct table writes.

A staging table gives you three things. It decouples uptime: if the ERP is down for maintenance, plant-floor events queue instead of being lost. It gives you an audit trail of what the floor reported versus what the ERP accepted. And it gives you one place to apply validation rules such as maximum quantity per event or required reason codes.

The poster can be anything that speaks to the ERP properly: the vendor's API, a documented import program, a message queue, or an integration platform. The point is that the ERP's own posting logic runs, not that you picked a specific tool.

Ignition-side mechanics

Use Named Queries for anything a script or screen calls, because they are parameterised, centrally managed and avoid SQL string building. In scripts you call system.db.runNamedQuery with a path and a parameter dictionary. Transaction Groups from the SQL Bridge module are good for simple tag-to-table logging on a schedule or on trigger, such as writing a cycle record when a part-complete tag goes true.

For REST-style ERPs, gateway scripts can call out with system.net.httpClient (8.1 and later) or the older system.net.httpPost. Keep credentials in a secure place such as Gateway tag providers or secrets management, never hard-coded in a script. Run calls from a gateway timer or tag-change script, not from a client session, so an operator closing a browser cannot interrupt a post.

If you expose Ignition data to the ERP instead, the Web Dev module lets the gateway serve endpoints, but a staging table the ERP side reads is usually simpler to secure and monitor.

# Gateway script: queue a production event with an idempotent key
import uuid
params = {'eid': str(uuid.uuid4()), 'wo': wo, 'op': op, 'good': good, 'scrap': scrap, 'ts': system.date.now()}
system.db.runNamedQuery('MES/insertProductionEvent', params)
-- Staging table (SQL Server flavour)
CREATE TABLE mes_event (
  event_id UNIQUEIDENTIFIER PRIMARY KEY,
  work_order NVARCHAR(30) NOT NULL,
  operation INT NOT NULL,
  event_type NVARCHAR(20) NOT NULL,
  qty_good DECIMAL(18,4) NULL,
  qty_scrap DECIMAL(18,4) NULL,
  reason_code NVARCHAR(20) NULL,
  event_ts DATETIME2 NOT NULL,
  status NVARCHAR(10) NOT NULL DEFAULT 'NEW',
  error_text NVARCHAR(500) NULL
);

Pulling work orders and master data

The cleanest pattern is a read-only database view in the ERP, or a read API, exposing only what the floor needs: work order number, item, description, quantity ordered, quantity completed, current operation, work center, planned dates and status. A gateway timer script copies this to a local table every minute or so, and Perspective screens read the local copy, so screens stay fast even if the ERP is slow.

Do not copy the whole routing and BOM unless you need them on screen. Smaller data means fewer sync bugs. Always carry a last-updated timestamp so you can detect a work order that was released, changed or closed in the ERP after the operator loaded it.

If the ERP is on-premises behind a firewall and Ignition is on a plant network, place the staging database in the DMZ or on the ERP side and let both systems connect outbound to it, rather than opening plant network ports inbound.

Error handling and reconciliation

The most common production failures are not network failures. They are business rejections: the work order was closed, the operation was already completed in the ERP, the lot number is missing, or the quantity would exceed the order. Your poster must write the ERP's message back to error_text so a supervisor can fix the cause.

Build a daily reconciliation: for each work order and operation, compare the sum of POSTED good quantity in staging against the ERP's reported completed quantity. Differences point to manual ERP adjustments or lost events and should be reviewed, not silently corrected.

Keep time handling explicit. Store event timestamps in UTC and convert at the edges, since plant, gateway and ERP clocks and time zones often differ and daylight saving changes cause duplicate or missing hours in shift reports.

Common pitfalls

  • !Writing directly into ERP tables from Ignition, which skips costing, inventory and audit logic and can break on upgrade.
  • !Posting without a unique event ID, so a gateway retry or restart double-counts production.
  • !Running ERP calls inside client or Perspective session scope, so closing a browser aborts the transaction.
  • !Hard-coding ERP credentials in scripts, or using an ERP admin account for the integration.
  • !Using one huge polling query against the ERP every few seconds instead of a cached read-only view on a sensible interval.
  • !Having no reconciliation, so drift between floor quantities and ERP quantities is found at month-end.

How an ERP-grounded AI assistant handles this

An assistant grounded in your ERP and staging database can answer the questions supervisors actually ask: which production events failed to post today and why, which work orders have floor counts that do not match ERP completions, and what changed in the ERP after a job was loaded on the floor. With a tool like ERPray it runs read-only against the ERP and staging schema, shows the query it used, and respects ERP roles. It does not post transactions on its own; any correction still goes through your normal poster or a human approval.

Frequently asked questions

Does Ignition have a native ERP connector?

Ignition is a platform, not an ERP product, so integration is built with its database connections, Named Queries, Transaction Groups, gateway scripts and modules. Some ERP vendors and integrators publish Ignition-based accelerators, but in most plants you build the interface yourself or with a partner. Check with your ERP vendor for supported interfaces before designing.

Should Ignition or the ERP be the system of record for production quantities?

The ERP is normally the financial system of record, because inventory and cost depend on it. Ignition is the source of the raw events. Treat staging as the buffer: floor events are captured there, validated, and posted into the ERP, and reconciliation proves they agree.

Can I use MQTT instead of SQL for this?

Yes, MQTT with a broker is a valid transport, often used with Sparkplug B for tag data. For ERP posting you still need a consumer that validates and calls the ERP API. SQL staging is simpler to audit for many plants, while MQTT suits multi-site and event-driven designs.

How often should Ignition poll the ERP for work orders?

Every one to five minutes is typical for released work orders, using a read-only view or API. Poll more often only for specific high-priority screens. Frequent heavy queries against the ERP can hurt user performance, so cache locally and keep the query narrow.

Related

How-to

How to Send Production and Labor Reporting from MES to ERP

Treat the ERP work order as the system of record for cost and quantity, and the MES as the system of record for what physically happened. Send one confirmation message per operation (or per shift or lot) containing work order, operation sequence, good quantity, scrap quantity with reason, and labor start/stop per employee and work center, post it through the ERP's supported transaction API, and make the message idempotent so a retry never double-posts.

Advanced

How to Connect OPC UA Machine Data to Your ERP

Do not connect OPC UA servers straight to the ERP. Read machine tags through an edge gateway or MES, convert signals into business events (cycle complete, stop, state change, count), attach the work order context, and post summarised confirmations to the ERP through its supported API. The ERP wants quantities, times and reasons per order, not millions of raw tag values.

Advanced

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

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.

How-to

How to Design Scrap and Downtime Reason Codes for MES and ERP

Keep one governed list of reason codes with a small hierarchy, owned in a single system and synchronised to the other. Separate scrap reasons from downtime reasons, mark each downtime code planned or unplanned and each scrap code as process, material, design or operator related, and map codes to ERP accounts or cost categories where accounting needs them. Fewer, clearer codes beat long lists nobody uses correctly.

How-to

How to Calculate OEE from MES Data and ERP Standards

OEE equals Availability times Performance times Quality. Availability comes from MES run and stop events against planned production time, Performance compares actual output to the ideal cycle time (usually the routing standard from the ERP), and Quality is good units divided by total units. The numbers are only trustworthy if planned time, ideal cycle time and the good/scrap split are defined once and used consistently.

How-to

How to Sync an NCR From Your QMS to ERP Quarantine and MRB Disposition

The reliable pattern is two events: when the NCR opens, the ERP moves or flags the affected lot or serial into a non-nettable quarantine status; when the Material Review Board closes it, the disposition (use as is, rework, repair, scrap, return to vendor) triggers exactly one matching ERP transaction. The NCR number is the key that ties both sides together.

AI for ERP

AI for Infor SyteLine and CloudSuite Industrial

Add grounded AI to Infor SyteLine or CloudSuite Industrial: natural-language answers, agents over IDOs and ION, on-prem or CloudSuite deployment.

AI for ERP

AI Agents for SAP Production Planning, MRP, and Exception Triage

AI agents that triage SAP MD04 exceptions, explain predictive MRP shortages, and draft planned-order actions, grounded on your own SAP data, deployed on-prem.

Stuck on Ignition (Inductive Automation) with any ERP?

Talk to engineers who work inside Ignition (Inductive Automation) with any ERP every week, and who build private AI that answers these questions from your own ERP data.