Creating triggers for automatic ticket updates and notifications

Have more questions? Submit a request

31 Comments

  • Jon I.
    Comment actions Permalink

    Hi there!

    I want to know if there is a way to prioritise somehow triggers, making something such as a precedence order.

    I've got a web service, which stores our Zendesk's tickets. We're recording each tickets' changes (status, assignee, etc.) using a datetime. That way, we can measure times assigned to several agents.

    Besides, we've got two triggers: one to make a call to store a change in our WS (when a ticket is updated, if I'm not wrong), and another one which measures time (when a ticket status get changed to solved).

    The issue comes when the measurement trigger runs, the other trigger is also run. We haven't any way to guarantee that the measurement trigger gets executed JUST AFTER the other one.

    My guess is that Zendesk should provide us with tools creating a precedence order, or just by prioritising triggers.

    I hope I've explained myself right.

    Thank you all.

    0
  • Colin Piper
    Comment actions Permalink

    @Jon. The triggers are processed in a op down order. When one is triggered, the whole list is then traversed again skipping any that have already fired, until all triggers have been checked.
    You cannot control the timing beyond that.
    Can I assume you do not have access to Insights or would prefer not to use it? Some people do use Insights to do similar measurements to you and I suspect there are some recipes in these forums.
    Could you modify your second web service to sleep for 30 seconds when it receives a request? Would that help?

    2
  • Jon I.
    Comment actions Permalink

    @Colin Piper thanks for your reply. We've got access to Insights, we'll look how to measure that. And yes, I can my WS to sleep for the time I want and, perhaps, it's the best choice. Thanks again!

    0
  • Karl Simms
    Comment actions Permalink

    Hiya Guys, 

     

    We want to set up a out of hours trigger, 

    i thought that maybe we could potentially do Ticket: Requested is between X time and X time, 

    CC another email in, 

    but theres no option to pull requested time from the Ticket options, anyone else know another way to accomplish this?

    0
  • Graeme Carmichael
    Comment actions Permalink

    Karl

    You can do this on the Professional plan or above.

    First create a Schedule  for your business hours.

    Then in your trigger include the condition:

    • Ticket within business hours> No

    Finally, include the action to CC an agent or set up a notification.

    1
  • Karl Simms
    Comment actions Permalink

    Ahhh, no way to do this prior then. theres only 2 of us you see. So we are only on the starter plan.

    Never mind, Thank you anyway Graeme

    0
  • Justin
    Comment actions Permalink

    What's the best way to configure a trigger to email a manager whenever a custom ticket field is updated? I'm finding that my trigger is based on: when a ticket is updated, and the custom field is selected as option A, email the manager. However, if the ticket has multiple updates thereafter, the manager is notified each time. I just want the manager to be notified the first time the custom field is updated.

    0
  • Paul
    Comment actions Permalink

    Fun question: Is it possible to create a trigger based on ticket ID? Soon we'll hit ticket #10.000 so i want to create a trigger when that ticket is created so i can surprise the colleagues via hipchat :P

    0
  • Milo Convery
    Comment actions Permalink

    Hello! 

    Has anyone ever used dates in there ticket forms to route tickets to various views? For example, in my forms, I want the end user to state the timeflow of the ticket, so if the request lies within the next 3 days then send to this area. That worked fine because you can do 'Date is within the next 3 days'. My following trigger I want to state that after if your request applies to more than 3 days from the current date to send to somewhere else. I can't see anywhere I could apply a a parameter for this - does anyone have any recommendations? Thanks! 

    0
  • Adam Gudmundsson
    Comment actions Permalink

     

    Hi Milo,

    I'm not 100% certain what you're trying to do, but I'd recommend adding a tag to the first trigger, and in the second trigger using "has tags" or "has none of the following tags" to include or exclude ticket, and in that second trigger send it to "somewhere else" :)

    0
  • Jozette Shaffer
    Comment actions Permalink

    Hello!

    Having a hard time trying to create a certain trigger -- mind taking a look?

    I need to create a trigger that IF:

    • Requester updates ticket
    • No comment from agent within 24 hours

    Action is taken:

    • Ticket gets reassigned to the group the agent was attached to (ex: ticket was attached to Support/Jane Doe; no comment from agent, ticket gets moved to Group Support)
    • Private Comment, something akin to, "Please check in with requester"

    An advice would be appreciated.

    Thanks!

    0
  • Heather R
    Comment actions Permalink

    Hi Jozette,

    I could be wrong (it happens LOL), but I am thinking you need at least 2 steps for that. I am going to assume that you use Pending status which changes to Open status when the Requester End User replies.  I am also assuming here that your business hours are 24 hours/day. 

    I would do this:

    Create Automation - 

    All Conditions:

    • Ticket: Hours since requester update - Business Greater Than - 24
    • Ticket: Tags - Contain none of the following - 24_hour_update_needed
    • Ticket: Status - is - Open

    Perform these actions:

    • Ticket: Add tags - 24_hour_update_needed

    Then head over to your triggers (actually maybe do the trigger first so it fires off when the automation adds the tag, in case it happens before you get the trigger set up!)

    Create Trigger:

    All Conditions:

    Ticket - is - Updated

    Tags - Contains at least one of the following - 24_hour_update_needed

    Actions:

    Assignee - (blank)

    Notify target - Auto Private Comment

    Message Please check in with requester!

    Remove tags - 24_hour_update_needed <--- This will set it up so the process can run again on this ticket should it need to. Add a different tag if you want to report on how many tickets this occurs on.  But still remove the original one!

    Don't forget to test this out!!

     

    Hope this helps.

    Have a great day and my apologies for the long post.

    -H

    0
  • Honey Abella
    Comment actions Permalink

    Hello.
    I hope you can help me. After I replied to one of our customers, I submittrd the ticket solved. Few hours after the customer responded but the ticket didnot reopen as expected, instead it automatically solved the ticket after the customer sent her reply. I checked the events but I do not see any agent who manually solved the ticket. There was nothing after the customer's reply but the tickets was solved and was added onmy solved tickets without me manually solving it.
    Please help me

    0
  • Graeme Carmichael
    Comment actions Permalink

    Honey

    Can you check that the customer is an 'end user'?

    When an end user responds to a solved ticket, it is automatically set to an open status. But when an Agent or Admin responds to a ticket, the status is not automatically changed.

    0
  • Honey Abella
    Comment actions Permalink

    Yes, the role says, end user

    0
  • Nicole - Community Manager
    Comment actions Permalink

    Hey Honey - Do you have any triggers in place that might be impacting this?

    0
  • Paul van Venrooij
    Comment actions Permalink

    Hello,

     

    I am searching for a way that I can set a ticket on a date(and if possible time) that if that date(and time) occures this ticket does one of the following:

     

    1. Give a notification

    2. Set the ticket high up in the ticket list (maybe through priority?)

     

    Can I do this through triggers or does this work different in Zendesk?

    0
  • Heather R
    Comment actions Permalink

    @Paul,

    Anything time-based would be something you use Automations for (usually).  Automations run every hour, depending which plan you're on, but they are not necessarily at an exact time on the hour. i.e. It could be 2:07 or 2:10, not necessarily 2:00.  

    That said, you can get close.  In Automations, you have a lot of variables to choose from: Hours since Pending, Hours since Created, etc.  

    Take a look here. Hopefully this will get you on your way!

     

    0
  • Paul van Venrooij
    Comment actions Permalink

    @Heather R

     

    Thx for you quick response. 

     

    Is there going to be a Application which we can find through the store or a update to the system which will allow this in the future?

     

    It seems like this is a default feature for a lot of ticketing systems. I am kind of curious why Zendesk doesn't have this build into there software.

    0
  • Adam Gudmundsson
    Comment actions Permalink

    Paul, I think you're looking for SLA rules - which of course is a feature in Zendesk. 

    You can set as many rules as you want, with different timers depending on if you want it to count from Ticket Received, Ticket Updated by Assignee/Request and so on and so forth. 

    You then want to sort your view by SLA to get oldest tickets first, and of course, even set their priority to urgent if needed.

    We use a mix of SLA rules and triggers/automation depending on the case. 
    For example, if an agent is away but has open tickets - those will be unassigned and set as urgent a few hours before SLA is breached to ensure other agents handle the request.

    You can find more information here: https://support.zendesk.com/hc/en-us/articles/204770038-Defining-and-using-SLA-policies-Professional-and-Enterprise-

    0
  • Heather R
    Comment actions Permalink

    Sorry, what is it about Automations that doesn't work for you please? I must be missing something!

    0
  • Sara Taylor
    Comment actions Permalink

    I would like to create an "Out of Office" checkbox as a custom User Field, which we would use on the Agents' users. Then a Trigger could send an out-of-office email to the current user when that person comments on a ticket assigned to an out-of-office Agent.

    However, User Fields are only available in Trigger conditions for "Requester: [custom field] is...". I'd love to log a feature request for a Trigger condition of "Assignee: [custom field] is..."

     

     

    -----------------------------------------------------------------------------------

    Author of The Grandmaster of Demonic Cultivation Manga

    0
  • Brett - Community Manager
    Comment actions Permalink

    Thanks for sharing your feedback Sara! I would also recommend cross-posting this in our Support Product Feedback topic which will help provide visibility to our Product Managers in charge of this feature.

    Thanks again!

    0
  • Adarsh Shet
    Comment actions Permalink

    Hi,

    Is there a way can we create trigger/automation/macro, when a new tag is added(let say 'Urgent') an automated mail will send to an assignee that the ticket is escalated/need attention.

    Thanks

    Adarsh

    0
  • Graeme Carmichael
    Comment actions Permalink

    Adarsh

    You can certainly do that using a trigger.

    Meets ALL of the following conditions

    • Tag>Contains at least on the following>Urgent

    Actions

    • Remove Tags>Urgent
    • Email User>Assignee (Then complete the subject and body of the email)

    In this example, an agent adds the tag 'urgent' causing the email to be sent to assignee. The tag also removed so that the next time the ticket is updated, no email is sent unless the tag is added again.

    Rather than use a tag, it may be easier to use a checkbox custom field. 

    For example, the check box could be 'Notify Assignee of update' and the condition would be be:

    • Notify Assignee of update>is> Checked

     

    0
  • David Richardson
    Comment actions Permalink

    Is there a limit to the number of triggers at which performance starts to be impacted?  Due to complexities in the way we handle our customers and the various departments of our organization we are thinking it would take ~4,000-5,000 triggers to accomplish our routing needs.  Also a percentage of these would been to be updated on a daily or twice daily basis (~25%).   We are concerned if this will have any impact to the over all system.  I am starting to look at a possible alternative that uses Web Hooks that notify an API we create when a ticket is created, so that we can use our existing security/scheduling/workflow system to determine the proper agent(s) to route the ticket to and route it via an API call back into ZenDesk.  Does this sound like it would be something that would be feasible? 

    0
  • Heather R
    Comment actions Permalink

    Hi @David,

    The highest number of Triggers I've used is 500 with no impact.  However, I would definitely steer you towards creating an app rather than all those triggers.... 

    0
  • Josie Conijn
    Comment actions Permalink

    Hello, 

    We are looking to use the new ccs function (not followers) to handle disputes. 

    When a ticket with certain attributes come in, we'd like to automatically add an end user to the ticket and use notify targets to send a message to both parties. 

    I'm looking at our triggers in Sandbox and I can't see an action option which is add cc, just add follower. 

     

    Is it possible to do this?

    Thank you!

     

    Edit: I found a potential workaround in a comment here: https://support.zendesk.com/hc/en-us/community/posts/203422496-Add-end-user-as-CC-via-Trigger-or-Automation?page=15#comments
    Will the comment from John fit what I'm after?

    1
  • Heather R
    Comment actions Permalink

    @Josie,

    Great find on that comment! I haven't tried that one specifically but yes that should work.  For our needs, we wanted *all* tickets for an Organization to get a certain end user CC.  We followed a different recipe which I can't seem to locate right now but essentially we:

    1. Created a custom field for our Organizations for "CC User on All Organization Requests"

    2. Any account that wants this functionality sends us the email they'd like added there. 

    3. We set up a new HTTP Target (Admin -> Settings -> Extensions) Add Target:

    Title: Add Org CC

    URL: https://YOURSUBDOMAIN.zendesk.com/api/v2/tickets/{{ticket.id}}.json+?ticket[collaborators]={{dc.extract_cc_mails+|+prepend:','+|+prepend:ticket.organization.custom_fields.cc_user_on_all_organization_requests}}

    Method: PUT

    Attribute Name: value

    4. Add a trigger with the conditions, When the Organization is ABC Corp and the cc_user_on_all_organization_requests field is PRESENT

    Ticket is Updated OR Created

    Ticket contains none of the following tags: auto_cc_org

    Then Notify Target

    And ADD TAG auto_cc_org

    (Checking for and adding a tag for your trigger is important to avoid the trigger running a hundred times before timing out and otherwise just causing havoc on the back end).

    ---

    I found another GREAT recipe that's more detailed than mine and the comments are golden in addition to the tip itself: https://support.zendesk.com/hc/en-us/community/posts/216284948-Auto-CC-user-s-on-Condition-Ticket-Create-

    ---

    Hope this all helps! As always, make sure to test and keep an eye on things, any change to your instance should be monitored closely!

     

     

    0
  • Shakti Bhardwaj
    Comment actions Permalink

    I am having issue creating a trigger having Subject text "Contains the following string" DOC Backup: Complete 

    when i click on create it shows error unsaved next to it as in picture.

     

    0

Please sign in to leave a comment.

Powered by Zendesk