Convert Public Reply to Internal Note

10 Comments

  • Joey
    Comment actions Permalink

    Hi there Dave-

    To get the comment id, you would want to use this endpoint: https://developer.zendesk.com/rest_api/docs/support/ticket_comments#list-comments

    That being said, a trigger action probably isn't going to fit the bill for you here. How are these tickets created to begin with, and what's the overall reason/goal for doing this?

    0
  • Dave
    Comment actions Permalink

    Hi Joseph

    These are internal transfers and escalations that come in via email from groups that don't use Zendesk. Currently, our agents need to manually convert those initial emails to internal notes so they don't get shared with the end user when we contact them. I'm looking for a way to automate that process.

    We already have triggers set up for these types of tickets for routing, tagging, etc., so that's the approach I was looking at. But if there's a better way to accomplish this, I'm all ears!

    Thanks!

    Dave

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Dave. Could this be what you're looking for? Sounds like you need that first comment to be private...

    Admin > Settings/Tickets

    Adjusting your business rules to handle private tickets

     

    0
  • Dave
    Comment actions Permalink

    Hi Brian

    We've already got that setting enabled.

    How would I go about converting the first comment on certain tickets -- but not all -- to private? 

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Dave. This can be done in an automated way using the PUT /api/v2/tickets/{ticket_id}/comments/{id}/make_private.json API but will require some coding.

    The API needs both the ticket ID and that first comment's ID before converting the comment from public to private.

    While you can convert a single comment from public to private at a time from within the Support agent's interface (by clicking on "Make this comment an internal note" in Event view), there's no UI level functionality to do this in bulk. Hope this helps!

    0
  • Dave
    Comment actions Permalink

    Bryan - Community Manager - Thanks.

    I get that part. But how would I get the ID of the first comment? There doesn't seem to be a placeholder for that.

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Apologies for not seeing that point earlier Dave -- you can use the GET /api/v2/tickets/{ticket_id}/comments.json API to get ticket comments. Each comment returned will have an "id" attribute. The first one returned (index 0) is the ticket's first comment.

    You would then make a PUT call to /api/v2/tickets/{ticket_id}/comments/{id}/make_private.json to make that comment private (replacing {id} with the ID of the desired comment returned by the previous GET /api/v2/tickets/{ticket_id}/comments call).

    0
  • Dave
    Comment actions Permalink

    Bryan - Community Manager - Thanks. How can I put that all together in a trigger? I thought that a trigger was a one-time, one-way thing (information is sent to the API, and the API then does stuff to the ticket).

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Correct, this is all API implemented.

    Triggers do not directly support changing this comment attribute. You could create an HTTP target (basically a third-party web hook) that a trigger calls that then sets the ticket's first comment to private. It would, however, require a remote service that you host and maintain. There is also the limitation that the HTTP target is authenticated using Basic authentication (which may not be considered secure enough in some circumstances).

    0
  • Peter Hochstrasser
    Comment actions Permalink

    Tough luck - I would need exactly this functionality.

    Use Case: Some kind of special entries to the ticket (billing records), created by an agent (staff/administrator member), not a light agent.

    Ah well, so I will have to write another API program to periodically scan for that kind of comments and change them over to private. Too bad, really.

    0

Post is closed for comments.

Powered by Zendesk