---
schema_version: "1"
id: e0bc513c4803deb881b709ba8b2d3bad43370c3eddbc700193a97b5dbb186024
title: Delete Closed Cases Using Batch Management (Example)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/concept_batch_job_example.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.concept_batch_job_example.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fbf1341c48d20b6cb9537ba43ba91a1e89eb3f7489a21e0424d1873e9d513156
description: 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.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# Delete Closed Cases Using Batch Management (Example)

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](https://help.salesforce.com/s/articleView?id=ind.task_batch_case_example.htm&release=264.0.0&type=5)**  
    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](https://help.salesforce.com/s/articleView?id=ind.task_case_batch.htm&release=264.0.0&type=5)**  
    Create a batch job to process all the closed case records for the Delete Closed Cases flow.
- **[Schedule the Batch Job to Run](https://help.salesforce.com/s/articleView?id=ind.task_case_scheduled_flow.htm&release=264.0.0&type=5)**  
    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.