CSV Ticket Import Example

Info:

  • Used Zammad version: 5.2.x
  • Used Zammad installation type: package
  • Operating system: Ubuntu 20.x
  • Browser + version: Firefox (102.0.1)

Hello,

My company is evaluating several open source ticketing solutions and this is the favorite so far. I’ve been testing the API and working through the process of importing data from our current ticketing system. I can see there is a CSV import function that may include tickets (zammad/can_csv_import.rb at develop · zammad/zammad · GitHub ), but don’t see any example CSV files around.

To be clear, our goal is to import all of our old tickets from the old system to Zammad in a closed state.
We need to maintain our history of tickets - we use this system to document changes and it’s important to maintain that data. This would also let us understand how Zammad performs with our data in place.

Has anyone gone through this process? I’ve read through the code and think I could piece together a file, but before I do that I wanted to check here first.

What I’m hoping for with this post:

  1. A sample CSV file for a ticket load
  2. Hopefully a short example of the ruby code used to load/sync that data
  3. Looking through the code for FreshDesk data importers, I see it’s possible to write one for our legacy ticketing system. Did anyone choose that route and actually write an importer for their legacy system?

Thanks!!

Dustin Tennill

It looks like this gets you json data.
http://yourservername.com/api/v1/tickets?import_example

The tickets controller has some functions and examples - zammad/tickets_controller.rb at f6988de2f5fcec1e1e0ce970cafbf0ebe62754b1 · zammad/zammad · GitHub

I’m reading my example ticket data to see if I can figure out how to load ticket comments in. The source system has ticket descriptions, so there is a little work converting them to what Zammad expects.

The big question now - can I set created_at and updated_at data when a ticket is loaded via CSV? This didn’t work for me on the API.

Update for anyone curious …

The API seems to not be meant for the task I want to accomplish, so I’m heading another direction.

I’ve looked through the code for the other importers and haven’t figured out enough to replicate it for our current ticketing system. The DB schema is pretty consumable though, so I may resort to just writing a tool to put the data in like Zammad expects.

You should be extremely careful importing data straight into the Zammad database, this is heavily discouraged by Zammad due to the lack of program logic and error controls offered by the API (or the webinterface). You’re essentially bypassing error and integrity checking and this could lead to a broken system, either immediately or in the future when doing migrations during Zammad upgrades.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.