Duplicate Deposit Protection Reference Detector
Duplicate Deposit Protection Reference Detector
Introduced in: v0.1.308
Type: Nightly batch workflow
Schedule: Every Sunday at 04:00 UTC (0 4 * * 0)
Overview
The Duplicate Deposit Protection Reference Detector is a scheduled compliance workflow that automatically scans all tenancies in your organisation for cases where the same depositProtectionRef has been used on more than one tenancy. When a duplicate is found, a critical compliance check and an urgent notification are raised so the issue can be resolved quickly.
Why Duplicates Are a Problem
Every protected deposit must be registered under a unique reference number with an approved tenancy deposit scheme. If the same reference number appears against two different tenancies — even within the same organisation — it can mean:
- A deposit was registered once but linked to multiple tenancies in error.
- A reference number was reused after a previous tenancy ended without being updated.
- A data entry mistake that could put one or both tenancies out of compliance.
Under the Renters' Rights Act, failure to properly protect a deposit exposes landlords and agents to significant penalties. This workflow surfaces the problem automatically, before it escalates.
How It Works
- Scan — On the scheduled trigger, the workflow queries all tenancy records where
depositProtectionRefis not null, across all organisations. - Group — Within each organisation, tenancies are grouped by their
depositProtectionRefvalue. - Detect — Any group containing more than one tenancy is flagged as a duplicate.
- Alert — For each duplicate set detected:
- A critical
compliance_checksentry is created and linked to the affected tenancies. - An urgent notification is dispatched to the relevant
orgMembers.
- A critical
Affected Entities
| Entity | Role |
|---|---|
tenancies | Source of depositProtectionRef values being scanned |
complianceChecks | Receives a new critical entry for each duplicate found |
notifications | Urgent alert sent to org members on detection |
orgMembers | Recipients of the urgent notification |
properties | Associated with the flagged tenancies for context |
Responding to a Duplicate Alert
When you receive an urgent notification about a duplicate deposit protection reference:
- Review the flagged tenancies in the compliance dashboard.
- Identify which tenancy holds the correct reference and which has been assigned it in error.
- Correct the erroneous record — either by updating the reference number to the correct scheme registration, or by re-protecting the deposit and obtaining a new reference.
- Resolve the compliance check once the underlying data is accurate.
Note: Duplicate detection is scoped per organisation. The same reference number appearing in two different organisations does not trigger this workflow.
Schedule
This workflow runs automatically. There is no manual trigger required.
| Setting | Value |
|---|---|
| Frequency | Weekly |
| Day | Sunday |
| Time | 04:00 UTC |
| Cron expression | 0 4 * * 0 |