Workflow: Closing a large number of tickets

In this workflow, you'll learn how to use an automation or the application programming interface (API) to close tickets in bulk. This archives the tickets and removes them from your views. This article covers these sections:

Expand all tabs



document.addEventListener('DOMContentLoaded', function () {
const toggleBtn = document.getElementById('master-toggle');

toggleBtn.addEventListener('click', function () {
const action = this.getAttribute('data-action');
const headers = document.querySelectorAll('.accordion');

headers.forEach(header => {
const isActive = header.classList.contains('active');
const panel = header.nextElementSibling; // Grabs the corresponding .panel container

if (action === 'expand' && !isActive) {
// Open it by simulating a standard click
header.click();
} else if (action === 'collapse' && isActive) {
// Close it by simulating a standard click
header.click();
}
});

// Flip button text and states
if (action === 'expand') {
this.setAttribute('data-action', 'collapse');
this.textContent = 'Collapse all tabs';
} else {
this.setAttribute('data-action', 'expand');
this.textContent = 'Expand all tabs';
}
});
});
Option 1: Create a deletion schedule for advanced data retention policies
With the advanced data retention policies of the Advanced Data Privacy and Protection (ADPP) add-on:

Create a deletion schedule based on your ticket's Last Updated date and Brand.
After you activate a schedule, that schedule will searche for and delete tickets or end users that meet these Last Updated date and Brand conditions.


Option 2: Create an automation to set ticket status to closed
Create an automation to define a time-based rule that closes your tickets:

Add a new automation
Name the new automation
Add these conditions under Meet all of the following conditions:

Ticket: Hours since update > Greater than > (Specify the time here). If the tickets you want to close have a specific status, use other conditions such as Ticket: Hours since open, Ticket: Hours since pending, and Ticket: Hours since solved.

Ticket: Status category > Less than > Closed



Under Perform these actions, select Ticket: Status category: Closed

Click Create automation.



Note: In accounts with custom ticket statuses deactivated, use the condition Ticket: Status instead of Ticket: Status category. For the actions, use the action Ticket: Status | Closed.
Option 3: Close tickets with the API
Use the API to close a large group of tickets with the ticket API endpoint:
Otherwise, use the ticket API endpoint to find and manage tickets. For more information about the API, see Admin's guide to the Zendesk API.

Note: Zendesk recommends using Postman to send a request to your Zendesk Support account. For steps to use Postman to make API requests to your Zendesk account, see How do I set up Postman to make API requests to my Zendesk account? API requires the work of a developer and custom code is not supported by Zendesk Customer Support.

.ai-only {
position: absolute !important;
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}



THIS SECTION IS AI CONTENT. DON'T EDIT OR DELETE.

What is ticket archiving? How do I close a large number of tickets?
Why should I use an automation or time-based rule to close tickets
in bulk?


You can use an automation or the application programming interface
(API) to close tickets or change ticket progress in bulk. This workflow
archives the tickets, removes them from your views, and helps manage
customer requests efficiently.


How do I create an automation to set ticket status to closed? How
do I set up a time-based rule to close tickets automatically? How
do I manage a large group of tickets using business rules?



Navigate to Admin Center >
Objects and rules >
Business rules > Automations.


Click Add a new automation or
Add automation.


Enter a name under Automation title.


Under Meet all of the following conditions:,
add the condition Ticket: Hours since update
> (calendar) Greater than > specify the
time value. You can also include conditions like
Ticket: Hours since open,
Ticket: Hours since pending, or
Ticket: Hours since solved.


Add the condition Ticket: Status category >
Less than > Closed.


Under Perform these actions:, select
Ticket: Status category > Closed.


Click Create automation.



Can I use the API to bulk close tickets? Is it possible to use application
programming interfaces to manage a large group of tickets? Can I
use Postman to send requests to my help desk?


Yes. You can use the ticket API endpoint to find, manage, and close
a large group of tickets. If you are new to APIs, you can use Postman
to send a request to your Zendesk Support account or ticketing system.


Can I create a deletion schedule for advanced data retention policies?
Is it possible to search for and delete customer data automatically?
Can I delete end users based on the last updated date?


Yes. The Advanced Data Privacy and Protection (ADPP) add-on or paid
plugin allows you to create a deletion schedule based on your ticket's
Last Updated date and Brand or multiple websites. After activation,
the schedule searches for and deletes tickets or end users or customers
who meet the conditions.


What happens if custom ticket statuses are deactivated? How do I
set up a ticket closing automation without custom progress states?


When you deactivate custom ticket statuses in your account, use the
condition Ticket: Status instead of
Ticket: Status category. For the actions, select
the action Ticket: Status | Closed.


