Question
What is the difference between the conditions Ticket > Ticket | Is | Created and Ticket > Ticket | Is | Updated in triggers?
Answer
- A trigger with the condition Ticket > Ticket | Is | Created fires when a new ticket arrives in your account.
- A trigger with the condition Ticket > Ticket | Is | Updated fires when an existing ticket is modified and the change is submitted.
If you want a trigger to fire, regardless of whether a ticket is created or updated, include both conditions under the Meet ANY of the following conditions section of your trigger setup.
For more information, see the article: Triggers: The importance of the 'Ticket is' condition.
10 comments
Dave Easey
I'm confused about the suggestion to add both Create and Update to the Any conditions.
What is the difference between doing that any not including either of them?
Isn't the purpose of this condition to restrict to one or the other of Create or Update? If a trigger should run in both cases then there would seem to be no need to add the condition.
From another support article:
Understanding when triggers run and fire
Every time a ticket is created or updated, all of your triggers run in a cycle against that ticket in the order the triggers are listed. A trigger will fire and update the ticket if its conditions are met during the cycle. A cycle is the entire process of a ticket being checked against all your triggers.
1
Jim
Hi Dave!
If you're going to add both trigger conditions "Ticket | Is | Created" and "Ticket | Is | Updated" under "Meet Any of the following conditions" section, it means that the trigger will still fire; regardless of whether a ticket is created or updated.
To add more context to this, if you add conditions under the section "Meet Any of the following conditions" in your trigger set-up; one or more of the conditions must be true for the trigger to fire. On the other hand, if you add conditions under "Meet All of the following conditions", all of the conditions must be true for the trigger to fire.
Best,
Customer Advocacy Team
0
Dave Easey
Hi Jim,
I think the point of my question is not clear.
1) This article suggests to add both Create and Update to the Any conditions.
So the trigger will fire if the ticket was created or updated.
2) In the other 'Understanding when triggers run and fire' article you say that 'A trigger will fire and update the ticket if its conditions are met during the cycle. '
From 2) if the trigger definition is comment added or check box checked (the examples in this thread) then the trigger will fire based on this condition.
From 2) it does not seem to be necessary to and Create and Update to the Any conditions for the trigger to fire.
Is this correct or am I missing something?
1
Jim
Hi Dave!
You correct! It isn't necessary to add both conditions "Ticket | Is | Created" and Ticket | Is | Updated" for the trigger to fire. You can either one of them under "Meet All" or "Meet Any, depending on your preferred workflow when you set-up a trigger. The above suggestions are just for the purpose of making sure that the trigger will fire, regardless of whether a ticket is created or updated.
Best,
Customer Advocacy Team
0
Chad Susa (Gravity CX - Zendesk Partner)
Hi All
Actually I've always wondered:
What happens if I don't include the: 'Ticket | Is | Created' or 'Ticket | Is | Updated' condition(s) to a trigger?
Does that mean the trigger will fire if the ticket is either Created or Updated, and therefor negates the need to add those conditions?
See below for a, hopefully, better explanation.
0
Andrei Kamarouski
@...,
You are right - without this condition, this trigger works at any event!
Updated event means the ticket is updated (excludes the first created event). Created - limits to the only first created event and not any updated event.
0
Emre Aktaş
Hi Team,
May i know what is the meaning and differences between "internal comment and ticket updated w/comment" ?
Thanks.
0
Andrei Kamarouski
Hi Emre Aktaş, let me explain. 🤓
Internal comments metric does count all unique private comments in tickets (aka internal notes).
Tickets updated w/ comment counts all unique tickets that have any comment (public or private).
0
Naomi Watnick
Andrei Kamarouski - Question, if I have additional conditionals that I need to add in the "ANY" section, would you recommend I just leave out the 'Ticket | Is | Created' or 'Ticket | Is | Updated' conditions? - or is there a way to have two separate "ANY" sections in a trigger now? I had thought this was in the works a while ago.
0
Arianne Batiles
Hi Naomi Watnick,
You can remove the Created/Updated conditions if you expect the trigger to fire at every update.
I created a ticket for us where we can continue to discuss your workflow and create the right trigger for you. Kindly check your email for updates. Thank you!
0