Numeric Zero External ID Lost During Contact Import
Level 1 · node · Data · Falsy identifier handling error
Scenario
A CRM contact import job stores the provider externalId unchanged as the synchronization key for each internal contact. String IDs and positive integer IDs work correctly, but operations reports that one record whose provider uses the valid numeric value 0 loses its synchronization key and is duplicated on the next import. The importer, mapper, and repository are separated.
Requirements
- Preserve a string externalId exactly as provided - Preserve a positive integer externalId exactly as provided - Preserve the valid numeric value 0 as externalId - Store null only when externalId is null or undefined - Preserve the imported contact name and email unchanged
Acceptance criteria
- A string externalId is stored unchanged
- A positive integer externalId is stored unchanged
- A numeric zero externalId remains zero instead of becoming null
- A record without externalId is stored with a null identifier
- The name and email fields remain unchanged regardless of identifier handling