I am importing CSV file from another database that includes an email and a numeric ID field. NationBuilder requires a unique id field but I can't actually choose which it should be using. How does NationBuilder decide?
There are various unique identifiers that can be used for profiles in your database to ensure data integrity and prevent duplicates. Every profile in your database will have at least one unique ID called the NationBuilder ID or signup_id. You can see from the linked doc that there are over a dozen that can be used depending on where your data is sourced. This includes an external ID field which is more open ended in case your data doesn't match with any of the others.
With this in mind, it's often the case where a single profile has multiple unique IDs attached to it. When importing a CSV, the system looks at all unique IDs separately. As long as a unique ID is indeed unique to the profile it's attached to on the import, there shouldn't be an issue. If any of the IDs exist on multiple profiles (whether in the CSV or if there is a conflict with an already existing profile in the nation) that profile will error out and not import.
In the example from the original question, if you're importing a profile (we'll call it John Smith) who has two unique IDs (an email and a numeric ID field), as long as those two IDs are unique to that individual, a new profile will generate without issue. Neither ID is prioritized.
Your import may look like
Name: John Smith
If there is a profile already in your nation named John Smith with only the email firstname.lastname@example.org, but no external ID, the system will match on that email and append the external_id: 12345 to it.
Say there is a profile in your nation already, however, that looks like this
Name: John Smith
and you run the import using the first John Smith above. Because the system doesn't prioritize how it tracks unique IDs, it'll error out. It'll essentially say, "while there is a email@example.com in the nation, it's attached to different external_id. I can't import this data."
With this in mind, it is not possible to merge data via an import nor is it possible to overwrite unique IDs via an import.
There are fields you can overwrite. I recommend checking out "When imports overwrite existing data"
Complete and current information on how to use NationBuilder is available in the documentation section.