Adding Comments via Triggers and Automations

79 Comments

  • Hartmut

    Hi, 

    how could it be, that 3 people are commenting on a workaround for a missing feature, while the last zendesk update on the feature request itself

    https://support.zendesk.com/hc/communities/public/posts/203426696-Add-Assignee-Comment-in-Trigger-Action?page=1#community_comment_205588526

    was 4 years ago???

    And you will have to store a user + password of an agent/admin to the http target... so the whole thing will break if this user/agent changes his password or is suspended...
    And as mentioned you could create a loop and break your API...

    3
  • Phil Holcombe

    Thanks Jon. Just repurposing the idea from others.

    I do think the general approach ( using the API within triggers and automations) is more useful than people may realise. It does allow to work round limitations with triggers, in other scenarios.

    Phil @ Nexmo

    2
  • Jason Littrell

    @Jennifer CC notifications are independent from requester notification triggers, but they follow similar logic. If the comment is present and the user can see the comment, then the user will receive a notification. In your example, the comment is private so it won't be sent to CCs if they are set up as end-user profiles. If your the target URL includes `ticket[comment][public]=true` then the comment will be public, and all users should receive a notification.

    2
  • Andrew Moskowitz

    It seems kind of crazy that there's no way to add an internal note via trigger.

     

    Our use case: We send out automated replies to users based on a number of keywords and such. Currently, the only way that an agent would know that this was done on a ticket is 1) via a tag that gets added and 2) because the user seemingly replied to nothing.

     

    We would love if there was a way to add the actual text of the autoreply into the ticket as an internal note.

    2
  • Jennifer Rowe

    Love it. Thanks for posting your tip, Jay!

    Swag is on the way. Look for it in your inbox.

    1
  • Jessie Schutz

    Hey everyone!

    Sorry about the mix-up here. The short version is that I misunderstood the question Lisa, our Escalations Manager, asked me about this post, so I'm hopping in to clarify.

    What we're actually trying to communicate here is that this tip is providing a workaround that, while useful, isn't recommended by Zendesk. It uses features in a way for which they were not intended, which means there's a possibility that changes to the product that come down the line could break things on your end. If that happens, because it's an unofficial workaround, Support won't be able to help you fix it.

    If you do decide to use this tip, we just ask that you bear in mind that you're doing so at your own risk. Several users have implemented this tip with great success, and so I'm re-opening this thread for questions and further discussion. In the event that a future product change does cause a problem with this workaround, we want you all to be able to work together to come up with a solution!

    Apologies again for the misunderstanding. Please let me know if you have any other questions or concerns!

    1
  • Jeff Tan

    Looks like this only works if I update the notify requester of comment update trigger to use the placeholder {{ticket.latest_public_comment_formatted}} instead of {{ticket.latest_public_comment}}

    1
  • Phil Holcombe

    Steve,

    I might be missing something obvious here, but if your need is to add a workflow such as  reminding a customer that you are still waiting for their response, that is pretty easy to do with Zendesk Support. You can simply do that by having an automation that emails the requester, with the text you'd like, including elements like the subject, id, etc. You can even do some magic with liquid markup to do more programmatic tweaking.

    You don't need to be able to add a public comment to do that. 

    The only downside is that your agents will only see that the customer has been emailed, if they select 'events' in the ticket view.

    Phil

    1
  • Phil Holcombe

    Fair enough Steve, very good points. The easier workflow possibilities ( e.g. emailing the requester ) is definitely a compromise, in ways you outline.

    I believe that you're right, that the CCs are not going to receive the the notification that the requester has received an email.

    It would certainly be great if Zendesk provided the ability to add a public or private comment within triggers or automations. 

    1
  • Robert Smith

    Zendesk:

    Has there been any actually update about getting this in a trigger with Zendesk and not creating an API or adding a new app?

    Along with that, It states in the thread that this is not recommended by Zendesk..

     

    1
  • Rolf Guenze

    How do I create a automatic private comment when SLA's ticket is breached?

    Please, I'm newbie and need step-by-step to create the URL target and/or HTTP target and/or notify target in the triggers and automations.

    Thanks everyone.

    1
  • Jessie Schutz

    Hi Hartmut!

    It looks like one of our Product Managers has responded to your post in the article you linked in your comment. You'll be able to get your answers there!

    Thanks for the feedback!

    0
  • Phillip Greene

    This is adding a public comment for me. What would I change for it to be internal comment?

    0
  • Phil Holcombe

    Hi Phillip,

    Replace

    [Public]=True

    with

    [Public]=False.

     

    0
  • Phillip Greene

    Thanks Phil! I used #note before the message and that worked too, but yours will be cleaner. 

    0
  • Brandon Thomson

    I was having a lot of trouble making this work, turns out I needed to add my API token rather than an agent login in the username/password box.

    More details in one of the comments here:

    https://support.zendesk.com/hc/communities/public/posts/203426696-Add-Assignee-Comment-in-Trigger-Action?page=1#community_comment_205588526

    0
  • Jon Thorne

    Phil, you're awesome. That is all.

    0
  • Jay Hogan

    Hi Phil, thanks for your reply to me in the Add Assignee Comment in Trigger Action thread.  Would you be able to supply steps on how to set up the API on a Windows machine then use it to make calls?  I haven't had a chance to sift through the Zendesk API community yet so if you have references to useful articles with code snippets that would be great.  I also haven't written code in a long time nor have I set up an HTTP server (if that's required) so any steps/guidance you could provide to point me and anyone else in the right direction would be greatly appreciated.

    0
  • Phil Holcombe

    Hi Jay,

    Sorry, I'm not the best person to ask. I've done very little coding with Zendesk. Our workaround with the creation of comments is really a trick, avoiding the need for apps. 

    It just uses the http target to point Zendesk back towards itself.

     

    Regards,

    Phil

    0
  • Jay Hogan

    Ok, that sounds easier than I thought.  I will give it a shot and if it makes sense, I'll post in this thread the steps I did to set up an automated public facing comment for tickets in a Pending state after x business hours and include any articles I used.  Thanks again.

    0
  • Jennifer Rowe

    That sounds good, Jay! Please do report back if you get it to work. And if you post your steps in an article in Tips and Tricks I can send you swag. :)

    0
  • James Q

    Ive got this working using my username and password under authentication, but how do i use it with a token rather than my user details?

    0
  • Jay Hogan

    I just created a Tips & Tricks entry on how to Create automated public follow-up for tickets in a Pending state.

    @James, I had token access enabled.

    0
  • Serge Payette

    Great tip Phil, thanks !

    0
  • Andrea Brown

    I'm having real trouble making this work. Where do I add the Attribute Name? I'm sorry if this is a ridiculous question - I'm definitely no programmer!

    0
  • Serge Payette

    @Andrea,

      The Attribute Name has to be inserted in the field on the right side, see the circled section on the below picture for details:

    Hope this helps

    Serge

    0
  • Andrea Brown

    Perfect, thank you! I was attempting to add it as an HTTP target and not a URL target. 

    0
  • Eric Taylor

    Hi Phil,

    When I'm trying to make a Trigger to add a private comment to the ticket, it's simply adding the customer's comment as private and not adding the comment I want.

    Here's what I'm trying to accomplish:

    If a customer creates a ticket from our web form and a custom field is present, then a private comment is added to the ticket (and the message is a hyperlink to our admin page).

    Again, it currently is taking the customer's comment and making it private when the customer creates a ticket from our web form and a custom field is present instead (and my Trigger message doesn't show).

    Any thoughts?

    0
  • Eric Taylor

    Thanks for reopening this, Jessie! 

    I'll go back to my issue then. I'd like a customer to write in as a public comment. If they have a custom field filled out, then I want to use this trigger to add a private comment to the ticket with the info from the custom field.

    Right now it's taking the customer's first public comment and simply making it private (and my "Description" text from the Trigger I set isn't showing anywhere). 

    0
  • Eric Taylor

    Hi Phil,

    I wanted to add some screenshots for more context.

    1. A user emails us through our submission form and enter a value in one of our custom field ids
    2. Their submission should come in as a public comment 
    3. If there is a value in the custom field, I'm adding a tag to the ticket
    4. Then a Trigger will look for that tag. If the ticket has the tag, it should add a Private comment to the ticket (separate from the initial Public comment) with the value from the custom field. I'm going to take this value and add it to a URL for our admin database to search for the order, creating a hyperlink for our agents to easily search for an order number

    Is this possible with your Target?

    0

Post is closed for comments.

Powered by Zendesk