Question
My account was spammed and I now have all these tickets which I need to get rid of. Is there a way that I can bulk delete them without having to do it one by one?
Answer
In case of a spam attack, there are a couple of available options to delete more than one ticket at a time in Zendesk. Each option has its own set of limitations and choosing the best route is entirely based on your workflow and can vary for each use case.
- Bulk delete in views
- Bulk marking as spam
- Bulk closing with an automation
- Bulk delete tickets through the API
- Third-party apps from the Marketplace
Bulk delete in views
Delete multiple tickets at a time using the bulk delete feature within views. Identify the spam tickets within your views and manually select each ticket you wish to delete.
Select the Delete option after selecting all the tickets in that view. This option is recommended if you have a relatively small number of spam tickets as you are only able to delete 100 tickets at a time. Tickets can be bulk-selected across pages.
Bulk marking as spam
Marking a ticket as spam not only permanently deletes the ticket, but also suspends the requester, preventing them from being able to create further tickets. You can mark up to 100 tickets as spam at a time. Tickets can be bulk-selected across pages.
Bulk closing with an automation
Automations run hourly and can act to close these tickets. Although this option doesn't delete the tickets, it places them into a closed status and removes them from your live ticket queues. The automation can also add a spam tag to the ticket. If you have an Explore Professional or higher plan, you can use custom reports to filter the tagged spam tickets out of your reports or to identify them later for deletion. For more information, see the article: Reporting with tags.
Automations can only act on up to 1,000 tickets during each hourly run. If you have several thousand spam tickets, it may take several hours for those tickets to be closed. For example, if you had 30,000 spam tickets in your account, it takes a minimum of 30 automation cycles, or 30 hours, for the automation to completely remove these tickets.
To set up this automation
- Determine a way to identify these spam tickets. This could be identifiers such as a specific string in the description, a certain ticket creation timeframe, or a specific requester language.
- If there isn't a single identifying feature between all of the spam tickets, use a combination of different identifying conditions. Use these identifiers as conditions of the automation to help it determine which tickets to run on.
Below is an example of how to configure an automation to close and tag tickets based on the presence of a particular string.
Meet all of the following conditions:
- Ticket: Hours since status category created | Greater than | 1
- Ticket: Status category | Less than | Solved
Meet any of the following conditions:
- Ticket: Description | Contains the following string | (common string goes here)
Perform these actions:
-
Ticket: Set tags |
spam
- Ticket: Status category | Closed
In the example above, Ticket: Description is placed under Meet any of the following conditions, in case multiple strings are used to identify spam tickets. You can add as many of these additional conditions as needed to ensure all of your spam tickets are addressed by a single automation.
Bulk delete tickets through the API
Utilize the Zendesk API to bulk delete tickets. Using this option means you are restricted to deleting 100 tickets at a time, however, if you have developer resources, the API can be leveraged in a script to run continuously in the background until all the spam tickets are deleted as well. For more information on using the API to bulk delete tickets, see this article: Bulk Delete Tickets.
Install third-party apps from the Marketplace
Some third-party apps available in the Marketplace can help you delete or restore tickets on a large scale. One example of those apps is the GDPR: Search & Destroy.