Blog

Preserve leading zero IDs in a CRM migration

Keep IDs such as 00123 intact during a CRM migration. Check the CSV in your browser and make sure the import treats IDs as text.

Rachel BennettTools and utilities 4 min read

Customer IDs like 00123 can turn into 123 during a CRM migration. The number may look the same to a person, but it can stop matching records in the new system.

Check the source file and the CRM import preview separately. The CSV Editor lets you open and inspect a CSV in your browser, so you can confirm what is actually in the file before importing it.

Check the IDs before importing

  1. Make a copy of the original CSV first. Work with the copy so you can return to the untouched source if anything changes.
  2. Open the copy in the CSV Editor. Find the column containing your CRM IDs, such as CustomerID, AccountNumber or ExternalID.
  3. Inspect several IDs that should start with zero. Check the beginning, middle and end of the file if possible, and note the exact values, including how many zeros each one has.
  4. If a value is already missing zeros, compare it with a trusted source before editing. The shortened value does not tell you how many zeros were removed.
  5. Import the copy into the CRM using the importer's field mapping, then check the preview for the same sample IDs before confirming the migration.

For example, a source value of 000731 should still appear as 000731 in the import preview and in the CRM record. A preview showing 731 means the problem is not fixed yet.

What the result means

The CSV and import preview both show the zeros

The file contains the expected IDs and the importer appears to preserve them. After the import, open a few records in the CRM and compare the saved IDs with your notes. A correct preview is useful, but checking the final records confirms the result.

The CSV has the zeros, but the preview removes them

The source file is likely fine. The CRM importer is interpreting the ID as a number instead of an identifier. Change the field mapping or import option so the destination field is handled as text, sometimes labeled string, rather than a numeric field.

The zeros are already missing from the CSV

The value was changed before the CRM import, often when another program opened or saved the file. Restore the original IDs from a trusted export or source system. Do not guess the number of zeros from the shortened value. For more background, see why leading zeros disappear from CSV data.

The preview looks right, but records do not match after import

Check whether the CRM matched records using the intended ID column. A different field, a duplicate ID or an unexpected space can lead to a wrong match even when the zeros remain. Pause before importing the full file again, because a second import can create duplicates or overwrite data.

How to fix leading zero IDs

  1. Keep an untouched backup. Save the original export separately from the file you plan to import. If the CRM import changes values or matches the wrong records, the original gives you a reliable reference.
  2. Check the raw values in the CSV. Open the working copy in the CSV Editor and inspect the ID column. A CSV stores values as text, but programs that open or import it may guess that digit-only IDs are numbers.
  3. Restore only verified values. If zeros are missing, use a trusted source to confirm the complete ID before editing the cell. Do not add a fixed number of zeros to every value unless the source system confirms that all IDs have the same required length.
  4. Map the CRM field as text. In the CRM's import field mapping, choose a text or string field for identifiers. If the existing destination field is numeric, use a text field or ask the CRM administrator how to import these IDs without numeric conversion.
  5. Check the import preview. Test a small sample containing IDs with leading zeros, IDs without leading zeros and any unusually long IDs. Compare every preview value with the source before starting the full migration.
  6. Verify records after the import. Search for several known IDs in the CRM and confirm the saved value exactly matches the source. Also check that each record linked to the intended customer.

If you correct values in the CSV Editor, download the edited file using its export option and inspect the downloaded copy before importing it. Keep the original unchanged. The CSV Editor can help you inspect and edit the file, but the CRM's field type and import rules determine how values are stored after import.

Why adding quotation marks may not solve it

A CSV field such as "00123" is still a sequence of characters in the file. Quotation marks identify a CSV field, but they do not guarantee that an importer will treat the contents as text. An importer can still convert the value to the number 123 unless its mapping or destination field preserves it as text.

IDs are labels, not quantities. You do not add or subtract them, so storing them as numbers offers no useful benefit and can remove meaningful characters. Leave the identifier as text from the source export through the CRM import, and compare a small test batch before moving the full customer list.

The CSV Editor processes the file in your browser, and the file stays on your device.