4.2. Full data import overview

DeskPRO On-Premise offers a flexible data importer for transferring information from other systems into your helpdesk. It can read data in CSV, Zendesk and osTicket formats.

This importer is not available for DeskPRO Cloud customers. If you want to import data into your Cloud helpdesk, you can use the DeskPRO API. We can also import your data for a consultancy fee based on the size and complexity of the job; please send us a detailed description of your import requirements (including a sample of the format, and the number and type of records involved) at sales@deskpro.com.

The DeskPRO importer system is split into two main parts:

1. Data exporter

The data exporter knows how to read data from an external source (like osTicket, Zendesk or CSV files) and export the data to a standard JSON file format suitable for importing into DeskPRO.

There are currently 3 types of data exporters available:

  • The generic CSV exporter can read CSV (comma-separated values) files.
  • The osTicket exporter is fully configured to read an osTicket database.
  • The Zendesk exporter can read helpdesk data exported from Zendesk.

2. DeskPRO importer

The second part is the importer itself which reads exported JSON data (from part 1 or from another source) and saves it to the DeskPRO database. This is where new records are created and existing records are updated.

Here’s how the import process works, from start to finish:

  1. First you need a working installation of DeskPRO. The importer saves data into an existing DeskPRO helpdesk.
  2. Then you use a Data Exporter to export data from your system to the standard DeskPRO JSON file format. This is done by running a command from the command-line.
  3. After the Data Exporter has output all of your data, you use the standard DeskPRO Importer to read the data and save it to your live database. This is done by running a second command from the command-line.

A Data Exporter will write many files to the filesystem. These files are in a standard directory structure and are of a standard format. For example, all ticket data is written to a tickets/ directory and all user data is written to a people/ directory. The actual files written are JSON files that all follow a standard format.

The DeskPRO Importer then reads the filesystem one file at a time. It has special logic to do proper mapping where necessary. For example, using email addresses the system knows how to map a user record to a ticket record. Or by mapping Department names, the system knows when to create new departments or use existing ones.

4.2.1. Preparation

You need to have DeskPRO installed and configured before you run an importer.

You should also configure your helpdesk to your liking before running an importer. For example, create the layout of your departments, create any usergroups and set agent permissions etc.

The importer will try to match data from the legacy system with data already defined. For example, if your system has a department named “Sales” then the importer will attempt to match that to a department named “Sales” that already exists in DeskPRO.

4.2.2. Data exporter

dp:export:check runs a check on your data source. You should always run a check first so you can catch errors early. This will let you know about potential problems, like invalid data.

php cmd.php dp:export:check <exporter_type> --input-path="/path/to/import"
  • replace <exporter_type> with csv, json, osticket or``zendesk`` depending on the source format
  • the files you want to import must be in the folder at path/to/import
  • add --verbose to see log output on the command line.
  • add --silent to disable all output to the command line.

When you have run the check, you can run the export and create the JSON files using:

php cmd.php dp:export:run <exporter_type> --input-path="/path/to/import"
--output-path="/path/to/json"
  • add --verbose to see log output on the command line.
  • add --silent to disable all output to the command line.
  • add --dry-run to test what would happen, without actually creating files.

The --output-path option is the full path on the filesystem to write the exported JSON data to. If the directory does not already exist, it will be created. Remember this path; you will need it when you run the importer.

4.2.3. DeskPRO importer

Once you have run the data exporter and have a full export, you can run the actual importer. This command will read the exported data and write changes to your helpdesk: for example, adding new tickets and users.

The syntax for the DeskPRO importer is:

php cmd.php dp:import:run <exporter_type> --input-path="/path/to/json"
  • add --verbose to see log output on the command line.
  • add --silent to disable all output to the command line.
  • you can add --dry-run to test what would happen, without actually changing your helpdesk.

The --input-path option must be the path you to the JSON files you created with the data exporter.

4.2.4. Custom Data Exporters

If you can write PHP code, it’s simple to make your own custom data exporters. We do not yet have detailed documentation for how to do this.

Alternatively, we could create a custom data exporter for you on a consultancy basis.

Please email us at support@deskpro.com if you’re interested in either of these.