Hyperlink in internal comment by automation

Answered

9 Comments

  • Andrew J. Mills
    Community Moderator

    Have you tried just https://mylink..com etc?
    If that doesn't work, try markdown. Ie. [My link text](https://mylink..com)
    I'm not 100% sure I have the right syntax there, but search markdown in Zendesk and you should find it.

    0
  • Florian W.

    Hi Andrew,

    thanks for your quick response. Now it's working well with this solution:

    [My link text](https://mylink..com)

    0
  • Peter Hochstrasser

    Hmm. What exactly do you intend to happen with "ticket[comment][public]" or "ticket[comment][body]"?

    In the API docs, you see how to create a ticket comment:
    https://developer.zendesk.com/rest_api/docs/support/ticket_comments

    You would need to create the ticket comment with a JSON payload in the Notify Target, and you need to make it private upon creation (by specifying "public" : "false" in the payload), since there is no way you can retrieve the ID of the comment you just created and use that later on in the trigger.

    Sorry, no time to check myself, but you would need to specify something along these lines here:
    As you see, we defined a target to update some fields in tickets, namely, set the organization (since we have actors from multiple organizations with different main organizations sending tickets to this account), set the requester (always the helpdesk of the party responsible, not once this, then that, or probably another person), and finally fill our "Affects Version(s)" field with the currently running version of our software at that customer. This is all on the ticket, though.

    Select a HTTP target, specify the URL to be

    https://{subdomain}.zendesk.com/api/v2/tickets/{{ticket.id}}.json

    then, add not a message text, but a JSON definition of the body, like

    {
    "ticket": {
    "comment": {
    "body": "The smoke is very colorful.",
    "public": "false"
    }
    }
    }

    I did not try this, but, if you add the HTML to the body above, this might actually work.

    yours truly

    Peter

    0
  • Andrew J. Mills
    Community Moderator

    Peter, I think your method is the http target, Florian is using the older url target.

    0
  • Andrew J. Mills
    Community Moderator

    We should probably mention that both of these methods are unsupported and not recommended for updating tickets. Because in some cases it can cause race conditions and unpredictable behavior.
    Generally as long as there are no other triggers likely to come into play, it isn't likely to create major issues with a private comment only.

    0
  • Florian W.

    Peter, it's exactly as Andrews mentioned. I used a url target here, which still works well (although I'll need to update the old targets somewhen).

    Andrew, you're right and I know these methods is not supported, but Zendesk does not provide any other solution. So what should we customers do then? :-)

    0
  • Peter Hochstrasser

    As Florian W. points out, lots of targets get used solely because of certain unexplicable asymmetries of the Zendesk Trigger language features, like

    - can get organization of ticket, but cannot set

    - can set Skills, but not get

    Not an asymmetry but a hinderance is the complete unavailability of a method to get a text from the body of a new comment or ticket, say by regex, and then insert it into another field.
    My example in this area: We have light agents, and they post that they fix a problem in JIRA Issue "https: ...../<Ticket ID>". Since I cannot get the "https://....<Ticket ID>", I have a trigger that checks if the "JIRA Issue" field is empty, but it finds the "https://....", then notifies me that I have to play regex parser and copy the link to the "JIRA Issue" field.

    I truly wish Zendesk would allow some more flexibility there!

    It is not my greatest joy to find circumvention solutions for gaping holes in the capabilities of Zendesk, I'd rather use what is there - but if it ain't...

    Yours truly

    Peter

    0
  • Andrew J. Mills
    Community Moderator

    No worries. Zendesk have never prevented the method, it's just they don't officially recommend it because of the possibly of issues. Basically updating tickets via a method that triggers when you update tickets is fraught with potential hiccups.

    0
  • Florian W.

    Well Andrew J. Mills maybe it's the time that Zendesk gives us a great or better possibility to run ticket  updates on a Zendesk based solution instead of the http targets (--> Webhooks).

    0

Please sign in to leave a comment.

Powered by Zendesk