Zynk Workflow Documentation

This tutorial details the basic principles when dealing with an integration between an FTP server and Sage. This workflow will perform two basic tasks, which is the downloading orders from the FTP in to Sage and then passing product informationback up to the FTP. We assume that the orders will be saved in a ‘/download’ folder on the FTP, and will be stored in the Sage 50 UK Sales Order XML format.

You can download a copy of the workflow from  here. You will need to enter your FTP server, username and password into the pre-configured workflow variables to use this workflow.

Download Orders From the FTP - Phase 1

This part of the process will download all files from a ‘download’ folder on the FTP, and import the orders contained within them into Sage 50. If the import was successful, the file on the FTP will be moved to a ‘processed’ folder, to prevent the same orders from downloading again the next time the workflow runs. The process consists of the following tasks:

  1. FTP Repeater - This task will loop through all XML files in the ‘download’ folder on the FTP, and run the sub-tasks below for each file.
    1. Downloading Files with FTP - This task will download the current file from the FTP and store it in the workflow’s working directory. It does this by reading the name of the current file from the context variables from the above task.
  2. Importing Sales Orders into Sage 50 UK - This task will import the orders contained in the file downloaded by the previous task into Sage 50. It will write out any failed or successful orders in to separate files. As before, the context variables from the FTP Repeater task are used to get hold of the file currently being processed.
  3. If File Exists - This task simply checks the size of the success file from the previous task to determine whether the order was imported successfully. If the order had not imported successfully, this file would not contain any data. If the file exceeds the minimum length, the sub-task below will run.
    1. Renaming Files with FTP - This task will move the successfully imported order file to the /download/processed folder. This will prevent the file being downloaded again the next time the workflow runs, as it will no longer exist in the /download folder. Alternatively, if there is no requirement to preserve the order files for traceability purposes, the Deleting Files with FTP task could be used to delete the file from the FTP.

Upload Products to the FTP - Phase 2

This part of the process will export any modified products from Sage 50, and upload them to the FTP as a XML file in the Zynk XML Products format. The process consists of the following tasks:

  1. Exporting Stock Records from Sage 50 UK - This task will export modified product information from Sage 50 in Zynk XML format. The resulting file will be saved to the workflow’s working directory
  2. Uploading Files with FTP - This task will upload the output file from the previous task to the ‘/upload’ folder on the FTP. It will append a timestamp on to the end of the file name, to prevent any previously uploaded product files from being overwritten.

Archive - Phase 3

This is the final task in the process, and will archive off all data that was used by the workflow process. This allows for traceability and will assist when debugging the workflow.

  1. Archive Workflow Data - This task will archive off all data in the root of the workflow’s working directory.

If you have any queries on any of the above, feel free to contact our support team via email at support@zynk.com or via telephone on 0191 303 7279. Please note, as stated on the Auto Mapper task we do not support any changes to XSLT.


Back | Edit on Github