Thousands of cases get resolved and closed each week. Many admins want to automatically delete cases weekly based on case priority. In this example, we design a flow that automatically deletes closed cases. A batch job is created to select the case records and drive the business flow. Another flow is created to schedule the batch job to run each week.
- Create a Flow to Delete Closed Cases
Create a business flow to automatically delete cases. All closed cases get deleted, except for medium and high priority cases that were escalated. - Create a Batch Job to Process the Delete Closed Cases Flow
Create a batch job to process all the closed case records for the Delete Closed Cases flow. - Schedule the Batch Job to Run
Now that the Process Closed Cases batch job is created, a scheduled flow must be created to run this batch job. The batch job processes the Deleted Closed Cases flow.