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?
There is no native way to bulk delete every single ticket from a large spam influx in a Zendesk Support account, in one go.
However, there are a couple of available options to delete more than one ticket at a time within 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 via the API
- Zendesk Apps
- Install third-party apps from the Marketplace
Bulk delete in views
The first option to delete multiple tickets at a time is to use the bulk delete feature within Views. In this workflow, you can identify the spam tickets within your views and manually select each ticket you wish to delete.
Once you have the tickets selected, you can then select the Delete option from the dropdown. 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
Similar to how you can manually bulk delete tickets in views, you can also bulk mark the tickets as spam. Marking a ticket as spam in this way not only permanently deletes the ticket, but also suspends the requester, preventing them from being able to create further tickets. You will be able to mark up 100 tickets as spam at a time (tickets can be bulk-selected across pages).
Bulk closing with an automation
The next option is to close spam tickets with an automation. Automations run hourly and can perform an action to close these tickets. Although this option is not deleting the tickets, it will place them into a closed status and remove them from your live ticket queues. The automation can also be configured to add a "spam" tag to the ticket, which can be leveraged to filter these spam tickets out of your reports, or to identify them later for deletion. Automations do have limitations, so they can only act on up to 1,000 tickets during each hourly run. This means that, in the event that you have several thousand spam tickets, it may take a number of hours for those tickets to be closed. For example, if you had 30,000 spam tickets in your account, it would take a minimum of 30 automation cycles, or 30 hours, for the automation to completely remove these tickets.
The first step to setting up this automation is to determine a way to identify these spam tickets. This could be based on identifiers like a specific string in the description, a certain ticket creation timeframe, a specific requester language etc. Often times, there will be no single identifying feature between all of the spam tickets, so you would need to use a combination of different identifying conditions. These identifiers will then be used 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 created > Greater than > 1
- Ticket: Status > Less than > Solved
Meet any of the following conditions:
- Ticket: Description > Contains the following string > (common string goes here)
Perform these actions:
- Ticket: Status > Closed
- Ticket: Set Tags > Spam
In the example above, 'Ticket: Description' is placed under Meet any of the following conditions, in case there are multiple strings that 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 via the API
Another option would be to 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 Bulk Delete Tickets.
"Built by Zendesk" released an App that allows for Bulk Delete of suspended tickets. This is the official app and an alternative to managing spam tickets. For more information about this app, see Bulk Delete App.
Install third-party apps from the Marketplace
Some third-party apps available in our Marketplace can help you delete or restore tickets in large scale. One example of those apps is the GDPR: Search & Destroy.