User Story
As a Salesforce Admin,
I want a scheduled flow that runs daily at 10:00 PM to delete all inactive accounts that have been inactive for 30 days,
So that the system remains up-to-date and avoids unnecessary storage of stale account data.
Acceptance Criteria:
-
Field Creation:
- Create a custom Date field named Account Deactivated Date if it does not already exist.
- Populate this field with the date when an account becomes inactive.
-
Scheduled Flow:
- A flow should run automatically every day at 10:00 PM.
- The flow should identify accounts where:
- The status is "Inactive" (or similar criteria).
- The Account Deactivated Date is 30 or more days ago.
- All accounts meeting these criteria should be deleted.
-
Fault Handling:
- If an account cannot be deleted (e.g., due to related records or permissions), log the error and display an appropriate fault message for administrative review.