🏆
Global Scientific Platform
Serving Researchers Since 2012

Migrating Decades of Legacy Data into a Modern ERP: A Consultant’s Playbook

DOI : 10.5281/zenodo.24784483
Download Full-Text PDF Cite this Publication

Text Only Version

Migrating Decades of Legacy Data into a Modern ERP: A Consultant’s Playbook

Insiya Maryam , Syeda Zoya , Raju Kumar Allam , Neha Kauser

Falcon Informatics

Moving decades of data from an old ERP, CRM, POS or sales system into a new platform works when you treat it as an audit project first and an IT project second. Every figure that lands in the new system has to trace back to its source, reconcile to the penny, and stand up in front of a tax inspector years from now.

In almost every new ERP engagement, the client asks the same thing in the first workshop: "We have data going back to the year 2010. Can we bring it all across?" Usually that history is split across a retired accounting package, two generations of POS terminals, a sales database someone built in-house, and spreadsheets that filled the gaps. It is still needed because auditors, tax authorities, banks and the board keep asking about it.

This article sets out the method we use on real engagements: how to decide what to migrate, how to move it without corrupting the target database, how to prove the migrated data is authentic (fixed asset rules included), and how to make the history useful once it is in the new system.

DECIDE WHAT TO MIGRATE BEFORE YOU DECIDE HOW

Not every record from the past two decades belongs in the live ERP. The first deliverable is a data tiering decision, signed off by Finance, the auditors and the business owners. It drives cost, timeline and risk more than any tool choice does.

Tier

What it holds

Where it lands

Typical scope

1. Live operational

Open AR/AP, open POs and SOs, stock on hand, active customers, vendors and items, fixed asset register

New ERP, fully transactional

Current state as of cutover

2. Recent history

Posted transactions at full detail

New ERP, as historical postings

Last 2 to 3 fiscal years

3. Statutory history

GL balances by period, invoices, POS receipts, VAT/GST working, asset ledgers

Read-only archive database, linked to the ERP for drill- down

Everything inside the legal retention window

4. Reference only

Retired items, inactive customers, system logs

Cold storage export with checksums

Beyond retention, kept by policy

The legal retention window sets the floor for Tier 3, and it is often longer than people expect, especially for fixed assets:

Jurisdiction

Record type

Minimum retention

USA (IRS)

Income tax records

Generally 3 years; 7 years for bad debt or worthless securities claims

USA (IRS)

Employment tax records

At least 4 years after the tax is due or paid

USA (IRS)

Property records

Until the limitation period ends for the year the property is disposed of

UK (HMRC)

Company records for tax

6 years from the end of the last financial year they relate to; longer for multi-year transactions

UK (Companies Act 2006 s.388)

Accounting records

3 years for a private company, 6 years for a public company

KSA (ZATCA VAT)

General invoices, books and records

6 years from the end of the tax period

KSA (ZATCA VAT)

Movable capital assets

About 11 years from acquisition (6-year adjustment period + 5)

KSA (ZATCA VAT)

Immovable capital assets (real estate)

About 15 years from acquisition (10-year adjustment period + 5)

UAE (FTA, VAT)

VAT records and tax invoices

5 years after the end of the tax period

UAE (FTA, Corporate Tax)

Corporate tax records

7 years after the end of the tax period

UAE (FTA, VAT)

Real estate records

15 years after the end of the tax period

Canada (CRA)

Business records

6 years from the end of the last tax year they relate to

Canada (CRA)

Long-term property acquisitions and disposals

Indefinitely

Australia (ATO)

Tax records

5 years in most cases

Australia (ASIC)

Company records

7 years

Bahrain (NBR, VAT)

VAT records and accounting books

10 years (extended from 5 years in February 2024)

Bahrain (NBR, VAT)

Real estate records

15 years after the end of the VAT period

India (CGST Act s.35, Rule 56(20))

GST books and records

72 months from the annual return due date; longer if a proceeding is open

India (Income Tax Rules, Rule 6F(5))

Books and supporting documents

6 years from the end of the assessment year

India (Companies Act s.128(5))

Books of account

8 financial years preceding the current year

For the business, this is the migration horizon. Ordinary tax books in most countries only reach back to about 20192021, so older sales and POS detail can move to the archive. Real estate and capital-asset records in the Gulf, and long-term property in Canada, keep almost the full 20102026 history in scope.

Sources for the drug-authority rules: USA 21 CFR 211.180, FDA DSCSA; UK GMP Directive 2017/1572, Article 9; KSA SFDA joins PIC/S; Canada Food and Drug Regulations C.02.021; Australia TGA: PIC/S Guide to GMP; India Revised Schedule M summary. The PIC/S and EU GMP guides are kept harmonised (PIC/S). No published period was found for the UAE (EDE) or Bahrain (NHRA); confirm with the authority. ZATCA Phase 2 ZATCA: Phase 2 Integration launch, ZATCA: Phase 2 requirements, Sovos: Phase 2 developments, Qoyod: Phase 2 technical checklist, Wafeq: Phase 2 changes.

Sources: USA IRS: How long should I keep records?; UK GOV.UK company and accounting records, Companies Act 2006 s.388; KSA Expandway ZATCA audit checklist; UAE Meydan Free Zone record- keeping rules; Canada CRA: how long to keep records; Australia ATO: records you need to keep; Bahrain Baker McKenzie on the NBR extension, Tally Bahrain VAT records; India Legal Suvidha retention guide. Always confirm with the client's tax advisor; these rules change.

The asset rule matters most here. A building bought in 2012 can still need its acquisition and adjustment records in 2027. So asset history is a case where you migrate everything back to 2010, even if sales history beyond six years goes to cold storage.

PHASE 1: DISCOVERY AND SOURCE ASSESSMENT

You cannot migrate what you have not measured. Discovery produces a source inventory and a data profile for every system, and it usually reveals that the data is in worse shape than anyone thinks.

Build the source inventory. For each legacy system, recor:

  • System name, vendor and version, and the years it was in use (for example, "Tally 20102016, then a custom SQL Server ERP 20162026")

  • Database engine and export options: native SQL access, flat-file exports, or only printed reports

  • Business owner and a technical contact who still remembers how it worked

  • Modules in use: GL, AR, AP, inventory, fixed assets, payroll, POS

  • Known gaps, such as months lost in a server crash or a branch that ran on spreadsheets

    Profile the data, do not eyeball it. Run automated profiling on every table that matters: row counts per year, null rates per column, distinct values, duplicate keys, date ranges, and min/max amounts. Profiling a 16-year sales table in a day tells you more than a month of interviews.

    Expect the usual legacy quirks:

  • System changes mid-history: two or three ERPs across 16 years, each with its own codes

  • Dates stored as text, in mixed formats, or in the Hijri calendar in one system and Gregorian in another

  • Arabic and English names in non-Unicode encodings that turn into question marks on export

  • POS data held per terminal or per branch, sometimes only as daily Z-report totals

  • Tax rules that changed during the period, such as Saudi VAT starting on 1 January 2018 and the rate rising from 5% to 15% in July 2020, or India's move to GST in July 2017

  • Hard deletes, back-dated edits, and "adjustment" entries without explanation

Freeze and preserve the source. Before any transformation, take a full, read-only snapshot of each legacy database and compute a hash (for example SHA-256) of every export file. That snapshot is your evidence of what the data looked like on day zero. Auditors will ask for it.

PHASE 2: MAPPING, CLEANSING AND TRANSFORMATION

Master data goes first, because every transaction points at it. A sales invoice from 2013 cannot load until its customer, item, tax code, branch and GL account exist in the new system.

  1. Map the chart of accounts. This is the most important mapping document in the project. Build a crosswalk from every legacy account (across every legacy system) to the new chart of accounts. Each row records legacy system, legacy account, valid-from and valid-to dates, new account, and the rule used. Where one old account splits into several new ones, write the split rule down. Finance signs off this document line by line.

  2. Map the rest of the master data. Customers, vendors, items, warehouses, branches, cost centres, tax codes, payment terms and currencies all need their own crosswalk. Keep the legacy code on every new record (see the clean-database section below).

  3. Cleanse at the source copy, not in the target. Typical rules:

    • Deduplicate customers and vendors on tax registration number (VAT number, GSTIN), then on normalised name plus phone. Merge, but keep a merge log of every legacy ID that now points to the surviving record.

    • Standardise units of measure and item codes that changed over the years.

    • Convert all dates to ISO format in one calendar, and keep the original value in an audit column.

    • Fix encodings so Arabic and other non-Latin text loads as proper UTF-8.

    • Flag, do not "fix", anything that changes a financial amount. Amount corrections go through Finance as journal entries with a reason.

  4. Transform with history in mind. Historical transactions must keep the rules that applied on their date. A 2016 invoice in Saudi Arabia carries no VAT; a 2019 invoice carries 5%; a 2021 invoice carries 15%. Map each one to a historical tax code in the new system, never to today's default. The same applies to exchange rates: keep the original transaction currency, the rate used at the time, and the functional-currency amount. Do not revalue history at today's rate.

  5. Document every rule. Each transformation rule gets an ID, a description, an owner and a test case. When an auditor asks in 2029 why account 4100 in the old system became 41020 in the new one, the answer is in the rule register, not in someone's memory.

PHASE 3: MIGRATION ARCHITECTURE AND EXECUTION

Never move data straight from the old database into the new ERP. Every record goes through a staging layer where it is cleansed, mapped and checked, and nothing that fails a check reaches the target.

Failed records go to an exceptions table and are fixed in the source copy, then rerun. Records that pass load through the ERP's own import tools, and the result is reconciled before anything is signed off.

Architecture. Use three separate stores: the frozen legacy snapshot (read-only), a staging database where all transformation happens, and the target ERP. Build the pipeline as code (SQL scripts, Python, or an ETL tool such as SSIS, Azure Data Factory or Talend), under version control, so every run is repeatable.

Load order. Dependencies decide the sequence:

  1. Configuration: companies, branches, fiscal calendar, currencies, tax codes, chart of accounts

  2. Master data: customers, vendors, items, warehouses, employees, asset categories

  3. Fixed asset register with full acquisition and depreciation history

  4. Historical transactions, oldest year first, closing each period as you go

  5. Opening balances and open items at cutover: AR, AP, stock, open orders

Mock runs. Plan at least three full rehearsals on a copy of the target environment. Mock 1 finds the mapping errors. Mock 2 proves the reconciliation. Mock 3 is a timed dress rehearsal of the real cutover, so you know exactly how long the business must stop trading.

Cutover. Freeze postings in the legacy systems, take the final delta extract, run the proven pipeline, reconcile, and get sign-off before the new system opens for business. Keep a rollback plan until sign-off is done.

BACKUPS AND VERSION CONTROL

One copy of migrated data is no copy. After go-live the legacy source and the migrated result are both audit evidence, so they are kept in several places and every run is versioned.

Keep multiple copies after migration. Follow the 3-2-1 rule: at least three copies of the frozen legacy snapshot and of the final migrated dataset, on two different types of storage, with one copy off-site or in a separate cloud account. Make the copies read-only or immutable, record their hashes, and test a restore at least once. Keep them for the longest retention period that applies to you in the table above.

Version every run. Every extract and load gets a version number: mock 1, mock 2, mock 3 and the production run. Keep the pipeline code in version control, and tag each run with the exact code version it used. Each run produces a manifest that shows exactly how much data was pulled and what happened to it:

Manifest field

What it records

Run version and date

Which run this is (mock 1, 2, 3 or production) and when it ran

Source snapshot and hash

The legacy snapshot the run read from, and its checksum

Code version

The version-control tag of the scripts used

Records pulled

Row counts per table ad per year, as extracted

Data volume

Size of the extract (rows and GB)

Records loaded and rejected

Counts per table, with the exceptions file

Sign-off

Who approved the run and when

Comparing manifests run to run shows the business how much data moved, how the rejection rate fell between mocks, and that the production run used exactly the code and source that were tested.

PHASE 4: VERIFICATION AND AUTHENTICATION

A migration is finished when you can prove, with evidence, that the new system says exactly what the old one said. "It loaded without errors" proves nothing. Verification runs at four levels, and each one is signed off.

Level 1: Record counts. For each entity and each fiscal period, the number of records extracted, transformed, loaded and rejected must balance. Extracted = loaded + rejected, with every rejection explained.

Level 2: Control totals. Compare sums, not just counts: total invoice value per month, total VAT/GST per tax period, total quantity per item per year, total receipts per POS terminal per day. Totals are compared old vs new for every period from 2010 to cutover.

Level 3: Financial reconciliation. This is the test auditors care about:

  • Trial balance per period: the opening balance, period movement and closing balance of every account match the legacy system after the chart-of-accounts mapping

  • Subledger to GL: AR aging, AP aging, inventory valuation and the fixed asset register each tie to their control accounts

  • Tax returns: the VAT/GST computed from migrated data for each filed period matches the return actually filed with the authority

Level 4: Sample-based tracing. Pick a statistical sample of documents (invoices, credit notes, GRNs, asset purchases) and trace each one, field by field, from the legacy screen or report to the new system. Do it in both directions: legacy to new proves completeness, new to legacy proves nothing was invented.

Fixed asset rules

Fixed assets need their own validation, because the numbers are derived and long-lived. For every asset, check:

  • Identity: asset tag, description, category, location and custodian carried over; the legacy asset ID is stored on the record

  • Acquisition: original cost, acquisition date, capitalisation date and vendor invoice reference match the legacy register

  • The core equation: cost accumulated depreciation accumulated impairment = net book value,

    for every asset at cutover

  • Depreciation method and life: the method (straight-line, reducing balance), useful life, residual value and remaining life match the legacy setup, or any change is a documented, Finance-approved policy change

  • Recalculation test: the new system recalculates depreciation from acquisition to cutover for a sample of assets; the result must match the legacy accumulated depreciation within an agreed rounding tolerance

  • Movements: additions, disposals, transfers between branches, revaluations and impairments for each year are present, and the year-end register rolls forward: opening NBV + additions disposals depreciation ± revaluation = closing NBV

  • Tax view: where the tax books differ from the accounting books, both depreciation books are migrated and both reconcile

  • Disposed assets: fully depreciated and disposed assets are migrated too, because the capital-asset retention rules can reach back more than a decade

Proving authenticity

Reconciliation shows the numbers match; authenticity shows nobody changed them along the way. Use these controls:

  • Hash each extract file at the source and again before load; any mismatch stops the run

  • Compute a row-level hash over the key financial fields of every historical record and store it alongside the record, so later tampering is detectable

  • Lock all migrated historical periods in the new ERP so no one can post to them

  • Keep a complete migration log: who ran which job, when, against which source snapshot, with what result

  • Collect formal sign-off from Finance, the business owners and, ideally, the external auditor on the reconciliation pack

TRACEABILITY AND RETURNS

A migration can balance to the penny and still break traceability. If a product recall, supplier dispute or customer return cannot be followed across the cutover date, the old system has not really been replaced. These five areas need their own mapping and their own tests.

Batch traceability when the ERP changes

Batch and lot numbers are the thread that ties a supplier's delivery to the customer who bought the goods. When the ERP changes, that thread must not break at the cutover date.

  • Keep the original batch number. Load the legacy batch or lot number exactly as it was. If the new system needs a different format, store the legacy number in a dedicated field and link the two one-to-one.

  • Carry the batch attributes. Manufacturing date, expiry date, supplier lot number, quality status, certificate of analysis and the goods receipt (GRN) it came in on.

  • Migrate the genealogy. For manufacturers, keep the parent-child links: which raw-material batches went into which finished-goods batch.

  • Reconcile stock by batch. Quantity on hand per batch and per warehouse at cutover must equal the legacy figure. A total that matches while individual batches do not is a failed test.

  • Run a mock recall. Pick a supplier lot received before cutover. Trace it forward to every customer who received it, using only the new system. Then pick a customer invoice and trace it back to the supplier lot.

Regulated products raise the bar. In the US pharma supply chain, for example, trading partners must keep lot-level transaction information for at least six years (FDA, DSCSA).

Vendor and supplier traceability

Auditors and tax authorities follow the purchase chain: purchase order, goods receipt, supplier invoice, payment. Every link must survive the migration.

  • Migrate the full document chain and keep the links, not just open payables

  • Keep the supplier's tax registration number on each historical invoice as it was on that date, since input tax claims depend on it

  • Keep the history of supplier master changes (name, address, bank account) with dates and approvers; a changed bank account is a classic fraud signal auditors check

  • When duplicate suppliers are merged, keep a merge log so every old supplier ID still resolves to the surviving record

  • Carry the approved-supplier status and certificates by period, so you can prove a supplier was approved on the date you bought from them

HEALTH INFORMATION TRACEABILITY

Health data appears in ERPs more often than people expect: clinic or pharmacy modules, employee medical records, insurance claims and patient-linked sales. It needs stricter handling than any other data in the migration.

  • Know which law applies. Health records follow their own rules, separate from tax rules. In the US, HIPAA documentation must be kept for 6 years (45 CFR 164.316), while medical records follow stae law.

  • Migrate the access trail, not just the records. Keep the audit log of who created, viewed or changed each record. Without it, the new system cannot answer "who saw this patient's data in 2019?"

  • Never use real health data in mock runs. Mask or pseudonymise it in staging and test environments. Load real data only in the final, controlled production run.

  • Encrypt and restrict. Encrypt extracts in transit and at rest, limit the migration team's access, and keep the data in the jurisdiction the law requires.

  • Keep consent records with the data. Patient consent and its date must travel with each record.

    Sales returns

    Returns are where migrations break most visibly, because a customer can return in 2027 something bought in 2025 from the old system.

  • Link every return to its original invoice. Migrate the links between credit notes, return orders and the sales invoices they reverse.

  • Make legacy invoices returnable. Make sure historical invoices and their legacy numbers can be found in the new ERP, so a post-cutover return can reference them.

  • Reverse tax at the original rate. A return of a 2019 Saudi sale reverses 5% VAT, not today's 15%. The credit note must use the historical tax code.

  • Track the batch and the stock outcome. Record which batch came back and whether it was restocked, quarantined or scrapped.

  • Include POS returns. Store-level refunds and exchanges are often recorded only at terminal level; bring them into the same structure.

  • Test it: for every period, gross sales minus returns equals net sales in the legacy reports, and no invoice line shows more quantity returned than sold.

Purchase returns

Purchase returns mirror sales returns on the supplier side, with input tax at stake.

  • Link each debit note or return-to-vendor document to its purchase order, goods receipt and supplier lot

  • Reverse input tax at the rate and period of the original purchase

  • Keep the reason code (quality rejection, short shipment, wrong item), because repeated quality rejections feed supplier evaluation

  • Migrate open returns at cutover (goods sent back, credit not yet received) as open items, so they are not lost between the two systems

  • Test it: for every period, net purchases and input tax match the legacy figures and the tax returns that were filed

KEEPING THE TARGET DATABASE CLEAN

The new ERP's database should look as if the history had been entered through the application from day one: no orphans, no duplicates, and no mystery records. These practices make sure of that:

  • Load through the front door. Use the ERP's own import APIs, data entities or staging tables (for example the data management framework in Dynamics 365, or the import tools in SAP, Odoo or Oracle). They apply the application's validation. Direct SQL inserts into production tables bypass business rules and are the most common cause of a messy database.

  • Enforce referential integrity before load. In the staging database, every foreign key (customer, item, account, tax code) must resolve before a record moves on. Records that fail go to an exceptions table with a reason code; they are never loaded "to fix later".

  • Carry the legacy key on every record. Store the source system and original ID (for example LEGACY_SRC = 'POS_V2', LEGACY_ID = 'INV-2013-004512') in a dedicated field. This gives you one-click traceability for auditors and makes reruns idempotent: a reload updates the same record instead of creating a duplicate.

  • Use unique constraints on natural keys. Document number plus series plus fiscal year, and tax registration number on customers and vendors, so duplicates are rejected by the database, not discovered in a report.

  • Separate history from operations. Tag migrated transactions with a migration batch ID and post them to locked periods. Keep Tier 3 history in a read-only archive schema rather than inflating the live transaction tables.

  • Never migrate system noise. Leave out user session logs, temporary tables, abandoned drafts and test companies.

  • Run the clean-up checks after every mock load: orphan counts, duplicate counts, unbalanced journal entries (debits credits) and records with null mandatory fields. All of them must be zero before go-live.

PHASE 5: ENHANCEMENT AND VISUALIZATION

Once the data is verified and locked, 16 years of history become a strategic asset instead of a compliance burden. Enhancement happens only after sign-off, and never by changing the migrated records themselves.

Enhance in a separate analytical layer. Build a reporting model (a data warehouse or a lakehouse) on top of the ERP and the archive. Enrich there, not in the ledger:

  • Conform dimensions across the old systems so "Customer", "Product" and "Branch" mean the same thing from 2010 to today

  • Add derived attributes: customer lifetime value, product category hierarchies, regional groupings

  • Build a common calendar with both fiscal and Gregorian (and Hijri, where needed) periods

  • Restate history on a like-for-like basis for analysis, for example net-of-tax revenue, while keeping the statutory figures untouched

    Dashboards that pay back the migration. The ones clients use most:

  • Long-run revenue and margin trends by year, branch and product line, 2010 to date

  • Customer cohorts and retention: who bought in 2012 and still buys today

  • Seasonality across 16 years, such as Ramadan, Diwali or year-end peaks

  • Fixed asset age profile, NBV by category and replacement forecasting

  • Tax compliance views: VAT/GST by period with drill-down to invoice

  • Data quality scorecard: exceptions resolved, records per source, reconciliation status

    Let the visuals double as a final check. A 16-year trend chart is a powerful validation tool. A sudden drop to zero in March 2014, or a spike that is exactly ten times the average, usually points to a missing branch or a decimal-place error that slipped past the totals.

    COMMON PITFALLS AND A GO-LIVE CHECKLIST

    Most failed migrations fail for the same handful of reasons:

    Pitfall

    What happens

    Prevention

    Treating it as a one-off script

    The final run behaves differently from the tests

    Repeatable, versioned pipeline with at least three mock runs

    Migrating "everything"

    Slow system, bloated database, cost overrun

    Tiering decision signed off in week one

    Fixing amounts silently during cleansing

    Figures no longer tie to filed returns

    Amount changes only through approved journals

    Applying today's tax codes to old invoices

    VAT/GST history is misstated

    Date-effective historical tax codes

    Loading opening balances only for assets

    Depreciation history ad disposal trail are lost

    Migrate the full asset ledger back to acquisition

    Business users not involved

    Nobody signs off; disputes after go-live

    Named data owners per entity, sign-off per mock run

    Decommissioning the old system too early

    No way to answer an auditor's question

    Keep the legacy system read-only until the archive is accepted

    Go-live checklist

  • Data tiering and retention scope signed off by Finance and the tax advisor

  • Source snapshots taken and hashed

  • Chart of accounts and master data crosswalks approved

  • Transformation rule register complete, each rule with a test case

  • Three mock runs completed, with timings recorded

  • Record counts and control totals balanced for every period

  • Trial balance, subledgers and tax returns reconciled for every period

  • Fixed asset register rolls forward and NBV ties to the GL

  • Stock by batch reconciled and a mock recall traced forward and back across the cutover

  • Purchase chain (PO, GRN, invoice, payment) and supplier master history linked and complete

  • Sales and purchase returns linked to original documents, with tax reversed at historical rates

  • Health data masked in test runs, with access logs and consent records migrated

  • Orphan, duplicate and unbalanced-entry checks all at zero

  • Historical periods locked; migration log archived

  • Reconciliation pack signed by Finance, business owners and auditor

  • Legacy system set to read-only, with a decommissioning date agreed

CONCLUSION

A successful legacy migration ends with a reconciliation pack, not a status update. Scope the history by legal retention and business value. Move it through a repeatable, staged pipeline. Prove it with counts, totals, trial balances and fixed asset roll-forwards. Then lock it and build analytics on top.

Done this way, 15 years of scattered legacy data stops being a risk. It becomes an audit-ready, single source of truth, and a long-run view of the business that most competitors do not have.