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.
- Create the automation
- Under Meet all of the following conditions, add the below:
- Ticket: Hours since created | Greater than | 1
- Ticket: Status category | Less than | Solved
- Under Meet any of the following conditions, add Ticket: Description | Contains the following string | Enter common strings
- Under Perform these actions, add:
-
Ticket: Set tags |
spam
- Ticket: Status category | Closed
-
Ticket: Set tags |
- Click Create automation
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.
6 comments
Devan La Spisa
Hello @...,
You can find the option to grant agents these permissions under the Admin icon, select Settings > Agents, then click Agents Can Delete Tickets. For further help, see Enabling agents delete tickets. Let us know if this doesn't prove useful, and we'll be happy to assist.
Best regards.
0
Growthdot
Hi there!
If anyone is still looking for bulk deletion of tickets, there is a GDPR Compliance app in Zendesk marketplace. It allows creating ticket lists by criteria and deleting the whole list altogether. So, you won't need to erase each ticket one by one.
Hope this was helpful!
2
Pedro Rodrigues
Hey team! Just a few side notes regarding these recommendations:
"Automations run hourly and can perform an action 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."
It's true but these simple steps may not prevent the spam tickets from appearing under what are valid reporting filters in Explore (or any other tool). The best option, if possible, is to modify the spam ticket's Brand and Group (even form for the most zealous). So if you have a brand set for internal docs or something like that, you can use it to 'host' all these spam tickets so that your main brands' reporting isn't affected.
"The automation can also be configured to add a spam tag to the ticket. (...) Perform these actions: Ticket: Set tags | spam"
⚠️ The action "set tags" (as opposed to "add tags") literally removes any other tags in the ticket, which might not be desirable, even if a spam ticket ⚠️
Lastly, depending on how we organize our processes, we may not want to set the status as Closed, as the tickets become uneditable.
Let's say that later on we wish to add another specific tag (eg. "jira_zen123") referencing the JIRA issue where the case was documented, and to properly identify a specific occurrence of spam tickets. If the ticket is Closed, you can't, so probably better to just solve and ensure you disable satisfaction surveys, notifications, etc.
0
Zbyněk Čepera
Hello,
We receive a really large amount of spam every day. The subject contains, for example:
iNyLc在么我我打埰僄每小时80咖qun397996621
There is nothing in the body of the email. The email domain is different every time. The only thing they have in common is that "qun39" is part of the string in the subject of the email, but it's not a separate word, so the article description apparently didn't work and I can't set up the automation. Please advise how to solve this.
1
Pedro Rodrigues
Hey Zbyněk Čepera, coincidentally enough a client of mine was spammed by what looks like the same crew very recently... The subject follows the same pattern as yours, the only difference was that our tickets do have a description/comment:
Regarding the process, mine is just an example of how to tackle this but here it goes.
The main objective is to resolve these, mark them as spammers, and prevent these tickets from appearing in any relevant dashboard or report by moving them to an admins-only Brand in Zendesk.
1) We'll set up a specific Organization for these cases (take note of its ID because you'll need it):
2) Then - if you haven't got one already - create a webhook to update the Requester by using the endpoint https://yoursubdomain.zendesk.com/api/v2/users/{{ticket.requester.id}}.json
3) We'll now create our trigger:
In my client's case, either the Subject or Descripton always include "咖" and/or "80咖qun" and/or "咖qun" (some cases didn't have the '80'). I could've just left the last string as it would consider the one containing '80' but I'm extra cautious when doing these things.
The trigger conditions (under ALL):
And its actions:
The JSON body of the API request is:
This means we'll be accomplishing what we set out to do:
Adapt the trigger I shared accordingly, of course. By the way, to address the issue regarding previously created (existing) tickets remember that you can use an automation with identical conditions/actions.
EDIT: deleting instead of preserving. In the example above we're keeping the tickets in the account (as there are Chinese users, and although highly unlikely, it could happen that some day the conditions match a legitimate ticket). You can obviously just delete them all immediately using the API, of course.
Hope this helps, good luck 💪
0
Phil Gooch
There is no way to trigger an automation based on a string appearing in the Requester name. This should be added as spammers make use of this field
0