Understanding and Using Triggers in Zendesk
Triggers are business rules that run immediately after a record, such as a ticket, is created or updated and automatically perform actions if specified conditions are met. Triggers automate record updates and notifications across products.
Key Functionality
- Triggers are comprised of conditions and actions.
- Conditions are the qualifications needed for the trigger to fire.
- Actions represent what will be performed when those qualifications are met.
- Ticket and object triggers run automatically any time a ticket or a custom object's record, respectively, is created or updated.
- Changes that automations make to tickets can cause triggers to run.
Types of Zendesk Triggers
- Ticket triggers: Run any time a ticket is created or updated. There are several standard ticket triggers that Zendesk provides.
- Object triggers: Run any time a record is created or updated for the specified custom object.
- Chat triggers: Run when a selected event occurs. There are several standard chat triggers that Zendesk provides.
- Messaging triggers: Messaging triggers function the same way chat triggers do. There are several standard messaging triggers that Zendesk provides.
Essential Facts About Zendesk Triggers
- Triggers run based on conditions and perform actions on the qualifying ticket.
- Triggers always run immediately after the qualifying event happens.
- The one exception is ticket triggers don't run or fire on tickets after they are closed.
- Ticket triggers can fire when a ticket is being set to closed, except when the ticket is automatically closed by the system after 28 days.
- Triggers only fire if the trigger's set conditions are met.
- Actions applied by one ticket trigger can affect how other triggers run and fire for a ticket. In other words, triggers can loop around.
Creating Ticket Triggers
Here's a step-by-step guide to creating ticket triggers:
- In Admin Center, click Objects and rules in the sidebar, then select Business rules > Triggers.
- On the triggers page, click the Ticket tab.
- Click Create trigger.
- Enter a Name for your trigger.
- (Optional) Enter a Description for your trigger.
- Select an existing Trigger category for your trigger or create a new one.
- Click Add condition to set up the trigger to meet All or Any conditions.
- Select a Category, Field operator, and Value for each condition you add.
- Click the Add action to set the actions that occur when trigger conditions are met.
- Select Category and a Value for each action you add.
- Enter the action information.
- Click Create trigger.
Editing and Managing Ticket Triggers
- The order of your ticket triggers and categories designates the order in which they're fired.
- It's important that triggers and categories are arranged in the appropriate order to match the intended workflow.
- Ticket triggers run in the order they are listed on the Triggers page in Admin Center.
- Actions applied by one trigger can affect how other triggers run and fire for a ticket, so the order of your triggers is very important.
- To help you manage large numbers of ticket triggers, they can be organized into categories.
- You can have a maximum of 7000 active ticket triggers.
Standard Ticket Triggers
Zendesk provides a set of standard ticket triggers with default notifications that are best practices in a typical ticket workflow. You can use the standard triggers as they are or clone them to modify and repurpose.
Examples of standard ticket triggers:
-
Notify requester and CCs of received request: Notifies the requester and anyone who is copied on the ticket that their request has been received and has become a ticket.
- Conditions:
- Ticket > Ticket | Is | Created
- Ticket > Status category | Is not | Solved
- Ticket > Privacy | Is | Ticket has public comments
- Ticket > Comment | Is | Public
- Ticket details > Current user | Is | (end user)
- Actions:
- Notify by > User email | Ticket > (requester and CCs)
- Conditions:
-
Notify requester of new proactive ticket: When an agent creates a new proactive ticket with a public comment, the requester is notified via email.
- Conditions:
- Ticket > Ticket | Is | Created
- Ticket > Privacy | Is | Ticket has public comments
- Ticket details > Current user | Is | (agent)
- Actions:
- Notify by > User email | Ticket > (requester and CCs)
- Conditions:
-
Notify requester and CCs of comment update: When an agent or end user adds a comment to the ticket, the requester and CCs are notified via email.
- Conditions:
- Ticket > Ticket | Is | Updated
- Ticket > Comment | Is | Public
- Actions:
- Notify by > User email | Ticket > (requester and CCs)
- Conditions:
-
Notify assignee of comment update: Notifies the assigned agent when a comment is added to the ticket.
- Conditions:
- Ticket > Comment | Is | Present (public or private)
- Ticket > Assignee | Is not | (current user)
- Ticket > Assignee | Is not | (requester)
- Ticket > Assignee | Not changed
- Ticket > Status category | Not changed from | Solved
- Actions:
- Notify by > User email | Ticket > (assignee)
- Conditions:
-
Notify assignee of assignment: Notifies the agent who has been assigned to a ticket of the new assignment.
- Conditions:
- Ticket > Assignee | Changed
- Ticket > Assignee | Is not | (current user)
- Actions:
- Notify by > User email | Ticket > (assignee)
- Conditions:
-
Notify assignee of reopened ticket: Notifies the assigned agent of a solved ticket that the ticket was updated with a new comment by the requester and reopened.
- Conditions:
- Ticket > Assignee | Is not | (current user)
- Ticket > Status category | Changed from | Solved
- Ticket > Status category | Is not | Closed
- Actions:
- Notify by > User email | Ticket > (assignee)
- Conditions:
-
Notify group of assignment: Notifies a group when a ticket is assigned to a group to which they belong.
- Conditions:
- Ticket > Group | Is not | -
- Ticket > Assignee | Is | -
- Ticket > Group | Changed OR Ticket > Assignee | Changed
- Actions:
- Notify by > Group email | Ticket > (assigned group)
- Conditions:
-
Notify all agents of received request: Notifies all non-restricted agents when a new ticket is created that has also not been automatically assigned.
- Conditions:
- Ticket > Ticket | Is | Created
- Actions:
- Notify by > User email | Ticket > (all non-restricted agents)
- Conditions:
-
Auto-assign to first email responding agent: Assigns the ticket to the agent when the agent replies to the ticket notification they received by email.
- Conditions:
- Ticket > Ticket | Is | Updated
- Ticket > Update via | Is | Email
- Ticket > Assignee | Is | -
- Ticket details > Current user | Is not | (end user)
- Actions:
- Ticket > Assignee | Ticket > (current user)
- Conditions:
Custom Triggers
You can create custom triggers to meet specific business needs.
Example of a custom trigger to automatically assign tickets based on certain conditions:
-
Automatically assign tickets with "Billing" tag to the "Billing Team": Assigns tickets with the tag "Billing" to the group "Billing Team."
- Conditions:
- Ticket > Ticket | Is | Created
- Ticket > Tags | Contains at least one of the following | Billing
- Actions:
- Ticket > Group | Billing Team
- Conditions:
Ensuring Triggers are Working Well
- Do not deactivate all triggers. If all triggers are deactivated, email notifications about ticket activity will not be sent.
- Ensure you thoroughly test your custom triggers.
- If you want to alter a standard trigger, clone it and create a new trigger based on its structure, then deactivate the standard trigger.
- When building a ticket trigger, it's important to make your conditions as specific as possible.
- It's also important to watch out for ticket triggers that undo or modify an action contained in another ticket trigger. This can cause conflicts and lead to unpredictable behavior.
- It is recommended to keep your trigger statements simple. The more complicated a trigger is, the harder it will be to troubleshoot and maintain.
- The ticket event log only records the actions applied to tickets by triggers if they result in a net change in ticket field values. If a trigger runs and fires, but results in no change to the ticket, it isn't logged in the event log.
- Consider deactivating the Notify all agents of received request trigger to avoid clogging your agents’ inboxes unnecessarily. Unless you have a very small team, you probably don’t need to inform all of your agents about every ticket submitted.
For more information about Zendesk Triggers, see Zendesk Trigger Resources
Comments
0 comments
Article is closed for comments.