Adding Comments via Triggers and Automations

79 Commentaires

  • 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
  • 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
  • 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
  • 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
  • Jennifer Rowe

    Love it. Thanks for posting your tip, Jay!

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

    1
  • 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
  • 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
  • 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
  • Phil Holcombe

    Hi Eric,

    I see no reason why this shouldn't work, but the fact that you're asking makes we suspect you've run into problems.

    We are aware that this approach isn't 100% reliable, with sometimes the trigger not correctly adding the Comment. Our suspicions are with the timing of events, but efforts with Zendesk support didn't yield a convincing solution.

    Phil

    0
  • Eric Taylor

    Thanks Phil. I was able to get this to work; however, when the private comment is posted it automatically sets the ticket to Open. Is there a way to keep the status as new when the internal comment is added through the URL or API? https://company.zendesk.com/api/v2/tickets/{{ticket.id}}.json?ticket[comment][public]=true

    0
  • Phil Holcombe

    Eric,

    Might be tricky. I'm not aware of a way of doing this through the same API call. You could set the trigger to also change the status, but I imagine the API call you're forcing will probably happen after that status change, so will undo it.

    A bit hacky, but you could also try setting up a trigger to react to the creation of that internal comment, and have that trigger set the status to what it should be?

    Phil

    0
  • Eric Taylor

    Does this help seeing what I'm doing? First I look if the customer "Order Number" field has anything in it and tag it.



    Then if a ticket has that tag on it and preform your Private Comment trigger.

     



    The hyperlink I add goes to our database correctly, but I just want that status to stay New so the tickets are in our Unassigned view.

     

    0
  • Phil Holcombe

    Eric,

    Did our comments "cross"?

    Phil

    0
  • Justin Hamilton

    Hey Eric, what you're trying to do with the triggers/internal comments is of interest to a lot of people, so I've been following along, but I can't help but chime in and mention that you could provide this functionality for your agents in a much easier way.

    Just install the "User info links" app, and under Settings >> App Configuration, paste the following (customize to your use case, add more links to the json array if you'd like). Boom, done! 

     

     [

      {
        "title": "Look up order in admin",
      }
    ]    
    0
  • Eric Taylor

    Hi Justin,

    Thanks for commenting! I don't see "User info links" under Zendesk Apps. Is it called something else?

    0

Cette publication n’accepte pas de commentaire.

Réalisé par Zendesk