[hfe_template id='1680'] Zendesk Migration | HALO

Zendesk Migration

Zendesk Migration Powershell script attached – still not tested extensively.

General Prerequisites

  • Powershell version 7
  • Export of Zendesk Ticket data in JSON format
    • If you only want to import closed tickets initially, you can do this by adjusting the ticket data you export from Zendesk

Ticket Type Prerequisites

  • Create a new ticket type used for importing tickets into Halo. I would suggest cloning an existing ticket type then turning off acknowledgement emails and unchecking “Show to End-User” (both located in the defaults tab). Remember the ID of the ticket type, which is located in the URL.
  • You also need to create a custom field and add it to the ticket type that you're using for imports. The custom field needs to be called "ZendeskID" (CFZendeskID). 
  • You'll need to create a Status for the imported tickets. Currently the script uses ID 25 for this so I created a status called Imported.
  • There's currently a bug with followers in this script, so I'd remove the follower field from the ticket type as well. (I'll remove this line when it's fixed so keep followers out for now)

 

  • Next, go to the migration.ps1 PowerShell script and change the below ID to reflect the ticket type’s ID you’d like to use.

 

Create-ZendeskHaloConfigFile.ps1

  1. Fill in the Zendesk API details
    1. API Username – this is an email address. Likely the email address of whoever created the API user
    2. APIKey – API Key from the API user
    3. Zendesk URL – the Zendesk URL for the customer. Make sure to include '/api/v2/' in the URL, like the example above
  2. Create a HaloPSA API Application and fill in Halo API details
    1. Go to Config > Integrations > HaloPSA API > View Applications > Create a New One
    2. Name – Give it a name like "Zendesk Migration"
    3. Auth Method – select "Client ID and Secret"
    4. Select an admin to log in as
    5. Permissions – give all permissions (JP and I are looking into which ones are needed)
    6. Copy the Secret and Client ID and click Save
    7. Go back to the HaloPSA API and copy the customer's tenant
    8. Copy over all of the values into the Create-ZendeskHaloConfigFile.ps1 matching the format in the above screenshot.
    9. Save this file

The Migration can only be run on the computer and with the user that created the config file. 

 

Categorymap.csv

  • JP has commented this out with the new migration files. If they would like to keep the categories associated with tickets they bring across, you can un-comment out those lines (speak to JP).
  • If you do choose to go through the category mappings, you need to manually create the categories in Halo first, then map them to Zendesk categories (see categorymap file in the zip file for an example)

 

Org Map

  • In case the customers have different names in Halo you can use this mapping file to make sure tickets get associated with the correct customer.
  • You will need to map the customer in Zendesk (1st column) to the Customer in Halo (2nd column)
    • For any customers that don't exist in Halo, you will need to create them as a customer or put the customer as "Unknown" in the spreadsheet in Halo's column.

Migration.ps1

This is the code that actually runs the migration. 

  1.  It will then prompt you for the organisation mapping file
    • It should pop up with a message telling you it's collecting data from Zendesk then will say "Done"
  2. Then it will prompt you to select the json file.
  3. After that there will be 3 options for you to run.
    1. Mode 1: Ticket migration mode

                      This will only create the ticket if it was closed/solved in Zendesk to speed up the ingestion process. If a ticket is new/open/pending/on-hold, the ticket and comments are created.

    2. Mode 2: Comment migration mode
                      Comments are created for all tickets. Would recommend this if the Zendesk system has a small number of tickets

    3. Mode 3: Closing Mode
                      This will make any old closed Zendesk tickets immutable (this bit hasn’t been written yet but I’ll remove this line when it has been written) 

All being well, that should be it   

[hfe_template id='2416']