Difference between revisions of "Supportworks Request Import"

From Hornbill
Jump to navigation Jump to search
Line 759: Line 759:
  
 
== API Key Rules ==
 
== API Key Rules ==
This utility uses ([[API Keys]]):
+
This utility uses ([[API keys]]):
  
 
* activity:postMessage
 
* activity:postMessage

Revision as of 15:15, 24 September 2021

About the Supportworks to Hornbill Service Manager Request Import Utility

The utility provides a simple, safe and secure way to migrate call data from Supportworks v7.x & v8.x in to Hornbill Service Manager. The tool is designed to run behind your corporate firewall, and requires access to your Supportworks database host(s) and file storage.

The tool connects to your Hornbill instance in the cloud over HTTPS/SSL, so as long as you have standard internet access then you should be able to use the tool without the need to make any firewall configuration changes.

The following tasks are carried out when the tool is executed:

  • Supportworks call data is extracted as per your specification, as outlined in the Configuration section of this document;
  • New requests are raised on Service Manager using the extracted call data and associated mapping specifications;
  • Supportworks call diary entries are imported as Historic Updates against the new Service Manager Requests;
  • Attachments to Supportworks Call Diary Entries are imported against their appropriate Historic Updates within Service Manager;
  • Call attachments that are not related to Call Diary Entries are attached to the relevant Service Manager request;
  • Call attachments of type SWM (Supportworks Mail) are decoded and stored as plain text attachments against the Service Manager request or Historic Update as appropriate.

Important Notice

Importing Supportworks call data and associated file attachments into your Hornbill instance will consume your subscribed storage. Please check your Administration console and your Supportworks data prior to running this import to ensure that you have enough subscribed storage available.

When running the import tool, after the call records are imported, you will receive a warning before importing the associated call file attachments. Please take note of the information presented, as this will inform you the amount of Hornbill storage space you have available to your instance, and the approximate amount that will be consumed should you continue with the file attachment import.

Open Source

The Supportworks to Hornbill Service Manager Request Import Utility is provided open-source under the Hornbill Community Licence and can be found Here on GitHub

Installation Overview

Windows Installation

  • Download the ZIP archive relevant to your operating system and architecture
  • Extract the zip into a folder you would like the application to run from e.g. C:\Call_Import\
  • Open conf.json and add in the necessary configuration
  • Open a Command Line Prompt as Administrator
  • Change directory to the folder containing the utility C:\Call_Import\
  • Run the command relevant to the architecture of the machine you are running this on:

goSWRequestImport.exe -dryrun=true

Configuration Overview

A demonstration configuration file is provided within the package, which includes configuration for importing call data from Supportworks 7.6.x running ITSM Enterprise 3.6.x. If a configuration file is not specified as a command line argument when executing the tool, then a default configuration file named conf.json, containing the correct JSON, must exist. The following configuration file contains the configuration elements required when importing Supportworks call data:

Example Configuration file

Click "Read More" to expand this section and show an example conf.json file. -------->>>>

 "HBConf": {
   "InstanceID": "",
   "UserName": "",
   "Password": ""
 },
 "SWServerAddress":"127.0.0.1",
 "AttachmentRoot":"E:/Program Files/Hornbill/Supportworks Server/data/cfa_store",
 "SWSystemDBConf": {
   "Driver":"swsql",
   "UserName": "",
   "Password": ""
 },
 "SWAppDBConf": {
   "Driver": "swsql",
   "Server": "127.0.0.1",
   "Database": "swdata",
   "UserName": "",
   "Password": "",
   "Port": 5002,
   "Encrypt": false
 },
 "CustomerType": "0",
 "SMProfileCodeSeperator": "-",
 "RelatedRequestQuery":"(SELECT fk_callref_m AS parentRequest, fk_callref_s AS childRequest from cmn_rel_opencall_oc) UNION (SELECT bpm_parentcallref AS parentRequest, callref AS childRequest FROM opencall WHERE callclass = 'B.P Task') ",
 "CallDiaryQuery": "SELECT updatetimex, repid, groupid, udsource, udcode, udtype, updatetxt, udindex, timespent FROM updatedb WHERE callref = [sourceref]",
 "RequestTypesToImport": 
 [
   {
     "Description":"This object configures the importing of Incidents",
     "Import":true,
     "CallClass": "Incident",
     "SupportworksCallClass":"Incident",
     "DefaultTeam":"Service Desk",
     "DefaultPriority":"Low",
     "DefaultService":"Communications",
     "SQLStatement":"SELECT opencall.callref,  logdatex, closedatex, cust_id, cust_name, itsm_title, owner, suppgroup, status, updatedb.updatetxt, priority, itsm_impact_level, itsm_urgency_level, withinfix, withinresp, bpm_workflow_id, probcode, fixcode, site FROM opencall, updatedb WHERE updatedb.callref = opencall.callref AND updatedb.udindex = 0 AND callclass = 'Incident' AND appcode = 'ITSM'",
     "CoreFieldMapping": {
       "h_datelogged":"[logdatex]",
       "h_dateclosed":"[closedatex]",
       "h_summary":"[itsm_title]",
       "h_description":"Supportworks Incident Reference: [oldCallRef]\n\n[updatetxt]",
       "h_external_ref_number":"[oldCallRef]",
       "h_fk_user_id":"[cust_id]",
       "h_status":"[status]",
       "h_request_language":"en-GB",
       "h_impact":"[itsm_impact_level]",
       "h_urgency":"[itsm_urgency_level]",
       "h_customer_type":"0",
       "h_container_id":"",
       "h_fk_serviceid":"",
       "h_resolution":"",
       "h_category_id":"[probcode]",
       "h_closure_category_id":"[fixcode]",
       "h_ownerid":"[owner]",
       "h_fk_team_id":"[suppgroup]",
       "h_fk_priorityid":"",
       "h_site":"[site]",
       "h_company_id":"",
       "h_company_name":"",
       "h_withinfix":"[withinfix]",
       "h_withinresponse":"[withinresp]",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":""
     },
     "AdditionalFieldMapping":{
       "h_firsttimefix":"",
       "h_custom_a":"Custom Data",
       "h_custom_b":"[itsm_title]",
       "h_custom_c":"[updatetxt]",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":"",
       "h_flgproblemfix":"",
       "h_fk_problemfixid":"",
       "h_flgfixisworkaround":"",
       "h_flg_fixisresolution":""
     }
   },
   {
     "Description":"This object configures the importing of Business Process Tasks",
     "Import":true,
     "CallClass": "Incident",
     "SupportworksCallClass":"B.P Task",
     "DefaultTeam":"Service Desk",
     "DefaultPriority":"Low",
     "DefaultService":"Communications",
     "SQLStatement":"SELECT opencall.callref,  logdatex, closedatex, cust_id, cust_name, itsm_title, owner, suppgroup, status, updatedb.updatetxt, priority, itsm_impact_level, itsm_urgency_level, withinfix, withinresp, bpm_workflow_id, probcode, fixcode, site FROM opencall, updatedb WHERE updatedb.callref = opencall.callref AND updatedb.udindex = 0 AND callclass = 'B.P Task' AND appcode = 'ITSM'",
     "CoreFieldMapping": {
       "h_datelogged":"[logdatex]",
       "h_dateclosed":"[closedatex]",
       "h_summary":"[itsm_title]",
       "h_description":"Supportworks Task Reference: [oldCallRef]\n\n[updatetxt]",
       "h_external_ref_number":"[oldCallRef]",
       "h_fk_user_id":"[cust_id]",
       "h_status":"[status]",
       "h_request_language":"en-GB",
       "h_impact":"[itsm_impact_level]",
       "h_urgency":"[itsm_urgency_level]",
       "h_customer_type":"0",
       "h_container_id":"",
       "h_fk_serviceid":"",
       "h_resolution":"",
       "h_category_id":"[probcode]",
       "h_closure_category_id":"[fixcode]",
       "h_ownerid":"[owner]",
       "h_fk_team_id":"[suppgroup]",
       "h_fk_priorityid":"",
       "h_site":"[site]",
       "h_company_id":"",
       "h_company_name":"",
       "h_withinfix":"[withinfix]",
       "h_withinresponse":"[withinresp]",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":""
     },
     "AdditionalFieldMapping":{
       "h_firsttimefix":"",
       "h_custom_a":"Custom Data",
       "h_custom_b":"[itsm_title]",
       "h_custom_c":"[updatetxt]",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":"",
       "h_flgproblemfix":"",
       "h_fk_problemfixid":"",
       "h_flgfixisworkaround":"",
       "h_flg_fixisresolution":""
     }
   },
   {
     "Description":"This object configures the importing of Service Requests",
     "Import":true,
     "CallClass": "Service Request",
     "SupportworksCallClass":"Service Request",
     "DefaultTeam":"Service Desk",
     "DefaultPriority":"Low",
     "DefaultService":"Desktop Support",
     "SQLStatement":"SELECT opencall.callref,  cust_id, logdatex, closedatex, itsm_title, owner, suppgroup, status, updatedb.updatetxt, priority, itsm_impact_level, itsm_urgency_level, withinfix, withinresp, bpm_workflow_id, probcode, fixcode, site FROM opencall, updatedb WHERE updatedb.callref = opencall.callref AND updatedb.udindex = 0 AND callclass = 'Service Request'  AND appcode = 'ITSM'",
     "CoreFieldMapping": {
       "h_datelogged":"[logdatex]",
       "h_dateclosed":"[closedatex]",
       "h_summary":"[itsm_title]",
       "h_description":"Supportworks Incident Reference: [oldCallRef]\n\n[updatetxt]",
       "h_external_ref_number":"[oldCallRef]",
       "h_fk_user_id":"[cust_id]",
       "h_status":"[status]",
       "h_request_language":"en-GB",
       "h_impact":"[itsm_impact_level]",
       "h_urgency":"[itsm_urgency_level]",
       "h_customer_type":"0",
       "h_container_id":"",
       "h_fk_serviceid":"",
       "h_resolution":"",
       "h_category_id":"[probcode]",
       "h_closure_category_id":"[fixcode]",
       "h_ownerid":"[owner]",
       "h_fk_team_id":"[suppgroup]",
       "h_fk_priorityid":"",
       "h_site":"[site]",
       "h_company_id":"",
       "h_company_name":"",
       "h_withinfix":"[withinfix]",
       "h_withinresponse":"[withinresp]",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":""
     },
     "AdditionalFieldMapping":{
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":""
     }
   },
   {
     "Description":"This object configures the importing of Change Requests",
     "Import":false,
     "CallClass": "Change Request",
     "SupportworksCallClass":"Change Request",
     "DefaultTeam":"Service Desk",
     "DefaultPriority":"Low",
     "DefaultService":"Finances",
     "SQLStatement":"SELECT opencall.callref, cust_id, logdatex, closedatex, itsm_title, owner, suppgroup, status, updatedb.updatetxt, priority, itsm_impact_level, itsm_urgency_level, withinfix, withinresp, bpm_workflow_id, probcode, fixcode, site FROM opencall, updatedb WHERE updatedb.callref = opencall.callref AND updatedb.udindex = 0 AND callclass = 'Change Request'  AND appcode = 'ITSM' ",
     "CoreFieldMapping": {
       "h_datelogged":"[logdatex]",
       "h_dateclosed":"[closedatex]",
       "h_summary":"[itsm_title]",
       "h_description":"Supportworks Change Request Reference: [oldCallRef]\n\n[updatetxt]",
       "h_external_ref_number":"[oldCallRef]",
       "h_fk_user_id":"[cust_id]",
       "h_fk_user_name":"[cust_name]",
       "h_status":"[status]",
       "h_request_language":"en-GB",
       "h_impact":"[itsm_impact_level]",
       "h_urgency":"[itsm_urgency_level]",
       "h_customer_type":"0",
       "h_container_id":"",
       "h_fk_serviceid":"[service_name]",
       "h_resolution":"",
       "h_category_id":"[probcode]",
       "h_closure_category_id":"[fixcode]",
       "h_ownerid":"[owner]",
       "h_fk_team_id":"[suppgroup]",
       "h_fk_priorityid":"",
       "h_site":"[site]",
       "h_company_id":"",
       "h_company_name":"",
       "h_withinfix":"[withinfix]",
       "h_withinresponse":"[withinresp]",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":""
     },
     "AdditionalFieldMapping":{
       "h_start_time":"",
       "h_end_time":"",
       "h_change_type":"",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":"",
       "h_scheduled":""
     }
   },
   {
     "Description":"This object configures the importing of Problems",
     "Import":false,
     "CallClass": "Problem",
     "SupportworksCallClass":"Problem",
     "DefaultTeam":"Service Desk",
     "DefaultPriority":"Low",
     "DefaultService":"Home Working",
     "SQLStatement":"SELECT opencall.callref, cust_id, logdatex, closedatex, itsm_title, owner, suppgroup, status, updatedb.updatetxt, priority, itsm_impact_level, itsm_urgency_level, withinfix, withinresp, bpm_workflow_id, probcode, fixcode, site FROM opencall, updatedb WHERE updatedb.callref = opencall.callref AND updatedb.udindex = 0 AND callclass = 'Problem'  AND appcode = 'ITSM' ",
     "CoreFieldMapping": {
       "h_datelogged":"[logdatex]",
       "h_dateclosed":"[closedatex]",
       "h_summary":"[itsm_title]",
       "h_description":"Supportworks Problem Reference: [oldCallRef]\n\n[updatetxt]",
       "h_external_ref_number":"[oldCallRef]",
       "h_fk_user_id":"[cust_id]",
       "h_fk_user_name":"[cust_name]",
       "h_status":"[status]",
       "h_request_language":"en-GB",
       "h_impact":"[itsm_impact_level]",
       "h_urgency":"[itsm_urgency_level]",
       "h_customer_type":"0",
       "h_container_id":"",
       "h_fk_serviceid":"[service_name]",
       "h_resolution":"",
       "h_category_id":"[probcode]",
       "h_closure_category_id":"[fixcode]",
       "h_ownerid":"[owner]",
       "h_fk_team_id":"[suppgroup]",
       "h_fk_priorityid":"",
       "h_site":"[site]",
       "h_company_id":"",
       "h_company_name":"",
       "h_withinfix":"[withinfix]",
       "h_withinresponse":"[withinresp]",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":""
     },
     "AdditionalFieldMapping":{
       "h_workaround":"",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":""
     }
   },
   {
     "Description":"This object configures the importing of Known Errors",
     "Import":false,
     "CallClass": "Known Error",
     "SupportworksCallClass":"Known Error",
     "DefaultTeam":"Service Desk",
     "DefaultPriority":"Low",
     "DefaultService":"Infrastructure Support",
     "SQLStatement":"SELECT opencall.callref, cust_id, logdatex, closedatex, itsm_title, owner, suppgroup, status, updatedb.updatetxt, priority, itsm_impact_level, itsm_urgency_level, withinfix, withinresp, bpm_workflow_id, probcode, fixcode, site FROM opencall, updatedb WHERE updatedb.callref = opencall.callref AND updatedb.udindex = 0 AND callclass = 'Known Error'  AND appcode = 'ITSM' ",
     "CoreFieldMapping": {
       "h_datelogged":"[logdatex]",
       "h_dateclosed":"[closedatex]",
       "h_summary":"[itsm_title]",
       "h_description":"Supportworks Known Error Reference: [oldCallRef]\n\n[updatetxt]",
       "h_external_ref_number":"[oldCallRef]",
       "h_fk_user_id":"[cust_id]",
       "h_fk_user_name":"[cust_name]",
       "h_status":"[status]",
       "h_request_language":"en-GB",
       "h_impact":"[itsm_impact_level]",
       "h_urgency":"[itsm_urgency_level]",
       "h_customer_type":"0",
       "h_container_id":"",
       "h_fk_serviceid":"[service_name]",
       "h_resolution":"",
       "h_category_id":"[probcode]",
       "h_closure_category_id":"[fixcode]",
       "h_ownerid":"[owner]",
       "h_fk_team_id":"[suppgroup]",
       "h_fk_priorityid":"",
       "h_site":"[site]",
       "h_company_id":"",
       "h_company_name":"",
       "h_withinfix":"[withinfix]",
       "h_withinresponse":"[withinresp]",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":""
     },
     "AdditionalFieldMapping":{
       "h_solution":"",
       "h_root_cause":"",
       "h_steps_to_resolve":"",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":""
     }
   },
   {
     "Description":"This object configures the importing of Releases",
     "Import":false,
     "CallClass": "Release",
     "SupportworksCallClass":"Release Request",
     "DefaultTeam":"Service Desk",
     "DefaultPriority":"Low",
     "DefaultService":"Finances",
     "SQLStatement":"SELECT opencall.callref, cust_id, logdatex, closedatex, itsm_title, owner, suppgroup, status, updatedb.updatetxt, priority, itsm_impact_level, itsm_urgency_level, withinfix, withinresp, bpm_workflow_id, probcode, fixcode, site FROM opencall, updatedb WHERE updatedb.callref = opencall.callref AND updatedb.udindex = 0 AND callclass = 'Release Request'  AND appcode = 'ITSM' ",
     "CoreFieldMapping": {
       "h_datelogged":"[logdatex]",
       "h_dateclosed":"[closedatex]",
       "h_summary":"[itsm_title]",
       "h_description":"Supportworks Release Reference: [oldCallRef]\n\n[updatetxt]",
       "h_external_ref_number":"[oldCallRef]",
       "h_fk_user_id":"[cust_id]",
       "h_fk_user_name":"[cust_name]",
       "h_status":"[status]",
       "h_request_language":"en-GB",
       "h_impact":"[itsm_impact_level]",
       "h_urgency":"[itsm_urgency_level]",
       "h_customer_type":"0",
       "h_container_id":"",
       "h_fk_serviceid":"[service_name]",
       "h_resolution":"",
       "h_category_id":"[probcode]",
       "h_closure_category_id":"[fixcode]",
       "h_ownerid":"[owner]",
       "h_fk_team_id":"[suppgroup]",
       "h_fk_priorityid":"",
       "h_site":"[site]",
       "h_company_id":"",
       "h_company_name":"",
       "h_withinfix":"[withinfix]",
       "h_withinresponse":"[withinresp]",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":""
     },
     "AdditionalFieldMapping":{
       "h_start_time":"",
       "h_end_time":"",
       "h_release_type":"",
       "h_custom_a":"",
       "h_custom_b":"",
       "h_custom_c":"",
       "h_custom_d":"",
       "h_custom_e":"",
       "h_custom_f":"",
       "h_custom_g":"",
       "h_custom_h":"",
       "h_custom_i":"",
       "h_custom_j":"",
       "h_custom_k":"",
       "h_custom_l":"",
       "h_custom_m":"",
       "h_custom_n":"",
       "h_custom_o":"",
       "h_custom_p":"",
       "h_custom_q":"",
       "h_scheduled":""
     }
   }
 ],
 "PriorityMapping": {
   "Supportworks Priority":"Service Manager Priority"
 },
 "TeamMapping": {
   "Supportworks Group ID":"Service Manager Team Name"
 },
 "CategoryMapping": {
   "Supportworks Profile Code":"Service Manager Profile Code"
 },
 "ResolutionCategoryMapping": {
   "Supportworks Resolution Profile Code":"Service Manager Resolution Profile Code"
 },
 "ServiceMapping": {
   "Supportworks Service Name":"Service Manager Service Name"
 },
 "StatusMapping":{
   "1" : "status.open",
   "2" : "status.open",
   "3" : "status.open",
   "4" : "status.onHold",
   "5" : "status.open",
   "6" : "status.resolved",
   "8" : "status.new",
   "9" : "status.open",
   "10" : "status.open",
   "11" : "status.open",
   "16" : "status.closed",
   "17" : "status.cancelled",
   "18" : "status.closed"
 }

What do I put in the Configuration file?

HBConfig

Connection information for the Hornbill instance:

  • "InstanceID" - This is the name of your Hornbill instance and can be found within the URL you use to navigate to it: live.hornbill.com/[instance name]/. This value is case sensitive.
  • "UserName" - Instance User Name with which the tool will log the new requests
  • "Password" - Instance Password for the above User

SWServerAddress

The address of the Supportworks Server. If this tool is to be run on the Supportworks Server, then this should be set to localhost.

AttachmentRoot

This is the location of the Supportworks Call File Attachment Store.

SWSystemDBConf

Contains the connection information for the Supportworks cache database (sw_systemdb).

  • "Driver" the driver to use to connect to the sw_systemdb database:
  • swsql = Supportworks 7.x SQL (MySQL v4.0.16). Also supports MySQL v3.2.0 to <v5.0
  • mysql = MySQL Server v5.0 or above, or MariaDB (Supportworks v8+)
  • "UserName" Username for a user that has read access to the SQL database from the location of the tool
  • "Password" Password for above User Name

SWAppDBConf

Contains the connection information for the Supportworks application database (swdata).

  • "Driver" the driver to use to connect to the database that holds the Supportworks application information:
  • swsql = Supportworks 7.x SQL (MySQL v4.0.16). Also supports MySQL v3.2.0 to <v5.0
  • mysql = MySQL Server v5.0 or above, or MariaDB (Supportworks v8+)
  • mssql = Microsoft SQL Server (2005 or above)
  • "Server" The address of the SQL server
  • "UserName" The username for the SQL database
  • "Password" Password for above User Name
  • "Port" SQL port (5002 if the data is hosted on the Supportworks server)
  • "Encrypt" Boolean value to specify whether the connection between the script and the database should be encrypted. NOTE: There is a bug in SQL Server 2008 and below that causes the connection to fail if the connection is encrypted. Only set this to true if your SQL Server has been patched accordingly.

CustomerType

Should contain an integer value of 0 or 1, to determine the customer type for the records being imported:

  • 0 - Hornbill Users
  • 1 - Hornbill Contacts

SMProfileCodeSeperator

A string, to specify the Profile Code separator character in use on your Service Manager instance. By default this is a :

RelatedRequestQuery

The SQL query to run to return request associations from Supportworks, to allow associated imported requests to be linked in Service Manager. The output of the SQL query needs to consist of the following columns:

  • parentRequest : holds the Supportworks request reference of the parent request
  • childRequest : holds the Supportworks request reference of the child request

CallDiaryQuery

The query to retrieve call diare entries, used when importing historic call update. The default value is below. where [sourceref] will be replaced by the Supportworks call reference number by the tool:

SELECT updatetimex, repid, groupid, udsource, udcode, udtype, updatetxt, udindex, timespent FROM updatedb WHERE callref = [sourceref]

RequestTypesToImport

A JSON array of objects that contain request-type specific configuration.

  • Description - a string that allows you to describe the current request type object within the array. This is not used by the tool, so can contain any text string.
  • Import - boolean true/false. Specifies whether the current class section should be included in the import.
  • CallClass - specifies the Service Manager request class that the current Conf section relates to.
  • SupportworksCallClass - specifies the call class of the Supportworks requests being imported. Only used in the logging and display output of the tool, the actual Supportworks request class for each import should be defined in the query contained within the SQLStatement parameter.
  • DefaultTeam - If a request is being imported, and the tool cannot verify its Support Group, then the Support Group from this variable is used to assign the request.
  • DefaultPriority - If a request is being imported, and the tool cannot verify its Priority, then the Priority from this variable is used to escalate the request.
  • DefaultService - If a request is being imported, and the tool cannot verify its Service from the mapping, then the Service from this variable is used to log the request.
  • SQLStatement - The SQL query used to get call (and extended) information from the Supportworks application data.
  • CoreFieldMapping - The core fields used by the API calls to raise requests within Service Manager, and how the Supportworks data should be mapped in to these fields.
    • Any value wrapped with [] will be populated with the corresponding response from the SQL Query
    • Any Other Value is treated literally as written example:
      • "h_summary":"[itsm_title]", - the value of itsm_title is taken from the SQL output and populated within this field
      • "h_description":"Supportworks Incident Reference: [oldCallRef]\n\n[updatetxt]", - the request description would be populated with "Supportworks Incident Reference: ", followed by the Supportworks call reference, 2 new lines then the call description text from the Supportworks call.
    • Any Hornbill Date Field being populated should have an EPOCH value passed to it. This includes h_datelogged, h_dateresolved and h_dateclosed.
    • Note: "h_dateclosed":"[closedatex]", - opencall.closedatex is used in Supportworks to hold the date a request will come off hold. This must be populated if you are importing requests in an On-Hold or Closed status.
    • Core Fields that can resolve associated record from passed-through value:
      • "h_site":"[site]", - When a string is passed to the site field, the script attempts to resolve the given site name against the Site entity, and populates the request with the correct site information. If the site cannot be resolved, the site details are not populated for the request being imported.
      • "h_fk_user_id":"[cust_id]", - As site, above, but resolves the original request customer against the users or contacts within Hornbill.
      • "h_ownerid":"[owner]", - As site, above, but resolves the original request owner against the analysts within Hornbill.
      • "h_category_id":"[probcode]", - As site, above, but uses additional CategoryMapping from the configuration, as detailed below.
      • "h_closure_category_id":"[fixcode]", - As site, above, but uses additional ResolutionCategoryMapping from the configuration, as detailed below.
      • "h_ownerid":"[owner]", - As site, above, but resolves the original request owner against the analysts within Hornbill.
      • "h_fk_team_id":"[suppgroup]", - As site, above, but uses additional TeamMapping from the configuration, as detailed below.
      • "h_fk_priorityid":"[priority]", - As site, above, but uses additional PriorityMapping from the configuration, as detailed below.
  • AdditionalFieldMapping - Contains additional columns that can be stored against the new request record. Mapping rules are as above.

PriorityMapping

Allows for the mapping of Priorities between Supportworks and Hornbill Service Manager, where the left-side properties list the Priorities from Supportworks, and the right-side values are the corresponding Priorities from Hornbill that should be used when escalating the new requests.

The following query will be helpful when listing the Supportworks Priorities that exist and therefore need to be mapped in the configuration: SELECT DISTINCT priority FROM opencall

TeamMapping

Allows for the mapping of Support Groups/Team between Supportworks and Hornbill Service Manager, where the left-side properties list the Support Group ID's (not the Group Name!) from Supportworks, and the right-side values are the corresponding Team names from Hornbill that should be used when assigning the new requests.

The following query will be helpful when listing the Supportworks Teams that exist and therefore need to be mapped in the configuration: SELECT DISTINCT suppgroup FROM opencall

CategoryMapping

Allows for the mapping of Problem Profiles/Request Categories between Supportworks and Hornbill Service Manager, where the left-side properties list the Profile Codes (not the descriptions!) from Supportworks, and the right-side values are the corresponding Profile Codes (again, not the descriptions!) from Hornbill that should be used when categorising the new requests.

The following query will be helpful when listing all the Supportworks Profile Codes (Logging Categories) that have ever been used against Supportworks calls: SELECT DISTINCT probcode from opencall

This can be compared with the contents of the "probcode" table which includes the corresponding descriptions. The descriptions will help you understand what the codes relate to and therefore create suitable mappings: SELECT * FROM probcode

ResolutionCategoryMapping

Allows for the mapping of Resolution Profiles/Resolution Categories between Supportworks and Hornbill Service Manager, where the left-side properties list the Resolution Codes (not the descriptions!) from Supportworks, and the right-side values are the corresponding Resolution Codes (again, not the descriptions!) from Hornbill that should be used when applying Resolution Categories to the newly logged requests.

The following query will be helpful when listing all the Supportworks Resolution Codes (Resolution Categories) that have ever been used against Supportworks calls: SELECT DISTINCT fixcode from opencall

This can be compared with the contents of the "fixcode" table which includes the corresponding descriptions. The descriptions will help you understand what the codes relate to and therefore create suitable mappings: SELECT * FROM fixcode

ServiceMapping

Allows for the mapping of Services between Supportworks and Hornbill Service Manager, where the left-side properties list the Service names from Supportworks, and the right-side values are the corresponding Services from Hornbill that should be used when raising the new requests.

The following query will be helpful when listing the Supportworks Services that exist and therefore need to be mapped in the configuration: SELECT DISTINCT sc_folio.service_name from opencall JOIN sc_folio ON sc_folio.fk_cmdb_id = opencall.itsm_fk_service

Not all versions of Supportworks include the concept of services. Even in versions that do, it's possible for a call in Supportworks to exist without an associated service. In this scenario it's typical to map all calls in Supportworks without a service to a Hornbill Service such as "Imported Requests" or another preferred service.

StatusMapping

Allows for the mapping of Request Statuses between Supportworks and Hornbill Service Manager, where the left-side properties list the Status IDs from Supportworks, and the right-side values are the corresponding Status IDs from Hornbill that should be used when importing the requests.

The configuration file comes pre-populated with suggested mappings between the Supportworks and Service Manager statuses.

API Key Rules

This utility uses (API keys):

  • activity:postMessage
  • bpm:processSpawn2
  • admin:appOptionGet
  • admin:groupGetInfo
  • admin:userGetInfo
  • data:entityAddRecord
  • data:entityAttachFile
  • data:entityBrowseRecords
  • data:entityBrowseRecords2
  • data:entityUpdateRecord
  • data:profileCodeLookup
  • data:queryExec
  • mail:decodeCompositeMessage
  • session:userLogoff
  • session:userLogon
  • system:logMessage
  • apps/com.hornbill.servicemanager/RelationshipEntities:add
  • apps/com.hornbill.servicemanager/Requests:holdRequest

Command Line Parameters

  • file - Defaults to `conf.json` - Name of the Configuration file to load
  • dryrun - Defaults to `false` - Set to True and the XMLMC for the raising of new requests will not be called, and instead the generated XML for each request will be dumped to the log file. This is to aid in debugging the initial connection information.
  • debug - Defaults to `false` - set to true to output additional debug logging
  • concurrent - defaults to `1`. This is to specify the number of requests that should be imported concurrently, and can be an integer between 1 and 10 (inclusive). 1 is the slowest level of import, but does not affect performance of your Hornbill instance, and 10 will process the import much more quickly but could affect performance.
  • custorg - defaults to `false` - When set to `true`, the company and organisation mappings will be ignored, and the tool will use the Contacts Organisation (if the customer is of type Contact (1)), or the Users Home Organisation (if the customer is of type User (0)), when logging the requests

Testing Overview

There is no substitute for hands-on experience when becoming familiar with the Hornbill import utilities.
The Supportworks Request import accepts and understands a number of "Command Line Parameters" that can be used when running the utility from the command line. The most important one for testing is the -dryrun=true command. When this is specified, no information will be written to Hornbill and it allows you to confirm that the configuration is correct and that a connection to your Supportworks server can be established. A dryrun still outputs a log file which provides you with an opportunity to review and understand any error messages that may occur.

Suggested Testing Approach

Below are some high level steps to help you build confidence in your configuration:

  1. Prepare the priority, team, category, and resolution category Supportworks to Service Manager mappings at the bottom of the conf file as required.
  2. Start by focusing on a single call class section e.g Incidents (ensure all other sections are set to "Import:false")
  3. Open the Supportworks Query tool on your Supportworks Server and run the default SQL statement contained in the conf.json file.
  4. Amend the SQL query to remove references to non-existent columns (the database schema varies between Supportworks editions) until the query runs successfully and returns some results.
  5. Add a limit to the query e.g. LIMIT 30 (Its good practice to initially test on a small set of request records as this allows the dryruns to complete quicker and there is less log content to review).
  6. Copy your new query back into the conf file.
  7. Perform a dryrun (by executing the utility along with the -dryrun=true command line parameter).
  8. Review cmd output and log file for errors
  9. Check against "Common Error Messages" listed on the wiki and take action to rectify these as well as amending any of the priority, team, and category mappings where necessary.
  10. Continue with dryrun tests until you are happy that all the errors are accounted for.
  11. Perform a live run with this small sample of request records i.e. set -dryrun=false
  12. Review an imported request record and check that all properties are as expected:
    • Team has been assigned
    • Owner is assigned
    • Status is correct
    • Customer is set
    • Priority is set
    • Category is set
    • Call diary updates have been imported
    • Attachments have been imported and can be opened
    • Check any other data you might have decided to import.
  13. Adjust conf file field mappings as necessary
  14. Loop through steps 11 - 14 as many times as is necessary until you are happy with the information being transported with the imported requests.
  15. Perform steps 2 to 14 for the Service Requests section and other call class sections as required.
  16. Plan the live import of all the desired requests. It can take between 1 and 3 seconds ti import a request record, therefore if you have a large number (> 15,000) then it's advisable to manage the import in batches. This will involve multiple configuration files.


Example command line: goSWRequestImport.exe -dryrun=true -file=conf.json

HTTP Proxies

If you use a proxy for all of your internet traffic, the HTTP_PROXY and HTTPS_PROXY Environment variables need to be set. These environment variables hold the hostname or IP address of your proxy server. It is a standard environment variable and like any such variable, the specific steps you use to set it depends on your operating system.

For windows machines, it can be set from the command line using the following:
set HTTP_PROXY=HOST:PORT

set HTTPS_PROXY=HOST:PORT
Where "HOST" is the IP address or host name of your Proxy Server and "PORT" is the specific port number. IF you require a username and password to go through the proxy, the format for the setting is as follows:
set HTTP_PROXY=username:password@HOST:PORT

set HTTPS_PROXY=username:password@HOST:PORT

URLs to White List

Occasionally on top of setting the HTTP_PROXY variable the following URLs need to be white listed to allow access out to our network

Troubleshooting

Logging Overview

All logging output is saved in the log directory, in the same directory as the executable. The file name contains the date and time the import was run SW_Call_Import_2015-11-06T14-26-13Z.log

Common Error Messages

Below are some common errors that you may encounter in the log file and what they mean:

  • [ERROR] Error Decoding Configuration File:..... - this will be typically due to a missing quote (") or comma (,) somewhere in the configuration file. This is where an online JSON viewer/validator can come in handy rather than trawling the conf file looking for that proverbial needle in a haystack.
  • [ERROR] Database Query Error: read tcp 127.0.0.1:xxxx->127.0.0.1:xxxx: wsarecv: An established connection was aborted by the software in your host machine. - This is most likely due to an incorrect Username and/or password specified in the SWSystemDBConf or SWAppDBConf section of the conf file. Check and confirm the username and password used to access your Supportworks databases.
  • [ERROR] Database Query Error: driver: bad connection. - Like the error above, this can be associated with an incorrect Username and/or password specified in the SWSystemDBConf or SWAppDBConf section of the conf file. Check and confirm the username and password used to access your Supportworks databases.
  • [ERROR] Database Query Error: write tcp xx.xx.xx.xx:xxxx->xx.xx.xx.xx:xxxx: wsasend: An existing connection was forcibly closed by the remote host. - This is most likely due to the incorrect database driver being specified in the conf file. Check you are using the right database driver for the database which stores your Supportworks data. In may also be prudent to check the username and password are correct too.

Error Codes

  • 100 - Unable to create log File
  • 101 - Unable to create log folder
  • 102 - Unable to Load Configuration File