Skip to content
Enjoy complimentary data migration when switching from your existing bookkeeper or CPA to Institution.

Bookkeeping & finance

Keep customer IDs intact when exporting accounting data

Prevent lost zeros, rounded references and accidental customer merges when a spreadsheet sits between your accounting systems.

By Institution5 minute readPublished View sources
In this guide

An identifier should survive the trip unchanged

A customer code that looks like a number can still be a name for a record. Adding it, rounding it or shortening it changes which record the code identifies. Before opening an accounting export in a spreadsheet, mark customer numbers, invoice references, order references and external transaction IDs as text fields. Keep the numerical amount columns separate. The goal is to preserve the exact identity used by the source system throughout the export, review and import process.

Microsoft documents that Excel can remove leading zeros, convert long numerical strings and apply other automatic conversions. Its guidance explains how to import affected columns as text. That behavior creates a practical migration risk: two distinct customer codes can become the same visible value before anyone touches the balances. A polished worksheet with matching totals does not show that the customer relationships survived. Checking identifiers requires a separate test from checking money.

References: Microsoft: Keeping leading zeros and large numbers

Separate identity from the label people recognize

Ask the source-system owner which field is the permanent customer identifier. A customer name, invoice display number and database ID may all be different. Store them in separate columns with explicit headings. If the company has several source accounts, retain the account identifier too. An external customer ID may be unique only inside one account. Your working key then needs both parts, even if the customer-facing number is identical across two businesses.

For an illustrative customer file, consider the codes 000742 and 742. If both exist, converting them to the number 742 creates a collision. Padding every value to six digits afterward would make both records 000742. That would produce a tidy column while destroying the distinction. A similar problem arises when long references differ only in their final digits. Never infer the original identifier from the damaged value unless the source owner supplies a verified, unambiguous rule.

Document allowed changes before applying them. Trimming trailing spaces can be reasonable for a display label but dangerous for an externally assigned key if its specification treats spaces as significant. Lowercasing an email address also does not make it a dependable customer identity. Customers can share billing inboxes, change addresses or use several accounts. Keep any normalized matching field alongside the untouched source identifier so reviewers can see what the transformation did.

Consider the destination's rules before shortening a key to make it fit. If its identifier field allows fewer characters than the source uses, retain the complete original in an approved external-reference field and create a documented target identifier. Verify that the original remains searchable and exportable. A hidden note that only one administrator can see will not help the collections team resolve a payment. Check uniqueness after any conversion, including punctuation removal, and make the crosswalk available to the people who need to trace the record without exposing unrelated customer information.

Build a test file that can reveal damage

Select a small, approved test population before the full transfer. Include a leading-zero code, a long numerical string, a code containing a letter E, a value containing a hyphen and a pair of similar identifiers. Use fabricated identifiers when testing in a demonstration environment. In a controlled production rehearsal, use the real records permitted for that purpose. The test should exercise actual formats, not expose unnecessary customer details or include secret authentication data.

Record the exact source strings, then import them with explicit text types. Inspect the stored values after the spreadsheet step and again after the target-system import. A custom display format is insufficient evidence because a cell can display extra zeros while storing a different underlying value. Export the target records back out and compare those identifiers with the source strings. This final comparison tests the round trip rather than one application's appearance.

Count distinct keys before and after every transformation. If the source has 500 distinct customer keys and the target has 499, investigate the collision even if all invoices still appear somewhere. Also compare the number of invoices attached to each customer and the open balance by customer. A merge can preserve the overall receivable balance while assigning one company's invoices to another company's account, which is a serious collection and privacy problem.

Repair from source evidence

When an export is already damaged, quarantine that copy and return to the untouched source file or generate a fresh export. Preserve enough information about the failed attempt to identify records it created or changed. Do not overwrite the only available version while experimenting. If the source no longer exists, the work becomes a reconstruction exercise requiring an authorized owner to resolve uncertain matches. Unresolved identity should remain visible as an exception.

Create a correction crosswalk with the source account, original identifier, damaged identifier, target identifier and resolution. For each collision, identify all dependent records: invoices, payments, credits, subscriptions, contacts and attachments. Correcting the customer list alone can leave transactions attached to the wrong customer. Test the target platform's supported correction procedure on a limited set before applying it broadly, and involve the accounting owner wherever customer balances or posted entries would change.

Accept relationships as well as totals

The final acceptance record should show that every expected source key maps to one intended target key, with approved exceptions listed individually. Where a deliberate consolidation combines several source customers, record the commercial reason and the person who approved it. Exclude those deliberate changes from the accidental-collision count without hiding them. Compare customer-level balances, transaction counts and a selection of underlying documents after the import finishes.

Keep the import mapping and test identifiers with the recurring procedure. Repeat the small round-trip test after a spreadsheet version, export format or import configuration changes. Give the next operator an observable acceptance condition: exact identifier preservation and correctly attached transactions. A file that merely opens without an error is still awaiting that check. Release it for billing or collection only after the identity exceptions have an owner and a documented disposition.

Sources

Requirements and product details can change. Check the linked guidance for the facts that apply to your situation.

Related reading

Need help with this work?

General information, not personalized accounting, tax, legal, or investment advice. Have the appropriate qualified professional review decisions that depend on your circumstances.