# Automate legacy on-premise ERP workflows safely without a three-year rip-and-replace migration.

> Canonical URL: https://verksmid.com/solutions/legacy-erp-email-automation
> Category: Core Systems, ERP, CRM, TMS & WMS Integrations
> Provider: Verksmid (https://verksmid.com) | Contact: hello@verksmid.com
> Last Updated: 2026-11-26

## Executive Summary

Verksmid automates high-volume order intake, AP matching, and shared-inbox workflows around IBM i (AS/400), Classic NAV, Sage on-premise, and custom SQL or Progress ERPs without a multi-year replatform. Agents run on-premise or in an isolated EU VPC, reading read-only database views and writing strictly to safe staging tables or SFTP/XML batch queues with 100% client ownership and zero green-screen scraping.

## Key Specifications

- **SUPPORTED LEGACY STACKS:** IBM i (AS/400), Custom SQL/Oracle, Progress & Old NAV
- **SAFE INTEGRATION BOUNDARY:** Read-Only Views + Staging Tables / SFTP XML & CSV
- **FIRST WORKING PROTOTYPE:** 10 business days (offline exports first)
- **OWNERSHIP AT HANDOVER:** 100% on-prem/VPC code & migration-ready adapters

## 1. Why you do not need to wait three years for an ERP migration to stop manual bleed.

Hundreds of profitable €15M to €200M+ European industrial manufacturers, logistics operators, and regional wholesalers still run their core warehouse and ledger on battle-tested IBM i (AS/400), bespoke SQL Server or Oracle ERPs, Progress OpenEdge, or 15-year-old Navision instances. Those systems process transactions reliably at zero monthly SaaS cost, yet every incoming email, PDF order, supplier confirmation, and vendor invoice has to be keyed manually because the ERP has no modern REST API.

Consultancies tell executives the same expensive story: spend €1.5M and 30 months migrating to a cloud ERP before automating anything. Meanwhile, experienced operators who carry 20 years of cryptic ERP codes and customer workarounds in their heads are approaching retirement, and brittle 5250 green-screen RPA bots break whenever an error popup appears on screen.

### 01. High-volume inbox work stays trapped behind a 24-month ERP roadmap

Operations teams burn 40 to 100+ hours every week re-keying emailed orders, carrier bills, and vendor invoices into legacy terminals while waiting for a multi-year ERP replatform to even start. **Waiting for a future ERP migration guarantees two more years of avoidable cash bleed.**

### 02. Green-screen 5250 and UI RPA bots shatter on unexpected terminal prompts

Legacy screen-scraping RPA scripts that simulate keystrokes across AS/400 emulators or Delphi forms freeze whenever a credit popup, low-stock warning, or subfile pagination shifts by one line. **Simulating keystrokes on legacy UIs creates permanent IT babysitting overhead.**

### 03. Irreplaceable tribal knowledge walks out the door when veteran clerks retire

Old ERPs rely on cryptic 2-character depot codes, undocumented price classes, and manual workarounds that live solely inside the heads of veteran staff nearing retirement. **Unautomated legacy workflows create severe operational key-person risk.**

### 04. Direct writes to legacy ERP tables risk corrupting accounting and triggers

No responsible IT Director will allow an external tool to execute raw SQL INSERTs into core AS/400 DB2 or custom ERP tables, bypassing RPG business logic and database integrity checks. **Safe legacy automation must respect strict staging and batch-import boundaries.**

## 2. Green-screen RPA & rip-and-replace vs. Verksmid safe legacy ERP bridges.

We capture immediate operational ROI around your current on-premise ERP using battle-tested staging interfaces, while keeping your automation portable when you eventually migrate.

| Operational Dimension | Manual Coordination Today | With Verksmid Production Agent |
| --- | --- | --- |
| Legacy ERP integration mechanism | Fragile 5250/Citrix UI screen scraping simulating keystrokes, or risky direct SQL writes into core transactional tables. | Zero UI scraping; uses read-only database views/snapshots plus clean staging tables or atomic SFTP XML/CSV/fixed-width drops consumed by native import jobs. |
| Character encoding & fixed-width safety | UTF-8 umlauts, accents, or overlong customer addresses silently truncate or crash nightly IBM i / RPG batch imports. | Deterministic serializer enforces exact field lengths, EBCDIC / ISO-8859-1 / Windows-1252 transliteration, and strict header/footer checksums. |
| Tribal knowledge & cryptic code mapping | Only two veteran clerks know which 3-digit customer price group, depot code, or freight flag applies to each regional buyer. | Institutional rules are extracted, tested across 50 to 200 historical orders, and codified transparently in version-controlled deterministic business code. |
| Network security & on-premise residency | SaaS cloud tools demand opening risky inbound firewall holes into legacy internal servers. | Deploys on-premise inside your own Docker/Linux host or isolated EU VPC over outbound-only VPN with zero inbound exposure to your ERP. |
| Future ERP migration portability | Legacy RPA scripts and custom RPG/stored-procedure patches become throwaway sunk cost the day you migrate to SAP, D365, or Odoo. | Modular sink-adapter design means extraction, business rules, and eval suites survive untouched; migration only swaps the final ERP output adapter. |
| Time to measurable EUR payback | 24 to 36 months and €1M+ in ERP replatforming before removing a single manual clerk hour. | Working prototype tested on real historical exports in 10 business days, funding your future modernization from immediate savings. |

## 3. Legacy ERP architecture: read-only views and atomic staging queues.

We never touch core ERP tables directly or scrape terminal screens. Every validated transaction crosses an auditable staging boundary owned by your existing native ERP import routines.

### Layer 01 (INTAKE & EXTRACTION): Shared Inbox, PDF, Fax & Spreadsheet Normalization

Ingests customer purchase orders, supplier invoices, delivery notes, and carrier confirmations from Exchange, shared folders, or scan queues into strict normalized schemas.

- Handles legacy European B2B realities: scanned faxes, multi-page PDF tables, Excel schedules, and multilingual email chains.
- Maps messy buyer part descriptions to legacy 8-to-15 character ERP item codes via verified cross-reference tables.
- Tags every extracted field with source page coordinates and original email hash for rapid operator review.

### Layer 02 (DETERMINISTIC RULES (CODE)): Codified Legacy Business Logic & Format Validation

Queries replicated read-only SQL/DB2 views (zero production lock contention) and executes all validation, arithmetic, and legacy formatting rules in deterministic code.

- Validates item status, warehouse stock, customer credit holds, unit prices, VAT codes, and 3-way PO/receipt tolerances in code.
- Enforces legacy schema constraints: exact fixed-width byte lengths, mandatory padded zeros, EBCDIC/Latin-1 safe characters, and sequence counters.
- Quarantines any invalid record individually so one bad line can never abort an entire nightly batch file.

### Layer 03 (LIVE SYSTEM WIRING): Safe Staging Tables, SFTP Drops & Native Import Jobs

Delivers verified payloads strictly into dedicated staging tables or atomic file-drop directories consumed by your ERP's existing RPG, COBOL, PL/SQL, or SSIS import programs.

- IBM i (AS/400): DB2 staging tables via ODBC/JDBC or atomic IFS SFTP drops processed by native CPYFRMIMPF / RPG validation jobs.
- Custom SQL Server / Oracle / Progress ERPs: dedicated IMPORT_STAGE tables or existing XML/EDI batch import folders using atomic .tmp-to-.ready renames.
- Strict idempotency checks against historical staging logs and open ERP tables prevent duplicate batch imports completely.

### Layer 04 (ESCALATION & AUDIT TRAIL): Operator Triage Queue, Batch Monitoring & On-Prem Control

Clean 75% to 85% volume stages automatically before nightly or hourly batch cutoffs; exceptions and batch-import rejection logs route straight to named operators with actionable briefs.

- Monitors native ERP batch return logs automatically, surfacing any ERP-side rejection code in plain English instead of silent log folders.
- Stores immutable audit logs linking source PDF, staged file/row ID, and resulting ERP order or voucher number.
- Deployable 100% on-premise inside your own EU datacenter or private VPC aligned with strict IT security policies.

### The 7 Production Engineering Standards Applied

01. **Deterministic code separated from AI reasoning:** All legacy code lookups, fixed-width formatting, character-encoding conversions, arithmetic sums, and tolerance rules run strictly in deterministic code.
02. **Verified against 50 to 200 real historical cases:** Prototype outputs are verified field by field against 50 to 200 historical source PDFs and the exact resulting records inside your legacy ERP.
03. **Explicit confidence & escalation thresholds:** Unknown SKUs, blocked customer accounts, overlong addresses, or price variances escalate immediately to veteran operators before touching any staging table.
04. **Source citations & complete activity logs:** Every staged row or XML/CSV batch file carries a full correlation ID linking back to the raw email, PDF line coordinates, and approval event.
05. **Strict read & write permission boundaries:** Database credentials hold SELECT-only rights on dedicated read views plus INSERT-only rights on isolated staging tables; core ERP tables are strictly off-limits.
06. **Shadow mode on live volume before cutover:** Generates staging payloads in parallel for 3 to 5 live business days so IT and operations compare every byte against manual entries before enabling live batch pickup.
07. **100% internal ownership at handover:** Your IT team receives full source code, Docker/on-prem deployment configs, automated evals, and migration-ready adapter architecture with zero vendor lock-in.

## 4. Six legacy on-premise ERP edge cases engineered out by deterministic guardrails.

Legacy ERPs are unforgiving about character sets, batch windows, and undocumented triggers. Here is how our architecture keeps production completely safe.

### Edge Case 01: Customer name contains German umlauts, Polish diacritics, or special symbols that crash an EBCDIC / AS/400 import
- **Why generic AI wrappers break:** Standard UTF-8 JSON outputs inject invalid byte sequences into fixed-width files, causing nightly RPG batch jobs to abend.
- **Deterministic guardrail fix:** Deterministic encoding gate transliterates unsupported characters cleanly per your ERP code page (e.g., CCSID 273/1141 or Windows-1252) and validates exact byte lengths before file write.

### Edge Case 02: One malformed order inside a 40-order batch drop rolls back the entire nightly ERP import
- **Why generic AI wrappers break:** Unvalidated batch assemblers bundle unverified records together, delaying 39 valid warehouse shipments until the next morning.
- **Deterministic guardrail fix:** Per-record pre-flight validation checks every foreign key, mandatory flag, and sum against live read views beforehand, quarantining individual exceptions while clean orders flow uninterrupted.

### Edge Case 03: Nightly RPG or SQL batch job reads a drop folder while a large CSV/XML file is still half-written
- **Why generic AI wrappers break:** Direct file writes cause race conditions, partial line imports, and corrupted order headers.
- **Deterministic guardrail fix:** Connector writes completely to a temporary filename (.tmp), validates checksum/byte count, and performs an atomic rename (.ready) strictly outside ERP maintenance lock windows.

### Edge Case 04: Legacy ERP relies on undocumented tribal rules (e.g., specific customers always ship from Depot 02 unless pallet weight > 800 kg)
- **Why generic AI wrappers break:** Generic AI tools miss unwritten exceptions, producing orders that veteran clerks have to manually fix anyway.
- **Deterministic guardrail fix:** Days 1 to 3 shadowing explicitly captures retiring staff heuristics, validates them across 50 to 200 historical orders, and encodes them transparently as testable Python rules.

### Edge Case 05: External read queries cause table locks on a 20-year-old SQL Server or DB2 database during peak shipping
- **Why generic AI wrappers break:** Naive live queries run full table scans on order-history tables, slowing down warehouse barcode scanners.
- **Deterministic guardrail fix:** All reads target indexed read-only views, NOLOCK/uncommitted-read safe snapshots, or lightweight periodic read replicas so production ERP latency stays completely untouched.

### Edge Case 06: Management plans to migrate from AS/400 or custom SQL to SAP S/4HANA or Dynamics 365 in 18 to 24 months
- **Why generic AI wrappers break:** Teams hesitate to automate today for fear of throwing the entire investment away during migration.
- **Deterministic guardrail fix:** Strict adapter separation isolates the legacy staging writer cleanly; when the new ERP goes live, your team swaps only the final sink module while keeping all extraction, business rules, and evals.

## 5. Worked EUR payback math: automating one inbox desk around a legacy ERP.

Automating high-volume order or invoice intake around an existing AS/400 or custom SQL ERP typically recovers over €100,000/year immediately, long before any replatform project finishes.

**Scenario:** Illustrative €42M European specialist manufacturer/distributor on IBM i (AS/400) or custom SQL ERP · 4 operations & order-desk clerks

| Step | Formula | Worked Example |
| --- | --- | --- |
| 1. Weekly Hours in Manual Legacy-ERP Inbox Entry | Staff count x hours/week on manual ERP entry | 4 staff x 17 hrs/week = 68 hrs/week |
| 2. Annual Hours Burned | Weekly hours x 48 working weeks | 68 x 48 weeks = 3,264 hrs/year |
| 3. Fully-Loaded Hourly Cost | Annual salary x 1.25 / 2,000 | €56,000 x 1.25 / 2,000 = €35.00 / hour |
| 4. Direct Annual Cash Bleed | Annual hours x hourly cost | €114,240 / year burned on manual legacy-ERP inbox entry |

**The Hidden Legacy Multiplier: De-Risking Retirements & Self-Funding Modernization:** Beyond €114,240/year in direct clerical relief, codifying institutional ERP rules eliminates key-person risk as veteran operators retire, removes recurring RPA license fees, and generates €200,000+ in cumulative operational savings over 24 months while giving IT breathing room to plan any future ERP migration calmly.

- **Under €40,000/yr (Skip custom AI):** Simplify the SOP or use off-the-shelf software.
- **€40,000 to €120,000/yr (Strong candidate):** Tightly scoped single-workflow production agent.
- **€120,000+/yr (Immediate P&L priority):** High monthly payroll bleed plus turnaround/margin loss.

## 6. AI Implementation + Industry Expertise

Production AI engineering, paired with real industry expertise from Day 1. Verksmid owns the full AI implementation from workflow design, AI agent engineering, deterministic guardrails, and live ERP/CRM integration to rollout and team handover. Either your internal operational lead (~3 hours in Week 1) or a vetted industry specialist from our network provides the industry-specific know-how under one accountable team.

## 7. How we prove a legacy ERP agent prototype in 14 days with zero IT risk.

Our fixed-fee 10-Day Production AI Blueprint validates extraction, tribal rules, and exact staging file formatting using offline read-only exports first.

- **DAYS 1-3 (SHADOW & DATA) | Shadow Veteran Operators & Capture ERP Export Samples:** Spend ~3 hours watching experienced clerks process live emails into your legacy ERP. Export 50 to 100 historical source PDFs plus matching ERP order/invoice tables and existing import file specs.
- **DAYS 4-7 (BUILD & GUARD) | Build Extraction + Deterministic Staging Validator:** Engineer parsing, codified tribal business rules, character-encoding checks, and exact staging-table or XML/CSV formatting, verifying every single field against historical records.
- **DAYS 8-10 (VERIFY ROI) | Review Byte-Exact Staging Outputs & Payback Case:** Inspect staged files and edge cases with your IT manager and ops lead, confirm read-only view and staging-table boundaries, and lock the verified 12-month EUR payback model.
- **DAYS 11-14 (SHADOW RUN) | Run Shadow Mode Against Live Inbox & Test Staging Queue:** Process live incoming documents into a non-production test drop folder or staging table for 3 to 5 days so IT verifies native batch import pickup before Stage 02 cutover.

**Week 1 client inputs (~3 hours total):**
- One 60-minute walkthrough with your senior order/AP desk operator plus 30 minutes with your IT / legacy ERP lead.
- Read-only export of 50 to 100 historical source PDFs/emails, matching ERP records, and your existing batch import schema (or staging spec).
- One 60-minute Day 10 review to verify byte-exact staging fidelity, security architecture, and 12-month payback math.

**Weeks 3 to 8 (Production & Handover):** In Weeks 3 to 6 (Stage 02), we deploy the hardened runtime inside your on-premise server or isolated EU VPC, wire read-only DB views and atomic staging/SFTP queues, and validate hundreds of real edge cases including encoding and batch cutoffs. In Weeks 7 to 8 (Stage 03), we train operators and IT owners and transfer 100% of code and documentation.

**Stage 01 Guarantee:** Working prototype on real company data and verified 12-month payback case in 10 business days, or pay €0. 100% of Blueprint fee credits toward Stage 02; full ownership of deliverables if stopping at Day 10.

## 8. When NOT to automate around a legacy on-premise ERP.

We give you a clear engineering verdict within 24 hours whenever waiting or fixing the core is wiser.

- **Your new cloud ERP goes live within the next 90 days:** If cutover to SAP, Dynamics, or Odoo is already weeks away, wire the agent straight to the new ERP API rather than building a temporary legacy staging sink.
- **Your legacy ERP has zero batch import, staging table, or API capability and IT forbids adding one:** We refuse to build fragile green-screen keystroke scrapers; if no safe staging boundary can be created, automation waits until one exists.
- **Manual inbox workload around the legacy system is under €40,000/year:** Reserve custom production builds for workflows where direct labor relief and risk reduction pay back clearly inside 12 months.
- **You want AI to rewrite 30-year-old RPG or COBOL core accounting logic:** We automate operational workflows cleanly around legacy cores; core ERP code refactoring is a separate systems-engineering program.

## 9. Frequently Asked Questions

### Do you use green-screen 5250 or UI screen scraping to connect to IBM i / AS/400 or old SQL ERPs?

No. Screen scraping breaks constantly on terminal popups and pagination shifts. We integrate strictly via clean data boundaries: read-only SQL/DB2 views or snapshots for lookups, paired with dedicated staging tables or atomic SFTP XML/CSV/fixed-width drops consumed by your ERP's existing native validation and import jobs.

### What if our legacy ERP has no existing import program for orders or invoices?

Nearly every AS/400, SQL, or Progress ERP already has either an EDI import directory, a CSV batch loader, or a clean staging table pattern your internal IT or ERP vendor can point to in a few hours. During Stage 01, we inspect your exact setup and specify the minimal safe staging interface before any build begins.

### Can the entire system run on-premise or without exposing our legacy server to the internet?

Yes. The orchestration engine, deterministic validation code, and audit database deploy cleanly inside your on-premise Linux/Docker infrastructure or an isolated EU VPC using outbound-only encrypted connections, keeping your legacy ERP completely air-gapped from inbound internet traffic.

### How do you capture unwritten rules that only our longest-serving operators know?

During Days 1 to 3, our engineers shadow your veteran clerks directly on live orders and invoices, then run our prototype across 50 to 200 historical transactions. Every discrepancy between the agent and historical human entries exposes an unwritten rule, which we verify with your team and codify transparently in version-controlled code.

### Will this investment be wasted if we replace our legacy ERP in two years?

No. Because our architecture separates intake, AI extraction, deterministic business rules, and evaluation tests from the final ERP output adapter, migrating to SAP, Dynamics 365, NetSuite, or Odoo later requires swapping only the final connector adapter while preserving 85%+ of your codebase.

### Does our internal IT team own everything once deployed?

Yes. At Week 8 handover, your company owns 100% of the source code, database view queries, staging serializers, automated historical evaluation suites, and plain-English runbooks with zero recurring license or consultancy lock-in.

## Next Step

Automate around your legacy ERP now instead of waiting three years to replatform. Request a free 1-page custom solution brief and The Production AI Ops Playbook (PDF) at https://verksmid.com/contact (no sales call required, senior engineer reply within 1 business day).
