# Duplicate Detection & Merging
## How Duplicate Detection Works
HireBee automatically checks for duplicate candidates based on **email address** — the primary unique identifier.
### When Detection Happens
- When a new candidate applies to a job.
- When you manually add a candidate.
- When importing candidates in bulk.
- You can also trigger a manual scan from **Candidates → Detect Duplicates**.
### What Happens When Duplicates Are Found
1. You receive a notification about potential duplicates.
2. A duplicate review panel shows the matching candidates side by side.
3. You can choose to **merge**, **ignore**, or **mark as not duplicate**.
## Merging Candidates
### The Merge Process
1. Select the **primary record** — this is the profile that will be kept.
2. Review data from both records.
3. Click **Merge** — data from the secondary record is combined into the primary.
4. The secondary record is soft-deleted (marked as merged).
### What Gets Merged
- **Applications** — all applications from both records are preserved.
- **Notes** — all notes are kept with original authors and dates.
- **Communications** — email history from both records.
- **Scorecards** — interview evaluations from both records.
- **Files** — resumes and documents from both records.
- **Tags** — combined from both records (deduplicated).
- **Talent Pools** — memberships from both records.
### What Happens to the Duplicate
- The merged (secondary) candidate is marked with `merged_into_id`.
- They're removed from active candidate lists.
- Their data is preserved for audit purposes.
- Any future applications from the same email are linked to the primary record.
## Preventing Duplicates
- Ensure candidates use consistent email addresses.
- When adding candidates manually, HireBee warns you if the email already exists.
- The bulk import tool flags duplicates before processing.