One of the things that usually confuses people who are new to Zendesk is the difference between a trigger and an automation.
These two business rules seem to do the same, but they’re actually quite different. What are the main differences between them?
Triggers execute whenever a ticket is created or updated, as long as specific ticket criteria we’ve predetermined are met.
Automations run every hour, check all tickets that meet their conditions, and update them. Each automation can update up to 1,000 tickets per hour.
Triggers are constantly “listening” to every update, to see if it matches their criteria. Automations “sleep” for an hour, check if a ticket matches the criteria.
Although the above explanation might suffice, I can’t resist to illustrate this distinction by using an often slippery, infrequently powerful, and always silly tool of the cognitive process.
Yes, you guessed it: it’s Zendesk analogy time!
A day in the life of a moray eel
What’s a moray?
In a remote part of the ocean, deep beneath its surface, lives a creepy moray eel named Ted. Ted’s daily feeding ritual consists of two important behaviors.
1) Routinely checking for fish
Every hour, Ted leaves the darkness of its cave, comes and stands at its entrance. It then checks its surroundings for any fish that might be nearby.
- If there are, Ted will try to eat them.
- If there aren’t, Ted goes back into the cave. Ted repeats this on an hourly basis.
- Oh, and Ted is only able to eat 1,000 fish per hour!
This is an automation. It runs every hour, and updates up to one-thousand tickets in each run.
2) Random event: detecting mollusks
Ted can neither see (nor hear) very well, but its sense of smell is quite extraordinary. This comes in very handy to detect its favorite snack: mollusks!
Although most of its time is spent resting in the dark, Ted is easily triggered by any mollusks approaching the cave’s entrance. Whenever that happens, Ted immediately pops out, and eats it.
This is a trigger. It runs whenever specific conditions are met and a ticket is updated or created (you can specify this in trigger conditions). Also, there aren’t any limitations regarding the number of tickets it will act upon.
When conditions are met, every hour, minute, sec—triggered moray— Eel Martin
If an hour goes by, and conditions apply, auto-moray
Extra: updating thousands of tickets in record time using automations
What if I need to update more than 1,000 tickets?
Let’s say you have 8,500 tickets to be updated. As soon as you create your automation, its first run will update 1,000 tickets (might not be immediate).
Now there are 7,500 tickets left to update. In 8 hours, the updates will be completed.
What if I need to update these tickets as quickly as possible?
In that case, clone your automation.
Click the address bar of your browser to edit the URL, and identify this specific automation’s ID value:
Immediately before that ID, write automations/new?automation_id=, like so:
Alternatively, bookmark this link, and simply paste an ID when cloning any automation.
Create this duplicate automation. Because each automation updates 1k tickets/hour, we’ll duplicate this browser tab eight times.
Save all these duplicate automations (you can easily find them in your Automations page, since they share the title).
You now have nine cloned automations (the original plus eight replicas).
Each of them will read exactly the same criteria, and update up to 1,000 tickets. Together, they’ll update up to 9,000 tickets, which means that our 8,500 tickets should be updated in a single run (after which you can deactivate them all).
Tip: whenever you have, let’s say, a JIRA issue created for a specific cleanup, you can also include an action to add a tag (e.g. admin_jira123). This way you can easily keep track of all these tickets, if necessary.