Prepare and map legacy data ​

Exports from an old accounting system rarely match ERPNext. Before you import, clean the data and map each old value (customer, account, tax code, currency) to its ERPNext value. This prevents duplicates and makes validation easier than fixing submitted documents later.

Prerequisites ​

1. Keep the source files ​

Create a dated migration folder for:

  • the original exports, never edited;
  • the cleaned working files;
  • the approved import files;
  • the ERPNext import results;
  • the reconciliation files and sign-off.

Record the source system, report name, filters, company, currency, period, export time, and owner of each export.

2. Clean the records ​

In a working copy, standardize:

  • names, capitals, and spaces;
  • dates as YYYY-MM-DD;
  • decimal and thousands separators;
  • currency codes, tax IDs, countries, states, and postal codes;
  • units of measure;
  • empty and zero values;
  • debit and credit signs.

Remove inactive records that you will not migrate. Merge duplicate parties only after you decide which record stays and how their balances combine.

3. Build the mapping tables ​

Create one mapping for each controlled field, with columns such as Legacy Type, Legacy ID, Legacy Name, ERPNext Type, ERPNext Name, Action, and Notes. Use actions such as Import, Merge, Rename, and Do not migrate.

Legacy valueERPNext valueAction
Sales - DevicesProduct Sales - NETMap
Cust-00482Northstar RetailMerge and map
WH-AMain Warehouse - NETMap

Add a check column that flags every value without a mapping. Do not use formulas that return an empty value silently.

4. Map the chart of accounts ​

For each old account, record the ERPNext account, parent group, root type, group or ledger, account type, currency, whether it is a control account, the opening method, and whether you disable it after migration. Keep tax, bank, receivable, payable, stock, fixed asset, depreciation, and equity accounts separate when reports need them.

5. Prepare the open invoices ​

One row for each open invoice or credit note: party, invoice number, posting date, due date, outstanding amount, receivable or payable account, cost center, and old reference. Do not include paid invoices. See Import open invoices.

6. Prepare the opening Trial Balance ​

Start from the final Trial Balance. Add columns for the ERPNext account, debit, credit, import method, document reference, imported amount, difference, and reviewer note.

Give each line one method: Invoice, Payment/Advance, Bank/Cash, Stock, Asset, or Opening Journal Entry. A balance must appear in one method only.

7. Prepare stock and assets ​

  • Stock: Item, warehouse, quantity, valuation rate, and value. Reconcile quantity and value separately.
  • Assets: category, name, purchase date, available-for-use date, gross cost, accumulated depreciation, net book value, useful life, remaining periods, location, custodian, and finance book.

8. Check before you import ​

  • Every parent record exists.
  • Every link uses the exact ERPNext name.
  • Every date is in a fiscal year of the company.
  • Debits equal credits.
  • Open invoice totals match the ageing reports.
  • Quantity times rate equals the stock value.
  • Cost minus accumulated depreciation equals the net book value of each asset.
  • No account uses two import methods.
  • Foreign-currency totals agree in both currencies.