Flow Name: [I2C] Scheduled - Account Attestation Checkboxes Expiration Automation¶
Last Updated: 2025-10-08 Source Code: I2C_Scheduled_Account_Attestation_Checkboxes_Expiration_Automation.flow-meta.xml
API Name: I2C_Scheduled_Account_Attestation_Checkboxes_Expiration_Automation Status: Active Type: Custom Trigger: Daily scheduled run at midnight UTC (started 2025-10-08)
Business Purpose¶
Automatically expires faculty and preceptor attestations on member accounts after 365 days, ensuring compliance with annual attestation requirements and maintaining data accuracy for profile verification.
Process Flow¶
- Runs daily at midnight UTC
- Queries Accounts where attestation dates are 365+ days old (formula: TODAY() - 365)
- Checks Faculty Attestation Date and/or Preceptor Attestation Date
- For each expired attestation:
- Clears the attestation checkbox (sets to false)
- Clears the attestation date (sets to null)
- Updates accounts using SafeUpdateService apex class for error handling
- Logs any errors that occur during the update process
📊 Click to view Process Flow Diagram
flowchart TD
Start([Start: Scheduled Daily<br/>12:00 AM UTC]) --> GetAccounts[Get Accounts:<br/>• Faculty/Preceptor Attestation = true<br/>• Attestation Date <= Today - 365 days]
GetAccounts --> CheckAccounts{Accounts Found?}
CheckAccounts -->|No| End([End])
CheckAccounts -->|Yes| Loop{For Each Account}
Loop -->|Next| CheckDates{Check Attestation Dates}
CheckDates -->|Both Dates <= Cutoff| ClearBoth[Assign Updates:<br/>• Faculty Attestation = false<br/>• Faculty Date = null<br/>• Preceptor Attestation = false<br/>• Preceptor Date = null<br/>Add to Update List]
CheckDates -->|Only Faculty <= Cutoff| ClearFaculty[Assign Updates:<br/>• Faculty Attestation = false<br/>• Faculty Date = null<br/>Add to Update List]
CheckDates -->|Only Preceptor <= Cutoff| ClearPreceptor[Assign Updates:<br/>• Preceptor Attestation = false<br/>• Preceptor Date = null<br/>Add to Update List]
CheckDates -->|No Match| Loop
ClearBoth --> Loop
ClearFaculty --> Loop
ClearPreceptor --> Loop
Loop -->|Done| CheckList{Accounts<br/>Need Update?}
CheckList -->|Yes| SafeUpdate[Safe Update Attestation Fields:<br/>Using SafeUpdateService]
CheckList -->|No| End
SafeUpdate --> End
style Start fill:#e1f5ff
style GetAccounts fill:#f0e1ff
style CheckAccounts fill:#fff4e1
style Loop fill:#fff4e1
style CheckDates fill:#fff4e1
style CheckList fill:#fff4e1
style ClearBoth fill:#e1ffe1
style ClearFaculty fill:#e1ffe1
style ClearPreceptor fill:#e1ffe1
style SafeUpdate fill:#ffe1e1
style End fill:#e1f5ff
Key Business Rules¶
- Attestations expire after exactly 365 days
- Searches for accounts with Faculty AND/OR Preceptor attestations enabled
- Only processes accounts where attestation dates exist and are not null
- Can clear one or both attestation types per account
- Uses SafeUpdateService to handle update errors gracefully
- Filter logic: (1 AND 3 AND 5) OR (2 AND 4 AND 6)
- Faculty: checkbox = true, date not null, date <= 365 days ago
- Preceptor: checkbox = true, date not null, date <= 365 days ago
Dependencies¶
- Objects: Account (standard with custom fields)
- Fields:
- Profile_Faculty_Attestation__c
- Profile_Faculty_Attestation_Date__c
- Profile_Preceptor_Attestation__c
- Profile_Preceptor_Attestation_Date__c
- Apex Classes: SafeUpdateService (error handling)
- Related Flows: I2C_Update_Account_Attestation_Dates (handles checkbox changes)
Changes¶
No Pull Request references found in metadata.
⚠️ Pre-Go-Live Concerns¶
CRITICAL - Fix Before Go-Live¶
- No Notification: Users are not notified when attestations expire - could cause confusion
- Hardcoded Date: 365-day expiration is hardcoded in formula - should be configurable via Custom Metadata
- Start Date: Scheduled to start 2025-10-08 but current date is 2025-10-21 - verify schedule is running
HIGH - Address Soon After Go-Live¶
- Audit Trail: No tracking of when attestations are auto-expired for compliance reporting
- Grace Period: No warning period before expiration - consider 30-day warning
- Bulk Operations: Large volume of expirations could cause governor limit issues
MEDIUM - Future Enhancement¶
- Email Notifications: Send reminder emails 30 days before expiration and notification on expiration
- Reporting: Create dashboard to track attestation expiration trends
- Different Expiration Periods: Faculty and Preceptor might need different expiration timeframes
LOW - Monitor¶
- Performance: Daily execution time should be monitored
- Error Logs: Review SafeUpdateService error logs regularly
- False Positives: Verify no valid attestations are being cleared incorrectly
Maintenance Notes¶
Complexity: Medium - Scheduled flow with loop iteration and conditional logic Review Schedule: Quarterly review to verify expiration period aligns with business policy Critical Dependencies: Changes to attestation fields or expiration policy require flow update Timezone Consideration: Runs at midnight UTC - may not align with business hours in all regions