Exporting ticket, user, or organization data from your account

Return to top

51 Comments

  • CJ Johnson

    Hi Sarah,
    这取决于你说的出口的门票。If you don't need every single comment, just the first message and ticket fields, it's possible, but it's trickier than the built in methods. You can do this using the Search API. Now, the good news is, you can do this without being a coder!

    Here's what you want to do, in my example, we're gonna pretend the tag you want is "closed_by_merge".
    1. replace the domain with your zendesk domain, and put this in your browser;https://domain.zendesk.com/api/v2/search/export.json?filter[type]=ticket&query=tags:closed_by_merge
    2. You should see a JSON output of code. To convert that to CSV, run it through something likehttps://konklone.io/json/.
    3. Be sure to get all pages! At the bottom of the page of code displayed, you'll see a link like:

    https://domain.zendesk.com/api/v2/search/export.json?filter%5Btype%5D=ticket&page%5Bafter%5D=eyJmaWVsZCI6ImNyZWF0ZWRfYXQiLCJkZXNjIjp0cnHHeJhJ0aWVCcmVha0ZpZWxkIjoiaWQiLCJ0aWVCcmVha0Rlc2MiOmZhbHNlLCJzb3J0VmFsdWVzIjpbMTY0NzQ1MzMxMDAwMCw0ODMzMzA3ODIyMjI4XSwiZXhwb3J0ZWRUaHVzRmFyIjoxMDAsInNlc3Npb25TdGFydCI6MTY0NzUzMDIxNTA5OSwiY3JlYXRlZEF0IjoxNjQ3NTMwMjE1MTYxLCJzYWx0ZWRSZXF1ZXN0SGFzaCI6LTQ2Mzk0OTg1Mywic2FsdGVkQ3Vyc29ySGFzaCI6LTE5MjM1NzU2N30%3D&query=tags%3Aclosed_by_merge"}}

    You need to copy and follow that link to get to page 2. Continue until you get a NULL/blank next page.

    If you want to get fancy with this, there's guides out there on how to write Python scripts to run your search, decided what columns to collect, collect all the pages, and format it into a CSV, as well. This can be really helpful if you have thousands of results and don't want to download and convert your results page by page, and want to limit the columns in the CSV to the things you actually want/need.

    4
  • Marco

    Here.. it is stated that the JSON exported list is NOT a valid JSON object...

    ... and I totally agree. In fact, I always need to use an editor to add a prefix `[` and suffix `]` and a comma after each new-line, in order to properly parse the list (eg. in python). Very annoying...

    So, the question arises:Why don't you export as a proper formatted JSON array?I think this should be considered a bug more than a limitation or a works-by-design. It does not make sense to provide me with a sequence of json objects without commas and enclosing brackets!

    2
  • Jordan Moore

    The instructions updated on 11/03/2022, state to go to Account > Tools > Reports.

    There are no Tools or Reports sections.We are an enterprise customer. A lot of this is inaccurate. We're dead in the water trying to export our 4000 organizations to updates them, because you all only put a CSV upload, but no download....geeze!!

    2
  • CJ Johnson

    Amy Dee

    If that's the case, it would be great if the entire article were re-written to reflect that this is no longer available in JSON. This is a bit like changing the article language from French to Spanish and saying it's still available Spanish because they are both Romance languages. It's not JSON anymore, and that means that JSON parsing in code will not work. My scripts that know how to read JSON, but cannot read NDJSON, because it's not the same language. This is why people are telling you that your JSON exports are broken.

    2
  • CJ Johnson

    You might be able to force your way to the page via this url, you'll need to put in your own Zendesk domain:
    https://domain.zendesk.com/admin/account/tools/reports

    2
  • Jordan Moore

    Amy Deethe only problem is that Zendesk makes zero effort to tell us what is or is not turned on. I had no clue this option even existed. So I had to go out a buy a 3rd party app (again)...and spent considerable amounts of time trying to get data exports setup in AWS to automatically pull data. I literally pleaded in a meeting with ZD this week to tell me WHAT ELSE is not turned on. I'm an enterprise customer, turn on everything, or at the very least tell your customers what you have turned off. The only way I even know that the ADMIN > Tools > Reports option even exists, is because an end user made a post (not ZD). So I have to contact ZD to turn on the feature. And once it's finally turned on, its just a bulk dump, with date range. Absolutely no filter options. You all need to read these complaints. Some have been open for years with no resolution. I don't want JSON exports, I want access to tables and my customer fields. I go into reporting now and try to pull an Organization report, in your cube environment, but the datasets are only ZD, not our custom fields. 100% USELESS.

    2
  • Dave Dyson
    Thanks for sharing your solution, CJ!


    1
  • Pedro Reis

    The satisfaction score is included on the export, but not the rating date, any chance this can be included? Or Am I missing something?

    Is it possible to extract a .csv with that information from explorer?

    Also, custom fields are exported via .CSV and that's great.

    1
  • Amy Dee
    Zendesk Customer Care

    Hi CJ! This article covers the native export options for Zendesk data. The Tickets JSON export is the most thorough of the bunch -- it includes the ticket in its current state (including tags, field values, and the form), details about all associated users, metric data, and the full comment history. It's a great resource for ticket data, but it doesn't get into individual ticket audits.

    If you're interested in ticket audits, you have a couple broad options.

    TheTicket Audits APIshows the full audit history for a ticket. It includes every change to the ticket, including metadata for each update, all field changes, all comment text, etc. It's a complete picture, but it only supports one ticket at a time. This option is helpful if you've identified a subset of tickets (through search or some other resource), and you need to pull detailed information for that list of ticket IDs. It's not efficient for large or ongoing exports.

    For large or ongoing exports that include ticket audits, I recommend theIncremental Ticket Events API. The incremental endpoints are designed to deliver lots of raw data as efficiently as possible. The ticket events endpoint returns each event on its own, complete with all changes and metadata. (You have to include the comment_eventsside-loadif you want comment text as well.) This allows you to pull all ticket events in bulk, but you need to reassemble them into tickets separately.

    I hope this helps!

    1
  • Amy Dee
    Zendesk Customer Care

    Hi@...! You are correct; that property isn't available in Explore at this time. The JSON export is probably the best resource for finding the groups associated with organizations.

    Since the JSON export returns an ID rather than a name, you'll need a second resource to connect names with IDs. I recommend theList Groups API. It's a relatively simple GET call tohttps://SUBDOMAIN.zendesk.com/api/v2/groups(you can even access it in a browser as long as you're logged into your account).

    The List Groups API includes each group's ID and name, so you can use it as a reference.

    I hope this helps!

    1
  • Jonathan Molina

    Hi all,

    I'm trying to export the Group name assigned to the Organizations on our support account, but in the JSON export the group is shown as an ID rather than the name.

    Also this information does not appear in Explore, because it shows the current group assigned to a ticket, but not the general group. I'm talking about the field shown in green in the screenshot.

    Aybody knows how to export that data for all of our organizations?

    1
  • PAUL STRAUSS

    Is there any way to export Public Replies and Internal Notes from all of our tickets? We want to do a pattern analysis of the content in free-form text to see if there are patterns of specific words or needs that come up frequently in our tickets.

    1
  • Nghĩa Hồ

    Hi, i don't see快速浏览:Admin Center > Account > Tools > Reports, although my account is Growth plan

    1
  • Pierce Brachmann

    Hello Zendesk Support,

    I see we can pull lots of ticket data but is there any way to pull macros via this method?

    1
  • Jordan Moore

    CJ JohnsonFINALLY, someone who knows what they are talking about...getting a sincable or timely solution from ZD is near impossible. They just need to allow for table access to our instances so we can just connect, pull, and be done. Instead, I've had to jerry-rig the same through AWS. It's a nightmare. Never seen a ticketing product where I cannot readily access my data for the purpose of maintaining data integrity, or making bulk changed.

    1
  • Aleksandar Salevski

    Hi All, the problem with this JSON is that there is no comma "," between users, any help with this one?

    0
  • Jordan Moore

    Unfortunately, that is a dead link.

    0
  • Amy Dee
    Zendesk Customer Care

    Hi Chris! This likely means one of two things:

    Exports have not been enabled. Exports are disabled by default. If they haven't yet been enabled in your account, the account owner will need to contact the support team.

    There are domain restrictions on the export tools. The account owner can always reach the export page (once it's enabled), but they have the option to limit who else can access it. Only account administrators with a matching email domain will see it.

    If you're an administrator on your account and you don't see the export options, check in with the account owner andreach out to Customer Supportif needed.

    I hope this helps!

    0
  • 支持管理

    Is this article still accurate? I don't see anything like this in my instance. Yes I can go to Account and Reports, but I have to create a Report first with limited settings, and then I can export, but only to CSV and XML, no JSON.

    We are on Suite Growth, BTW

    0
  • Kimbom

    完整的JSON出口,从和日期condition? Is it used to filter by "created_at" or "updated_at" or anything else? I want to export the ticket which are created in the specific period but the result I get from the json is not what I expect.

    0
  • Pedro Reis

    When you activate the agent workspace, does the data structure change on report export?

    0
  • Mark Leci

    Is there any plan to add the option to export organization data as a csv? This seems like something so basic it should be possible via Explore, but it's not (you can only get organization data for organizations that are linked to tickets). I had to request a json export, then edit the json so that it was valid (!) and then load it into Excel to actually see this basic data. The whole process took a full day including the time I needed to research how to convert the non-standard json to something usable. Seems crazy for something you can do in ten seconds in Salesforce.

    As noted above, using a non-standard json variant particularly for the org export seems like a poor design choice. I would guess it's unlikely most companies have millions of organizations, and even if they do I think giving admins the choice to download in standard json makes sense.

    If anyone else is seeing this and wants to use the organization export data as valid json, what worked for me is the following:

    1. Added '{"Organizations":[' at the top.

    2. Separated each organization object with a ','

    3. Added ']}' at the end

    0
  • Virginia Buechel

    Does the JSON file also include any files that are uploaded in ticket conversations too?

    0
  • CJ Johnson

    I don't actually see any way to use the API to export ticket audits with parameters like tags or specific forms. Can this be clarified? How is this achievable?

    0
  • Brett Bowser
    Zendesk Community Manager

    Hey Tito,

    You can use theGuide APIto export your articles or you can use thekBackupapp within our App Marketplace.

    I hope this helps!

    0
  • Brandon Tidd
    User Group Leader Community Moderator
    The Humblident Award - 2021

    Hi@...-

    You should be able to do this through theTicket Comments API.

    Alternatively, there are a few apps in the marketplace that can handle this, such asthis one.

    Hope this helps!

    Brandon

    0
  • S Franke

    Hi,

    I'll admit I didn't look for my question/answer through all of the comments but I did look through a lot.

    Using the JSON user export, is it possible to get all of the users' identities or only the primary? In my case email address. If I want all of the email addresses, do I need to use the Rest APIs? I don't see the non-primary emails anywhere in the export.

    - Scott

    0
  • Monica Barin

    Are archived tickets included in the export? If not, how can I export all tickets ever logged by a given client, including archived ones? I have a client that has over 1000+ tickets logged - these can be see on their organization profile. When I create a view to see all their tickets, it only has about 200. The other 800+ have been closed and since, auto-archived. We want a full picture of their historical tickets. Thanks.

    0
  • Joyce
    Zendesk Customer Care
    Hi Virginia,

    JSON exports of tickets contain links to the various attachments as:https://subdomain.zendesk.com/api/v2/attachments/ATTACHMENT_ID.json

    In order to download the attachments associated with each link, you will need to perform a GET request to that endpoint. Then download the file linked at the aforementionedcontent_urlattribute.

    You can read more about the article如何can I download all attachments in a ticket?

    Hope this helps!
    0
  • Jonathan Molina

    Thanks@...works great!

    0

Pleasesign into leave a comment.

Powered by Zendesk