Service Layer medium complexity backend
2
Dependencies
1
Dependents
2
Entities
0
Integrations

Description

Background service that runs on activity insert to detect suspected duplicate registrations. Compares contact_id, date, and activity_type within the same local association within a configurable time window, and auto-flags matches with reason 'suspected_duplicate'.

Feature: Activity Flagging

duplicate-detection-service

Responsibilities

  • Compare new activity against recent activities by contact_id, date, and activity_type
  • Apply configurable deduplication time window per organization
  • Auto-flag suspected duplicates via Activity Flagging Service
  • Avoid false positives by scoping comparison to same local association

Interfaces

checkForDuplicates(activity)
getDuplicationWindow(orgId)
setDuplicationWindow(orgId, windowMinutes)
runDeduplicationScan(orgId)
getSuspectedDuplicatePairs(orgId)

Relationships

Dependencies (2)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component