To block the import of records that appear to be duplicated, we can use the “Prevent Duplicate Records” advance option in the import assistant. To identify duplicates, the Import Assistant uses the same criteria that you specify on the Setup > Company > Company Management > Duplicate Detection page.
When the Prevent Duplicate Records option is available, it displays under Advanced Options on page 2 of the Import Assistant.
The option is available only when the following statements are true:
- The Duplicate Detection & Merge feature is enabled at Setup > Company > Setup Tasks > Enable Features.
- On the page labeled Set Up Duplicates Detection Feature (Setup > Company > Company Management > Duplicate Detection), you have selected one or more of the options labeled Detect (RecordType) Duplicates. When you detect duplicates for any of the available record types, the Prevent Duplicate Records option is available for imports of that record type. Note that the feature is available for only four record types: Contact, Customer, Partner, and Vendor.

When you select the Prevent Duplicate Records option and then try to import a record that appears to be a duplicate, the import of that record fails with an error reading “Duplicate record was detected.” The import of duplicate records will be blocked if all the conditions specified in the “Duplicate Detection page” are satisfied.
For example, we can set if two customers have the same email ID then one of them may be duplicated. So we can prevent importing the second entry with the same email ID.

By default, the Prevent Duplicate Records box is not selected, and it is not possible to set a general preference for it. However, you can create a saved import that selects or de-selects this option as appropriate.