< Back
Print

Send export files to a remote server (FTP, WebDAV, Azure Blob, …)

Sometimes you want to transfer your result files that you have created locally in the SAWSConnector (e.g. export to an Excel file including the images, manuals and data sheets) to another server. This is easily achievable with the following Job-related task.

In this article you will learn how to navigate its menus and how to export files to your specific location.

 

How to create a Job-Related Task

1) Go to Jobs (the so-called Jobcenter) in the SAWSConnector Suite.

2) Select Job-related rasks in the sub-menu.

3) And click on + (‘Add new task‘).

 

Another sub-menu opens where you can specify the basic conditions, for example when the task should start or what happens after the task is done. To learn more about this click on this link.

4) Click on the Task to do box and select ‘Send export files to a remote server (FTP, WebDAV, Azure Blob, …)‘.

And the Settings menu will open.

 

Settings

 

Conditions

Allows you to specify even more conditions and context for the follow-up job. You can create a condition by clicking on + (Add new condition).

To learn about this functionality in detail, please click on this LINK.

 

Protocol of file transfer

Here you can select your file transfer protocoll.

By now you can choose FTP, SFTP, FTPs, WebDAV and AzureBlobStorage in correlation with your needs and server structure.

Please note:  Choosing different hosters will activate different functions within the Job-related task. In this tutorial these will be highlightet via an asterisk (*).

 

Alternatively file to be transferred (relative to the project directory e.g. ../CSLive/data/cache)

Allows you to define a file for transfer by directly typing in the file path.

It is recommended to always begin the path with a /

Important: If you leave this box and Alternatively transfer files from DAM (prioritized) empty the result file of the Job-related task will be uploaded.

 

Alternatively transfer files from DAM (prioritized)

Allows you to choose files from the DAM for transfer via a context menu. These files will be prioritized.

Important: If you leave this box and Alternatively file to be transferred (relative to the project directory e.g. ../CSLive/data/cache) empty the result file of the Job-related Task will be uploaded.

 

Alternative filename

Here you can name your file.

Please note: The name box allows to use placeholders. You can find a list of all placeholders via this LINK.

 

ZIP behavior

If you export more then one file the task will store them in a ZIP archive for easier management. This drop-down menu lets you select how the created ZIP archives should be handled.

You can either choose to leave the ZIP archives in their original states, archive or unpack them before the transfer or unpack them without the top folder (for example if there is only only folder inside it, making a top folder redundant).

 

Create sub folder (Ymd_His) on FTP server

By activating this feature you are allowing the Job-related task to create a own folder on your FTP server.

 

Proxy Host with Port *

This option allows you to define an outgoing proxy for your system. By specifying a host and port, all outgoing SFTP network requests will be routed through the configured proxy server.

You can either enter a fixed proxy address (for example, proxy.mycompany.com:8080) or use the Contentserv system variables to automatically apply the proxy settings defined in your Contentserv configuration:

{CS:OutgoingProxyHost,core}:{CS:OutgoingProxyPort,core}

This ensures that the system dynamically uses the proxy host and port values set in the core configuration, simplifying setup and maintenance.

*ONLY AVAILABLE for exports into SFTP.

 

Please enter the Azure Connection String *

Enter your connection string to the AzureBlobStorage here.

*ONLY AVAILABLE for exports into AzureBlobStorage.

 

Blob container name

Allows you to name your blob container in the AzureBlobStorage.

*ONLY AVAILABLE for exports into AzureBlobStorage.

 

FTP server URL / address

Insert the adress and / or URL of your FTP server here.

 

Destination path on the FTP server

Allows you to directly determine an output path on your server.

It is recommended to always begin the path with: ‘../{your project name}/

 

FTP username

For the ActiveJob to access your FTP server insert your login username here.

 

FTP password

… and your password here.

 

Use incremental export

This function can be used to only upload files which are created after a specified time stamp.

To learn more please read the chapter about incremental data below.

 

Date of the last successful upload

Here you can create to subsequent time stamps to use the incremental export.

 

Working with incremental exports

Incremental exports means to upload, move, or export only new or updated files to minimize internet traffic. To achieve this the Job-related task uses an adjustable time stamp feature so only files that were created or altered after the set time stamp.

This can be particularly useful for shops with a large quantity of items.

 

Run Example for FTP, SFTP and FTPs

To fully understand how you to select an output target it is best demonstrated with a case example.

My goal for this example is to move my file to the json-export folder on my FTP server.

PLEASE NOTE: FTP, SFTP and FTPs are working different compared to WebDAV and AzureBlobStorage. To learn these, please visit the specified chapters below, although it is recommended to read this chapter first.

1) I want to equip my ‘Products‘ job with the specific task so I just click on it to open it.

2) Inside the ‘Products‘ job, go to the Job-related tasks and create one by clicking on + (Add new task).

3) For a Task to do I select ‘Send export files to a remote server (FTP, WebDAV, Azure Blob, …)‘.

The Settings menu opens.

4) Since I don’t have any more Conditions to set, I’ll just ignore them.

5) For Protocol of file transfer I select ‘FTP‘. (For this example, you can also choose ‘SFTP‘ oder ‘FTPs‘).

6) Since I want my result file to be uploaded, I leave the Alternatively file to be transferred (relative to the project directory e.g. ../CSLive/data/cache) empty.

7) The same goes for Alternatively transfer files from DAM (prioritized).

8) As an Alternative filename I use the placeholder system to create files with the finish date of the job attached. The full filename must therefore be: ‘{JOB:EndDateUnformatted}_products.json

9) For the ZIP behavior I let the files be send in their original states.

10) Since I have already created a sub folder I leave Create sub folder (Ymd_His) on FTP server blank.

11) As the FTP server URL / address I insert the URL of my FTP server.

12) As Destination path on the FTP server I type in ‘/inbox/json-export/‘, since I have created these folders before.

 

13) As the FTP username I insert my login.

14) As the FTP password I select correct the Contentserv credential.

15) Since I want to use the incremental export I activate it by clicking on the button.

16) And for Date of the last successful upload I choose a actual time stamp (which is probably a bit in the past while you reading this).

11) Last but not least I have to define which item should be exported, so I go to Jobs, then to Data Source and for the Root Node I select the ‘Valdipino poncho (11850)‘ Smart TV

12) For the final step I launch the ‘Products‘ job.

… and enjoy the results on my FTP server:

 

Transfer files using WebDAV

This task is also able to send files via WebDAV (Web Distributed Authoring and Versioning). Doing so, files can be sent to Nextcloud systems like Salesforce or ours on files.saws.de which we provide for every SAWSConnector customer. This can vary per system, but you can extract your WebDAV URL in the Nextcloud settings here:

The configuration of the task is very straightforward. Enter your URL, target folder path and authentication credentials. Please note, that the target folder must be already existent for the export to work.


On success, these messages appear in the export log:

I performed a file export using the DynamicJSON connector. My target file “products.json” was successfully placed into the folder.

 

Transfer files using Azure Blob Storage

To transfer the data to an Azure Blob Storage, you only need to specify the Azure Connection String and the container name. If the container does not exist, it will be created automatically.

The format of the Connection string must be provided in the following format:

DefaultEndpointsProtocol=[http|https];AccountName=[yourAccount];AccountKey=[yourKey]

How the data is transferred, i.e. unzipped, zipped, with sub-folders or without, can be set as for all other transfers. (see Common Settings for all transfer methods)

The result of the transfer can be viewed in the log. Depending on the log level of the job, different information is stored.

To check the transfer, you can use the Azure Storage Explorer

Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents