All ideas
0
IdeaDistribution

Custom duplicate-detection fields (zip, city, etc. + match mode)

Today, duplicate detection only supports matching on phone, email, or both. Some verticals (home services, solar, insurance) want to also match on fields like zip code, address, full name + DOB, or supplier-specific identifiers — and to choose whether ANY field matching counts as a dupe ("one field") or ALL must match ("all fields"). Use cases: "same household" check by zip + last name; identity-level matching on full_name + dob (insurance); composite key matching for verticals where one phone serves a household. Implementation notes: campaigns.duplicate_match_field (string enum) becomes duplicate_match_fields (jsonb array) + duplicate_match_mode ("any"/"all") with a backwards-compat read path; custom fields live in leads.data JSONB and are not indexed, so high-volume campaigns will need partial expression indexes per opted-in field; the dedupe UI in src/app/(app)/campaigns/[id]/page.tsx swaps the 3 hardcoded buttons for FieldPickerDropdown + a match-mode toggle; all four callers of checkForDuplicate / checkSupplierDuplicate / checkBuyerDuplicates (ingest, ping, leads/ingest, leads/import) need updating.