I added profile-specific duplicate rules to my CSV intake console #5
Source: Dev.to
Background
In the previous step I added company‑specific CSV import profiles so the intake flow could understand different source formats:
Previous article: company‑specific CSV import profiles
That solved one operational problem: different companies send different column names.
The Remaining Challenge
Different companies also define duplicates differently:
- Some imports should match on email.
- Some should match on company name.
- Some only become duplicates when company name + phone match together.
Applying a single universal duplicate rule to every file leads to valid rows being blocked, bad rows slipping through, and operators losing trust in the workflow.
Profile‑Specific Duplicate Rules
In this update I added profile‑specific duplicate rules to the intake console. Now a profile controls not only column mapping but also how duplicate detection works.
| Profile | Duplicate rule |
|---|---|
default | exact email |
regional_ops | exact company name |
partner_directory | company name + phone |
The partner_directory profile, for example, correctly understood the CSV shape and blocked only the row that collided on the active rule (company_name_phone). This is the behavior we want: a different source format should not be treated as bad data.
Workflow
- The CSV is uploaded without being rewritten.
- Staged import rows are created.
- If a row is blocked, the operator can edit the value directly in the UI (e.g., change the phone number).
- The evaluation can be re‑run in place.
- Changes can be applied or reverted based on the tracked state.
The audit trail preserves the full path:
- Which profile was active
- Which duplicate rule was used
- Which row was blocked
- What was changed
- When the run was applied
Benefits
- Defensive intake engine that can stage dirty operational data.
- Understands company‑specific CSV formats.
- Applies company‑specific duplicate rules.
- Allows operators to repair blocked rows in place.
- Preserves audit evidence for every step.
Get in Touch
If you work on messy CSV onboarding, operational imports, or audit‑ready intake workflows, feel free to reach out: