Trigger conditions and actions reference

Return to top
Have more questions? Submit a request

86 Comments

  • Oumou Doumbia

    Hello Jonathan,

    Our organisation has 2 instances : customer service and return department

    CS send us tickets by sharing them to us. I want to catch tickets with specific terms in order to put a tag on them. These tagged ticked will be on different views set for each tag.

    I want to catch tickets with terms ''return'' to put tag ''missing refund'' and ''Look'' to put tag ''bin lookup''

    I've already created both views and tags. But tickets are not being tagged so far.

    0
  • Jonathan March
    Community Moderator

    I don't have experience with multiple instances, but I don't think that ZD supports tags with spaces in them (and even if it does somewhere, I would strongly recommend against this practice). Use the underscore character between words instead.

    Does this help?

    0
  • Oumou Doumbia

    This is how I created them ''missing_refund'' and ''bin_lookup'', in ''tickets fields'' first.

    After that, in the trigger, as action I put ''Tag''. see below screenshot

    0
  • Oumou Doumbia

    Is there someone familiar with multiple instances that could help me?

    0
  • Ben Van Iten
    Zendesk Community Team

    Hi Oumou Doumbia,

    I'm confused on the action in the trigger. Is that a custom field that you've added? In theory if you are going to have a trigger take an action related to a tag there would be these three choices:

    After you select one, it should render as "Add tags" not just say tags.

     

    0
  • Darylle

    Hi, Is there a way to use the Help Center article ID as a condition?

    0
  • Brett Bowser
    Zendesk Community Team

    Hey Darylle,

    Triggers will only look at the ticket or user information once a ticket has been created/updated. There's no way to have a trigger look at the article ID at this time. What exactly are you trying to accomplish by using the Article ID?

    Let me know if you have any other questions!

    0
  • Darylle

    Hi Brett, I am looking at a way to set up an automation to autosolve and send an auto reply to all customers who replied to a CLOSED ticket from a specific Help Center article. I was able to do a workaround by creating a unique tag to be added to the specific Article ID. 

    But another issue arise wherein customers still reply to a CLOSED ticket via email from an old Help Center article which is now unpublished and I would like to send an auto reply to reports from that article ID basically telling them to visit help center. I can no longer do the "tag" workaround because it will only apply to new tickets and not retroactively.

    0
  • Brett Bowser
    Zendesk Community Team

    Thanks for the additional information Darylle! I'm going to get this added to our Weekly Digest to see if others may have an alternative solution for you.

    Cheers!

    1
  • Mark

    Is there any way for me to create a trigger that looks for exact text of the entire comment text?

    My case is as follows:

    When users reply to a SMS with "STOP", Twilio will no longer send SMS messages to that user (unless they send the message "START"). I added a "Unsubscribed from SMS" checkbox to the user field and will run other triggers based off of that.

    I created a trigger that will check the box if a user sends a text message with "STOP". However, I only want that trigger to run if "STOP" is the entire message. 

    The way it's set up now, the trigger will also fire if the user sends "STOP abcdefg".
    I tried adding a condition where the comment text does not contain a space, but that seemingly has no effect.

     

    0
  • Jonathan March
    Community Moderator

    Hi Mark,

    Sorry, there's no way to do this directly in Zendesk. If you have the programming capacity, you can use an approach similar to the following:

    • Trigger fires on relevant candidate tickets, and notifies a URL target
    • URL target runs a tiny script on your servers
    • Script uses the Zendesk API to check whether your special condition has been met, and set one of two tags on the ticket (e.g. "stop_detected" "no_stop_detected").
    • Another trigger detects the "stop_detected" tag and performs the desired actions.

    Note that this workflow is not officially supported by ZD because it may occasionally fail due to race conditions as described in this article: https://support.zendesk.com/hc/en-us/articles/234658247-Can-I-use-a-trigger-and-a-target-to-update-tickets- 

    0
  • Joshua Bentley

    Is there a way to get the trigger to look for line breaks? For example, we have a feedback option in our app and it just starts a new email with pre-populated information that we need from them. The email reads something like this:

    Please provide us with the following information.

    Access Code:

    Clinic:

    We have a lot of users that hit the feedback button then hit Send without filling anything additional in. I'd love to be able to set a trigger up to catch these "blank" emails and send a reply asking if the user still needs help.

    My issue is figuring out how to tell the trigger to look for incomplete emails. If I tell the system that the string must contain "access code: clinic:", will it detect the above example?

    0
  • Ray Roth
    Zendesk Customer Advocate

    Hello Joshua!

    Unfortunately trigger conditions can only look for what is present in comment text, not what is missing. So you would only be able to have a trigger find a specific text value in the comment text and you cannot use blank spaces as a value. Using the string "access code: clinic:" will not work because of the line breaks. There isn't a native way to automate finding these gaps.

    Cheers!

     

    1
  • Joshua Bentley

    Thanks, Ray Roth. I figured that was the case, but wanted to see if there was any magic I wasn't aware of. As a solution I've requested that we move to using a fillable form with required fields instead of just an email.

    0
  • Steve Starzyk

    I'd like to have a trigger run when a ticket is changed to Solved, and then 3 days later an automation runs to change the status to Closed, at which point I'd like another trigger to run.

    What is the difference between do "Status IS Solved" versus "Status CHANGED TO Solved"?

    Same question would apply to Closed. Why would I use "changed to" instead of "is", or vice versa?

    Thanks!

    0
  • Beto
    Zendesk Customer Advocate

    Hi Steve!

    "Changed to" is useful when you want your Trigger to fire only when the status has changed on that specific update. "Status is" can be used even if the status has not changed. For example a comment may be added to the ticket, but nothing else changed. You could test the value of the status using "is" to ensure that the status is still solved.

    For your specific case, the Triggers might benefit from using the "changed to" condition but the automation can only use the "is" condition (or "is not" and the "less/greater than").

    I hope that helps!

    0
  • Harrison Meesschaert

    Hi!

    We have a trigger set to notify an end-user when a public reply has been made on their open ticket. This trigger is obnoxious for Social Media responses since it's far more conversational than our email team.

    I was hoping to use the "Update via" condition to prevent the trigger from activating for our Social Media channels but when I test out the functionality it doesn't seem to work as expected. In contrast, when I use the "Channel" condition it will prevent the trigger from activating. That being said, "Channel" does not work in this case since we may have Specialists who will be responding via email in the same Social Media ticket, and we would want those emails to activate the trigger.

    I put "Update via is not Twitter DM" but the trigger still activated. When I put "Channel is not Twitter DM" the trigger did not activate and prevented the trigger from activating when an email was sent from the same ticket. From the above definition it seemed like "Update via" should have functioned like "Channel" but only for the individual responses, not for the creation of the ticket.

    Am I barking up the wrong tree?

    Thanks!

    0
  • Jorgen Linde

    I'd like to create a trigger that emails a user when a ticket has aged 30 days from create date without being closed.

    I do not see any way to get the desired Aging condition evaluated in the trigger.

    Is there a way to do that?

    0
  • Jonathan March
    Community Moderator

    Hi Jorgen,

    For this use-case, you would use an automation rather than than a trigger:

    https://support.zendesk.com/hc/en-us/articles/203662236-About-automations-and-how-they-work 

    Automations are similar to triggers because both define conditions and actions that modify ticket properties and optionally send email notifications to customers and agents. Where they differ is that automations execute when a time event occurs after a ticket property was set or updated, rather than immediately after a ticket is created or updated.

    0
  • JJ
    Zendesk Customer Advocate

    Hello Harrison Meesschaert,

    We need to investigate this further.

    I will take this into a ticket and you will hear from me shortly.

    0
  • Viktor Hristovski

    Hi All, 

    how would i create a trigger that reacts on when a drop down field has changed its value?
    I'd like to email people when the dropdown changes from A to B, or B to C etc... Thank you

    0
  • Dave Dyson
    Zendesk Community Team

    Hi Viktor –

    Currently there's no built-in way to do this. It may be possible to use tags to keep track of the former field value and then use a trigger for each value to check to see if it's changed by comparing the current/new value with the tag, but that could be difficult to maintain if you have a large number of field values.

    Can you add your use case to this Product Feedback thread? Feature Request: Add "Changed", etc, trigger test for custom Drop-down ticket fields

    0
  • Tomica

    There is one thing that I'm not able to find.

    I can't find a Condition that would understand if the last reply in the ticket is from an agent or from a customer. 

    I'm trying to set up an alert that would fire if the customer replies and the agent doesn't reply back for longer than x hours. However, not all Open tickets have the last reply from a customer as our workflow also allows tickets to stay in the Open status after the agent replies.

    I'm trying to use Automations for that, but can't find a way to compare agent replies vs customer replies.

     

    0
  • Heather Rommel
    Community Moderator

    Hi Tomica,

    I hear you! I wonder if one of these option in the automations would help? "Hours since requester update" or "Hours since assignee update".

     

    If not, I'm thinking you can get this working more precisely if you add 2 triggers that add/remove tags that you can use in the automation.

    • Create Trigger 1 for when an end user was last updater. Add a tag using the below, something like lastupdater_enduser
    • Create Trigger 2 for when an agent was the last updater. Add something like lastupdater_agent.
    • NOW MAKE SURE you also add "remove tags" and remove the opposite tag in each of the above triggers.

    You'll now be able to better use the automation "Hours since assignee update" + tag lastupdater_enduser.

     

    Definitely test this out a bit and let us know if it helps!

    0
  • Tomica

    Heather,

     

    The "Current user" condition was a missing part.

    Thank you so much.

     

    1
  • VICTOR

    Hello everyone,

    I'm having some trouble to set-up some conditions for a trigger to send notifications to Slack when a specific agent is mentioned on Zendesk. The agent's Zendesk alias is Ana, so I created some conditions to find private comments with comment text containing Ana. However, this trigger is also firing when words like manager or Canada are used in the comments.

    I tried to change the field comment text to "Ana", but then the trigger is not firing when agents mention her (using @Ana). Is there any workaround for this situation?

    0

Please sign in to leave a comment.

Powered by Zendesk