How does the Comment text condition work in business rules?

Have more questions? Submit a request

21 Comments

  • Bill Sammons
    Comment actions Permalink

    Is the check for the presence of the string case-sensitive?  Will a condition set as "hello" catch "HELLO" or "Hello"?

    0
  • Nicole - Community Manager
    Comment actions Permalink

    Hey Bill - 

    I did some testing and it does not appear to be case-sensitive, so a condition should catch all of it. 

    0
  • Jonathan Marra
    Comment actions Permalink

    how do i create a string for two words that show up in the same comment text?  IE.  This AND that function.  This is not a String but instead a user who spelled two words anywhere in the comment text.  

     

    Website AND down.  not necessarily "website down" but website and somewhere else in the comment he mentions down.

    thank you

    1
  • Justin Smith
    Comment actions Permalink

    Hey Jonathan,

    Justin here from the advocacy team.

    For that sort of trigger function you would want to use two separate Ticket Comment text contains the following words conditions in the All section of your trigger logic.  All items in the All section of the trigger need to be met, so if you create one condition with Ticket comment text contains: Website and another that is Ticket comment text contains: Down then both of those conditions would need to be met in order for that trigger to fire off.

    I hope that helps clear things up!

    0
  • Hamilton
    Comment actions Permalink

    Hello Zendesk,

    We have a few emails sent out with tags for each agent from a sperate system and these tags are included within the subject line, eg #ABCDE.

    Does the condition Contains none of the following words (separated by spaces) search for a phrase within words or only the words in their entirety 

    In essence, we want to know if this condition will recognise the phrase #ABC within the tag as we have multiple users with individual tags, but first 3 letters are the same, eg, #ABCDE and #ABCGH

    0
  • Justin Smith
    Comment actions Permalink

    Hey Hamilton!

    The condition Contains none of the following words (separated by spaces) is only going to search for the full word in its entirety.  So if you have the condition looking for ABCDE and you include ABCGH, the trigger will not fire off as that is not the exact word/phrase.

    Let us know if you have any other questions!

    0
  • Hamilton
    Comment actions Permalink

    Thanks Justin,

    This confirms my suspicions that we would have to include the tags of multiple agents instead of just part of the tag prefix.

    I'm sure we'll come up with a workaround but thanks for the answer

    0
  • Mat Guthrie
    Comment actions Permalink

    HI, 

    We get lots of FB Messenger tickets that start with "Get Started". Many of these contain no questions and this are just noise. However, some do contain questions in subsequent messages.

     

    If I create a trigger that close a ticket if the comment text contains the string "Get Started", if the customer then follows up with e genuine question will the trigger again close the ticket because the subject of the ticket is still :Get Started" even thouse the new comment is something different?

    Thanks

     

    Mat

    0
  • Jessie Schutz
    Comment actions Permalink

    Hey Mat!

    The first thing to note is that if you close the ticket, it will not re-open under any circumstance. So you'll want to make sure that you solve it instead.

    When you create your trigger, you should add an action that adds a tag, and then a condition that will only allow the trigger to run on tickets that DON'T contain that tag.

    So in your conditions you'll want to include:

    Tags > Contains none of the following > <your_tag>

    And in your actions you'll want to include:

    Add tags > <your_tag>

    The end result is that each ticket that arrived with "Get Started" in it 'your_tag' will be added, and the ticket will be Solved.

    If the user sends another message, the ticket will reopen, and the presence of 'your_tag' will prevent the auto-solve trigger from firing again.

    I hope that helps!

    0
  • Wesley Ethos
    Comment actions Permalink

    Is it possible to check for a newline character in the comment text?
    I've attempted the following:

    • \n
    • %0A
    • '\n'
    • /\n/



    0
  • Chad Ferguson
    Comment actions Permalink

    Hi Wesley, thanks for your question!

    I reached out to our product team for clarification on this and found that it is expected behavior that regular expressions will not work the 'Comment Text' field for Business Rules, so it is not possible to check for new lines/line breaks. 

    This is a really interesting idea, so it would be great if you could take a moment to post this feature request along with your use-case in our Product Feedback Forum so other customers can weigh in on your idea as well. 

    I hope this helps clear things up, but please let us know if you have any other questions.

    0
  • Sarah Sanders
    Comment actions Permalink

    I'm using Comment text: Contains at least one of the following words in a trigger that sets the priority of a newly created ticket. It keeps firing on tickets that didn't include any of the listed words & failing to fire on tickets that do.

    I've got the following listed under Meet ALL of the following conditions:

    • Ticket is Created
    • Comment text contains at least one of the following words - list of words separated by spaces
    • Tags contains none of the following - a tag unrelated to priority
    • Group is not - group that requested they manually select priority

    Nothing listed under Meet ANY of the following conditions.

    Actions:

    • Priority = Urgent
    0
  • Brett - Community Manager
    Comment actions Permalink

    Hi Sarah,

    I'm thinking we will need to take a look at a couple of ticket examples to determine what the cause is here. I'm going to generate a ticket on your behalf and follow-up with you in an email shortly.

    Once you receive the email stating your ticket has been created can you reply back to that with any ticket examples you have as well as a direct link to the trigger you created?

    Most likely I'll need account assumption if you could enable this using the instructions I provided that would help greatly :)

    Thanks!

    0
  • Noel S.
    Comment actions Permalink

    Hi team! 

     

    Is there any difference between "comment" and "comment text?" In looking up how to more efficiently use our triggers, I've seen a few references to "comment" and "comment text" in close conjunction with each other as though they were different things. Am I reading this incorrectly, or are there distinctions? 

     

    Thank you!

    0
  • Brett - Community Manager
    Comment actions Permalink

    Hey Noel,

    The Comment condition will allow for you to look for if the ticket comment Public, Private, Present (public or private), or Present, and requester can see the comment. The Comment Text condition will look for keywords within the comment or a string of words.

    You can find more information in the following article: Trigger conditions and actions reference

    Let me know if you have any other questions!

    0
  • Sy Sussman
    Comment actions Permalink

    Is there a limit to how many words I can include in "Contains none of the following words"? If I have a list of 20 words, will the trigger exclude all tickets that have any of those words?

    0
  • Nicole - Community Manager
    Comment actions Permalink

    Hey Sy -

    There's not a limit to the number of words, but there is an overall 65k size limit for a trigger, so you might run up against that.

    0
  • Sy Sussman
    Comment actions Permalink

    Hi Nicole. I don't understand what you mean by an overall 65k size limit. How would I be able to see the trigger's size?

    0
  • Brett - Community Manager
    Comment actions Permalink

    Hey Sy,

    I believe what Nicole was referring to is the character limit. Basically, if you're looking to list 20 words within this condition you shouldn't run into any issues :)

    Let me know if you have any other questions!

    0
  • Pablo Dominguez
    Comment actions Permalink

    What is the behaviour of the [Does not contain the following string] condition when the comment box was left empty? Always true or always false?

    I'm looking to detect tickets that get closed without a public comment to inform the user and this seems promising.

    0
  • Heather Rommel
    Comment actions Permalink

    Hi Pablo Dominguez,

    If the comment box was left empty, this will not trip the Contains or Does not contain the following string last time I tested.

    I have had to create a set of Triggers -

    1. Look for Status is Changed To Solved and "Comment... Is... Present, and the requester can see the comment". Add a tag like solvedwithcomment

    2. Create a Trigger that looks for Status is Changed to Solved and Tags do not include solvedwithcomment.  Make the action - Set ticket to Open. You can set a Private comment by notifying a target or simply send an email to the assignee to tell the assignee to update the ticket with a Comment and set the ticket back to solved!

    3. Update your Solved notification trigger to your Requester and have it look for the solvedwithcomment tag in order to fire off.

    Phew!

    If your testing shows that the [Does not contain the following string] works, please do post back!

    Sincerely,

    Heather

    0

Please sign in to leave a comment.

Powered by Zendesk