Zendesk has a powerful Trigger system that allows actions to be applied to tickets as they are updated based on conditions you define. This article will cover how triggers operate in Zendesk and how to leverage triggers based on information in tickets created by Watchman Monitoring.
Understanding the Trigger Operation
Triggers are business rules you define which run immediately after tickets are created or updated.
Triggers use Condition statements consisting of conditions, field operators, and condition values (these vary depending on the condition selected). Condition statements are essentially ‘if’ statements that act on tickets that meet the specified criteria.
The Trigger Action statements define what occurs if all the Condition statements are true and the trigger fires. Think of action statements as ‘then’ statements – if all of your conditions are true then perform these actions.
Triggers run in the order they are shown within your Zendesk Admin site.
Default Watchman Monitoring Condition Statement
Tickets created by Watchman Monitoring contain a tag of wm_new_ticket. During the setup of your Zendesk integraiton, a default trigger is created that look for this tag.
Using the Watchman Monitoring Action Statement
The Action we take is to first remove the wm_new_ticket tag, and then to send you a notification email.
Removing the wm_new_ticket tag prevents this Trigger from firing again (and sending you multiple emails using this example).
Customizing the Watchman Monitoring Zendesk Trigger
Click on the Admin icon or sprocket in the lower left corner.
Select Business Rules > Triggers.
When you setup your Zendesk integration, Watchman Monitoring created a trigger entitled, "EDIT ME - Default Watchman Monitoring Trigger"
At the end of the EDIT ME - Default Watchman Monitoring Trigger line, click the options menu ... (ellipse) and then Clone
You will be presented with a Copy of the Trigger to begin editing.
Extending the Trigger
Matching on Subject
Adding additional conditions allow you to further extend the actions taken upon a ticket that matches the Condition statement. The most powerful condition in the scope of Watchman Monitoring tickets is the Ticket: Subject text...
Matching the Ticket: Subject text... with Contains the following string allows you to differentiate tickets based on the type, group and plugin.
Ticket Type (Warning v. Alert)
Matching the Ticket: Subject text... on Warning: or Alert: allows differentiation between the alert types.
We highly recommend using the colon (:) character as part of the matching string to avoid improper triggering.
Matching the Ticket: Subject text... on of GroupName allows actions for a specific Group or Groups. Matching the word "of" in addition to the group name can help prevent improper triggering of an action.
Use a unique character in the Group Name to signify plan membership, SLA levels, etc. and create Triggers based on the unique symbol.
§ - Option-6
‡ - Shift-Option-7
± - Shift-Option-=
Matching the Ticket: Subject text... on - Plugin allows actions for a specific Plugin. Matching hyphen ahead of the plugin name can help prevent improper triggering of an action.
See Sorting and routing emails sent by Watchman Monitoring for a list Plugin Subject Items.
Triggers act each time, so if you just have a trigger based on the subject line, it’s going to always fire the Trigger.
The thing to do is have the trigger look for this, AND something else, and have its Actions remove that something else.
Additional Actions can be applied to the ticket that triggers the Condition statement of the Trigger. The ticket can be modified such as Status, Priority, Type, Group, Assignee, Add/Remove tags or add a CC (Carbon Copy), and/or Notify a user or group.
It is important that we modify the ticket in such a way that this trigger will not fire or be activated again. We find that removing the wm_new_ticket tag is sufficient.
Zendesk does not allow for the ticket requester to be changed through Triggers or Automation. Please see our Change Requester Workflow article for more information.
Adding Tags to a ticket can be used in Automations, help with searching, and provide insight into the status of a ticket. Tags can include the ticket type (Alert vs. Warning), Group, SLA Level, Plugin, etc.
Assign a Group or Assignee
If you have a dedicated individual or team that specific alerts or warning should be directed towards, your might add an Assignee or Group.
Change Ticket Status
Set the ticket status to Open.
Create the Trigger
Once you've added the conditions and actions for your trigger, click the Create trigger button at the bottom of the action section.
Active triggers run every time a ticket is created or updated. Actions in one trigger can affect the actions in another trigger.
You can reorder your triggers manually:
- Using drag-and drop to move them around the list.
- Assigning them the first, last, or another specific position.
On the Triggers page, click the Action icon (...), and select Reorder page.
Click and hold the drag-and-drop handle for the trigger you want to move.
Drag the trigger into position and release the handle. Repeat as needed to reorder your triggers list.
Reordering by Assignment
Hover your mouse over the trigger you want to move to display the Options menu icon, and select a new position for the trigger:
- Move to first position places the trigger at the top of the list.
- Move to last position places the trigger at the bottom of the list.
- Select position opens a window allowing you to select a position
- Scroll through (or search) the list of triggers.
- Select one trigger to place the trigger to be moved above.
- Click Move.