Create New Ticket With Two Comments

3 Comments

  • Greg Katechis
    Zendesk Developer Advocacy
    Hi Jackson! There is no way to accomplish this with one API call. You would need to create the ticket first and then update the newly created ticket with the other comment in a second call.
    1
  • Stephen Belleau
    Community Moderator

    Jackson Atkins I don't believe this is possible 😞

    Per https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/ The Ticket Comments API has no endpoint to create comments.

    Comments are created with the Tickets API https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/

    which only accepts comment as an object, not array.

    Some thoughts:

    1. If the purpose is to remind agent about steps for a request type, perhaps you can create the Subject with a unique keyword/string for that request type. The Subject gets automatically searched with the Knowledge Capture app, which could return articles containing steps for handling this request type. Assuming you use Guide for internal knowledge.

    2. Otherwise, perhaps create the ticket with public comment and some kind of tag or custom field to capture type of request, and then use that tag/field to trigger a webhook update, or ZIS, or a custom ticket app to perform the private comment and/or apply a macro...

    1
  • Jackson Atkins

    Thanks for the responses. I thought this might be the case but I wanted to check and see if I missed something. Sometimes the API reference allows you to do things that are not documented. 

    What I'm planning to do then is create a custom field with the type of request. Then, I'll have a webhook fire on all new tickets. I'll read the custom field and have the bot post a private comment to the ticket based on the ticket type (basically your option 2). 

    I just wanted to make sure I couldn't handle it in one request before going through the trouble of implementing all of this.  

    0

Please sign in to leave a comment.

Powered by Zendesk