Industry
Higher Education
Client
UCLA Anderson Executive Education
I built Salesforce flows to maintain the email data and supporting Email Index for a Lead deduplication process. Record-triggered flows handle email normalization and index creation. A separate nightly batch runs daily at 3:00 a.m. to remove qualifying orphaned Email Index records, separating routine cleanup from processing performed when Leads are saved.
Solution design and implementation | Technology Manager
The challenge
The deduplication process included two maintenance tasks: preparing email values on Lead records and maintaining a separate Email Index. These tasks operated on different schedules. Email preparation accompanied Lead creation and updates, while orphaned index records were handled through recurring overnight cleanup.
My approach
I separated the work into three Salesforce flows, each with a distinct trigger and responsibility.
Prepare Lead email data. A before-save, record-triggered flow runs when a Lead is created or updated. It executes the email-normalization assignment before the record is saved.
Create Email Index records. A separate after-save flow runs when a newly created Lead meets its entry condition. It retrieves existing Email Index records and then executes the index-creation step.
Run nightly cleanup. A schedule-triggered flow runs against Email Index daily at 3:00 a.m. It selects records using its configured entry condition and executes the Delete Orphan Email Index Records step.
This structure keeps Lead email preparation, index creation, and scheduled cleanup in separate flows. Each part can be inspected through its own entry criteria and processing steps.
Outcome
The nightly cleanup flow is activated with a daily 3:00 a.m. schedule. Cleanup does not require someone to initiate each run. It has a defined operating schedule, separate from the record-triggered processing that prepares Lead email data and creates index records.
What I’d do differently
I would package the flows with a short administrator runbook covering entry conditions, field mappings, cleanup criteria, and troubleshooting steps. I would also review how nightly-run failures are surfaced so another administrator can monitor and maintain the process.
What it shows
Technologies used: Salesforce Enterprise Edition; Salesforce Flow; before-save and after-save record-triggered flows; schedule-triggered Flow; Assignment, Get Records, Create Records, and Delete Records elements.
The implementation separates record-level processing from scheduled maintenance within an email-index-based deduplication process.