Learn how to order your triggers

Have more questions? Submit a request

9 Comments

  • Christina Libs
    Comment actions Permalink

    Post your question, suggestion, or idea about this article here in the comments!

    0
  • ES
    Comment actions Permalink

    If a triggered is triggered, is the ticket updated *before* the next trigger is checked? The text and diagram in [1] seems to suggest this is the case.

    If so, I wonder if we could solve for [2] by making the webhook trigger be the last trigger in the list. If the last trigger on the list only sends a webhook for new tickets, and does not modify the ticket in any way, could we imply that when we receive the webhook, the trigger cycle has concluded for the ticket?

     

    [1] https://support.zendesk.com/hc/en-us/articles/203662246-About-triggers-and-how-they-work

    [2] https://support.zendesk.com/hc/en-us/articles/234658247-Can-I-use-a-trigger-and-a-target-to-update-tickets-

    0
  • Matteo
    Comment actions Permalink

    Hello,

    For point 1, you are correct, just keep in mind these 3 points:

    1. Triggers fire as a consequence of a ticket update. This fact should always be kept in mind when creating or debugging any triggers issue.
    2. When a ticket is updated, the system checks triggers for a match in a sequential order, from the top of your trigger list, to the bottom.
    3. When a match is found, the system checks the triggers once again from the top of the list, this time skipping those triggers that have already fired.

    For point 2, theoretically, the scenario you propose could potentially work, but it won't save you from potential racing condition issues or inconsistent results/behaviours, which is why the workaround itself is prone to errors.

    The main points to consider are:

    • A ticket could loop through the trigger list several times for a single ticket update.
    • A trigger can be checked several times during a cycle, [...]

    I would recommend testing these types of workaround very carefully before considering a production use, and also utilise them for small updates, for a long period, and monitor the success rate. In case of failure, this should be considered a foreseen side-effect, and not a product-related malfunction.

    Hope this helps!

    0
  • ES
    Comment actions Permalink

    Matteo thanks for the reply. Can you be more precise as to when the trigger cycle loops back?

    - Is it when a trigger's conditions are met?

    - Or is it when a trigger's conditions are met AND the ticket is updated? - For example, if the action is sending a webhook, one would think that that is not the same thing as updating a ticket.

    Your comment suggests the first point is what happens, but https://support.zendesk.com/hc/en-us/articles/203662246-About-triggers-and-how-they-work makes it seem like it's the second point ("If a trigger updates a ticket during the cycle, the cycle starts over").

    0
  • Matteo
    Comment actions Permalink

    Hello,

    No problems at all.

    I understand the confusion defining what "update" means.

    Both your statements are correct, but they need to be considered together: if conditions are met > a trigger fires > an update occurs (notify a user, setting up a tag, firing a target, etc) > start over

    Hope this helps!

    0
  • Kristin Bouveng
    Comment actions Permalink

    Thanks Matteo for this useful article.

    One thing I was looking for which bugs me a bit, is how to change the order of triggers that are on page 2. I can't seem to get them any higher than to top of page 2... 

    And there have been cases where I need newly created triggers (which goes to the bottom of the list at first) to be higher up in the trigger order.

    0
  • Fred Thomas
    Comment actions Permalink

    As helpful as these tips are, they ultimately are workarounds to address a lack in software functionality. I would really like to see a native option to fully organize triggers!

    Doubly helpful if that when "sorting" the list, you don't lose the ability to drag a trigger/group of triggers into desired locations- relative to the sorting applied.

    There are so many optimizations to the handling of triggers that could be had! As a Zendesk user with over 8 years of experience, it pains me that this area of the product receives so little love, especially considering how much of a core element it is to the Zendesk product.

    0
  • Devan
    Comment actions Permalink

    Hello Fred Thomas,

    Regarding product limitations and the desire to see improvements in these areas, I would recommend posting your thoughts in our product feedback forums. That way, our developers can consider your ask for future updates. 

    Best regards. 

    0
  • AlexeyZuev
    Comment actions Permalink

    Kristin Bouveng I don't have pages in the trigger list (I don't have many), but in your case I would play with deactivating/reactivating the triggers to accomplish that.

    0

Please sign in to leave a comment.

Powered by Zendesk