The File transfer protocol is a standard network protocol used to transfer computer files from one to another host over a TCP network, such as the internet. The standard is widely used due to its convenient characteristics.
Sometimes we need to transfer the data stored in an FTP server to an application, such as Salesforce, MySQL, or vice versa.
There are several tools that can help us to perform this task. However, not all of them have the same capacities. Among them, DBSync stands out by its task automation ability.
Automating your data transfer
Different from other apps, the DBSync lets us transfer file data from an ftp server to any other source available in DBSync, such as Salesforce, and to move and delete files stored in an ftp server in an automated manner.
In order to do this, DBSync uses the FTP Connector, which implements a file transport channel that lets you transfer files between DBSync and an external FTP server. This can be done in two modes: Trigger (from where a file is read) or Rule (writes a file to an FTP server).
The DBSync Connector allows you to do this with multiple files, and has the ability to select them by using regular expressions. In addition, it provides you with the option to do post-processing operations. This rich capacity gives the DBSync connector an unparalleled advantage, as it frees up your time and reduces your probability of making mistakes.
How to use the FTP connector
Example: transferring data from a file stored in an FTP server to a Salesforce custom object. In this example we will transfer data from Salesforce to an FTP server and vice versa. Let’s solve this problem with DBSync in ten easy steps.
Step 1: Create a new project.
When it comes to defining a project, we have two options: importing an existing one, or defining a new project. In this example, we will define a new project.
For this, we need to press the button Create New Project. As a result, we will get a dialog box asking for the name of our project. We input MoveData, and then press the Save button.
Step 2: Create an FTP connector.
An FTP connector links DBSync to our FTP server. In order to create it, we need to press the Create New Connector button, and to define two parameters: the connector’s name and the type of connector.
Thus, we first write our connector’s name. In our example: MyFTPConnector. Note that the connector’s name cannot include any spaces.
Then, we define the connector’s type. Here the program presents us with a drop down menu, from where we select the option FTP connector.
Once we have created our connector, we have to define its parameters. The most important aspect to understand here, is that there are two verification options: password and private key.
If we have choose a password, we just need to enter its value. (figure 3)
If we prefer to use a private key, we need to check the Use SSH Key for Authentication option and input the private key (figure 4).
Optionally, we can also add a public key and a pass phrase (figure 5).
Step 3: Create a Salesforce connection.
We need now to create a link to Salesforce. For this, we create a new connector of type Salesforce Connector, which we name MySalesforce. Once again, we must remember that the name cannot have any empty spaces.
After pressing the Save button, the app shows a Salesforce login screen. Here we need to input our Salesforce login credentials.
Once the credentials have been accepted, we see a screen confirming the successful connection.
Wrapping up Part 1
We have seen that DBSync has the advantage of automating the data transfer between Salesforce and an FTP server. In this first part of a series of three articles, we have also seen an example on how to connect DBSync to Salesforce and to an FTP server.
In part two, we will see how to create a process, a workflow, a trigger, a rule, and a mapping, and to configure the post processing.