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
Note: Zendesk is unable to delete data on your behalf by the Data Recovery Policy.

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.

bulk delete tickets in a view

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

Important: If the spam tickets were created by submissions to your external contact form which is forwarded to Zendesk by email, don't use the Mark as spam option. This can cause an issue where you are flagging your form submissions as spam, rather than the person who filled it in. In turn, this can lead to issues where Zendesk sees this external form as spam, or your email domain could even be on the blocklist.

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.

Mark as spam

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.

  1. Create the automation
  2. Under Meet all of the following conditions, add the below:
    • Ticket: Hours since created | Greater than | 1
    • Ticket: Status category | Less than | Solved
  3. Under Meet any of the following conditions, add Ticket: Description | Contains the following string | Enter common strings
  4. Under Perform these actions, add:
    • Ticket: Set tags | spam
    • Ticket: Status category | Closed
  5. Click Create automation

Automation setup to close spam tickets.png

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.

Note: In accounts with custom ticket statuses deactivated, use the Status conditions instead of the Status category.

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.

Disclaimer: This option is provided for instructional purposes only. Zendesk does not support the code needed to create the script. Post any issues you have in the comments section or try searching for a solution online.

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.

Disclaimer: This option is provided for instructional purposes only. Zendesk can't provide support for third-party apps. Reach out to the app developer's support email address under "App details" in the App Marketplace or try searching for a solution online.
Powered by Zendesk