How to import tickets into Zendesk using the API

8 Comentarios

  • Gary Beichler

    Hi Peter Hochstrasser. Thanks for this detailed post! A lot of great information here. We're planning on expanding our developer documentation to cover data migration in more detail later this year and next. I'll make a note to cover the examples you suggested, among other things. Thanks again!

  • Peter Hochstrasser

    Looking forward to it, Gary Beichler.


  • Abdelhameed Khaled

    Hello I have a tiny problem I wander if you can help or guide me with it.
    I have csv of tickets I want to import so I follow these steps :
    1- convert the csv into json 
    2-use Zendesk API to create many tickets 

    the problem is that for custom ticket fields it should be in this json format 

            "id": 12769085107485,  // this is  the id of custom ticket field  
            "value": "issue"

    I don't know how to create a CSV template to be converted into this format or if there is any way to workaround this issue to import the custom ticket fields as well 

  • Peter Hochstrasser

    Hi Abdelhameed Khaled

    It's all a matter of sequence.

    In your case, first create the environment, like custom fields, only then import the tickets.
    You can easily find the IDs of these fields once they are created, and it's simple to substitute it in your JSON creation.


  • Gauri Pandit

    Hello, your document is helping alot in my transition to Zendesk. Can you elaborate more on how you worked with the attachments? Able to work with attachments for single ticket but got stuck when working on bulk attachments. Is it even possible to do that? If yes, can you elaborate?

  • Peter Hochstrasser

    Hi Gauri Pandit

    I migrated from Zendesk to Zendesk, which made some things a bit simpler.

    What do you mean by "bulk attachments"?

    In Zendesk, you have an arbitrary number of attachments per comment and thus per ticket.
    There's a difference between inline attachments (images) and "attached at the end" attachments - data files, text files or what not. The difference is where their descriptor is stored: Inline attachments are not part of the "attachments" array.

    May I suggest that you "manually migrate" a few tickets with attachments?
    Just create a new Zendesk ticket that looks like and contains all the content elements of the original ticket in your source system. Then, export their JSON structure to find out what needs to be generated, and how things are really stored. Then, the creation of your import code will be a lot easier.

    As you saw before, I really imported all attachments before I imported a single ticket. That makes things simpler when importing the tickets themselves.

    Yours truly


  • Peter Hochstrasser

    Hi Gary Beichler

    Any news from the API documentation regarding attachments?

  • Gauri Pandit

    Thanks for the reply! 

    By Attachments I mean the inline attachments, images. So, I don't have to create a token for these attachments? Any tips, documentation or examples related to inline attachments?


Iniciar sesión para dejar un comentario.

Tecnología de Zendesk