Can I configure a trigger to add a comment to a ticket?

Return to top

78 Comments

  • Dave Jensen

    It is really surprising that this functionality doesn't exist. Just curious, for those who are using a target/trigger combo to have an internal ticket created - are you able to share a step by step guide on how you're doing this? I a looking into whatever ways I can get an internal note added that displays the text used on emails to requester we send out via trigger.

    0
  • Lou
    Community Moderator
    The Product Manager Whisperer - 2022

    This user tips and tricks explains the comment part farther down in the article:

    https://support.zendesk.com/hc/en-us/community/posts/4409515208346-Automated-follow-up-comments-for-Pending-tickets-public-or-internal-

    I use it VERY often and it works great.

    0
  • Richard Pixel

    It is very disappointing to see, that this functionality not only hasn´t been natively within Zendesk, but to see how many people are requesting it, and no change is being made. 

    0
  • Sandro Araujo

    there is indeed a method from Zendesk itself to insert public comments in tickets via trigger, they even posted here in the answers 90% of what needs to be done for this comment to be public.

    but yes, it is possible to insert public comments in the ticket using triggers.

    and has nothing to do with URL, we achieve such action using target notification.

    0
  • Dave Dyson
    Zendesk Community Manager
    HI Sandro,
     
    The issue is that using a trigger to do this is not entirely reliable – it's possible that race conditions could result in the ticket not being updated with the comment, or in the comment trigger preventing a different trigger from completing its operation, and there isn't any way to predict if or when that might happen. 
    0
  • Sandro Araujo

    Hi Dave, how´s life?

    but on what aspect would it not update? We have triggers working this way, inserting public comments into tickets, without any harm to the flow.

    it's a native solution of yours, I don't understand how you still haven't noticed.

    often the solution to very complex problems lies in absurdly simple solutions. Have you ever heard about it?

    0
  • Matt Taylor

    Is it possible to use standard HTML formatting with notify targeting?

    ie. if I wanted the response to contain a hyperlink

     

    0
  • Tom Rees

    Does anyone know of a way to get this working for a Whatsapp ticket that is on messaging to message the customer?

    0
  • Gabriel
    Zendesk Customer Care
    Hi Matthew,

    This can be achievable, but we do not recommend this! The reason is addressed in the following article with more details (Webhooks use the same concept as HTML/Targets): https://support.zendesk.com/hc/en-us/articles/4408882855578-Can-I-use-a-trigger-and-a-webhook-to-update-tickets-

    Thanks for your comprehension! 

     
    0
  • Keiran Rice

    This really would be so useful in so many different usecases!

    0
  • Eden Davis

    +1 We need this ability. In general, we need more specific features to have mirrored functionality. If it can be done in a macro, it should be be possible to do it in a trigger, or automation, and so on and so forth (without the need to get involved in URL targets, business rules, etc.).

    0
  • Dylan Walker

    Lou 

    Do internal comments from triggers always post as the Zendesk user who created the trigger?  Is there a way to change that user?  We have a working api call to post an internal comment but I can't seem to find anything tying it to the person it's posting as.  That person is no longer with us so we are trying to update.  Thanks.

    0
  • Lou
    Community Moderator
    The Product Manager Whisperer - 2022

    Dylan Walker

    The comment will post as whoever's authentication is used for the trigger. All of mine are set up with my credentials, so they always show up as my comments. It's always fun trying to explain to the VP that I didn't do that LOL

    0
  • Dylan Walker

    Lou

    Forgive me but where do you see the authentication in trigger settings?  I see it in targets but it looks like we moved everything over to webhooks.  I tried recreating the trigger when signed in to my account but it still ended up posting as that old user.  Really appreciate the guidance.

    0
  • Lou
    Community Moderator
    The Product Manager Whisperer - 2022

    Dylan Walker

    The authentication is at the target/webhook level. I use my login credentials for authentication. That's why the various actions show up as having been performed by me.

    0
  • Udo

    +1 we need this option!

    How we would like to use it:
    When we put a ticket to status 'pending' we will use automation to send a reminder to the client. but after X times we would like the automation to 'solve' the ticket AND add the comment that we solved it because we tried to reach out for several times but failed to get their attention.

    Now the tickets will be 'solved' without a comment. 

    0
  • FAT (Fabian)

    +1 for such a feature

    We do use an API target to send messages to customers using triggers - which works pretty fine in general. The main issue is, that this trigger fires not a message but a dynamic content - we have this message in 6 languages. And no matter which language the customer has, it's always send in EN (default language).

    Due to ZD support this can't be changed - therefore using an API target does not work :-( Anyone having an idea how to solve that? I'm not a fan of using "email user" action as I can't see this mail in the ticket and for the customer it's send as seperate mail and not in the ticket thread.

    Any input would be appreciated - and of course especially if ZD can implement this feature ;)

    0
  • Chris Curlett

    Hey all. This is totally doable, though you have to do it through API. 

     

    First, set up a webhook. Select PUT. There are two URLs you can use.

    Option 1:

    https://[domain].zendesk.com/api/v2/tickets/update_many.json

    or

    Option 2: 

    https://[domain].zendesk.com/api/v2/tickets/{{ticket.id}}

     

    Then, set up your Trigger. Add an Action to "Notify Active Webhook". Then depending on the URL you used, use one of the following JSON Bodies:

     

    Option 1:

    {
      "tickets": [
        {
        "id": "{{ticket.id}}",
        "status": "open",
        "comment": { "body": "[type your comment here]", "public": false }
        }
      ]
    }

     

    OR

     

    Option 2:

    {
    "ticket": {
    "comment": { "body": "[type your comment here]", "public": false }
    }
    }

     

    It's pretty lame Zendesk doesn't have a built in Action for this, but I use the two methods above a bunch and it works great. There are lots of articles that cover how to set up a webhook and your API token, so I won't repeat it here. 

     

    Notes: Option 1 is great if you want one ticket to send a comment to one or more other tickets. You can replace "{{ticket.id}}" in the JSON body with a placeholder for a field in your ticket that lists a ticket number (for example, if you are targeting a Parent ticket and you have a parent ticket ID field). If you want to target multiple tickets, the field should list all of the ticket numbers, separated by a comma.

     

    Option 2 is the most straight forward if you want an action to trigger a comment being placed in the same ticket. Using the target "https://[domain].zendesk.com/api/v2/tickets/{{ticket.id}}" is literally just pointing back to the same ticket that tripped the trigger. 

    Replace "public": false with "public": true if you want this comment to be Public and sent to the Requester. 

    In your body, you can also use placeholders if you want to grab information from fields in the ticket. 

    There are lots of formatting options you can reference, such as surrounding text on both sides with ** will make it bold, or using \n will create a new line, etc. 

     

    I hope this helps!

    1

Please sign in to leave a comment.

Powered by Zendesk