ITrack/Pro/DSI Integration
Exporting from ITrack Pro to DSI
This wiki page is not done yet Things that need to happen to install:
In SVN\ITrackPro\Utilities\DSIExport\
1. Open dsi_export.sql and replace <PATH> in the line "INTO OUTFILE '<PATH>\\output.csv'" with where the output file needs to go. Note that this path is relative to mysql not the bat file so you may want to use an absolute path. The filename can also be changed if wished. 2. Open dsi_export.bat and make sure the line "DEL output.txt" is pointed to the output file in the first step. 3. In the second line replace <user> with the username and <password> with the password used to access the databse. Since this is stored in plaintext it'll be worthwhile to use a user account with read only access. 4. If mysql is not in the system's PATH, the second line of the bat file will have to be changed to point to the mysql executable using an absolute path. 5. Make a scheduled task that runs the bat file.
Importing from DSI to ITrack Pro
How it works
A batch file is ran via a scheduled task that does the following:
- Using a command line FTP client, connects to a DSI provided FTP server
- Downloads all .xml files in a certain directory on the FTP server and puts them in the DSI Import application installation directory
- Deletes all of those .xml files from the remote FTP server if they successfully downloaded
- It then tells the ISoft-built DSI Import application to run. (You will most likely need a dev to compile you the most recent version. Also this application requires libmysql.dll)
- Connects to a MySQL server and ITrack Pro database using database connection info that must be supplied in a host.ini file(this can be copied from the customer's ITrack Pro client software installation).
- When the application is ran it scans its own directory for any & all .xml file(s)
- It then attempts to import all of the information(invoices, invoice line items, customers & it depletes quantity of inventory records) from all of the xml files
- Upon successful import it then deletes the .xml files from the DSI Import application directory
The batch file code
This is an example:
ncftpget -DD -u tehUsername -p tehPassword 192.168.1.100 "C:\Program Files\ISoft Data Systems\DSI Importer" /ISOFT-IN/*.xml
"C:\ITrack\DSI Importer\DSIImport.exe"