SFTP Integration – Route4Me SFTP Data Sync
Route4Me’s secure SFTP service permits systems external to Route4Me to upload data to Route4Me’s platform using CSV files without spending time on API and SDK integration with Route4Me’s core platform. Valid files uploaded to the secure SFTP server should contain a list of addresses that need to be optimally resequenced. The secure SFTP system retrieves uploaded files, processes them through the Route4Me optimization software, and then uploads optimized route files back into the secure SFTP server so external systems can download the processed data.
Table of Contents
Route4Me SFTP Address Data Sync Processes Overview
- Get SFTP credentials (username and password).
To get your credentials, simply contact the Route4Me Customer Success Department. - Connect to the SFTP server with your credentials.
- Crease a custom configuration file and upload it.
- Upload your route data CSV file with customer addresses.
- Route4Me’s downloads, parses, and validates the files.
Addresses are automatically validated and geocoded. Learn more about Address Geocoding. - Route4Me automatically optimizes routes with your addresses and settings and uploads them to the SFTP server.
NOTE: After 72-hour expiration period, original and optimized route files are automatically deleted. - The new routes get added to your account on the Route4Me Web Platform.
Connect To Route4Me’s Secure SFTP Server
Route4Me has a proprietary secure SFTP server hosted on Google’s Cloud Environment. It uses the SSH2 (SFTP) protocol for data sync and encrypts data-a-rest using AES-256 for maximum security. You may use any SFTP software for address and order data sync. In this guide, FileZilla is used as an example.
After gettings your credentials from our Customer Success Department, log in to the server using SSH port 22. For more advanced log-in options, click the Server Icon in the top-left.
Then, fill out any required fields and click “Connect“.
Configure Route Settings For Automated SFTP Route Optimization
Default route settings are the same as those from your account. If your CSV doesn’t contain a route date, the upload date will automatically be used as the route date. NOTE: Only relevant if you want to use Route4Me for dispatching and tracking routes.
You can easily customize route settings for the SFTP server with a JSON configuration file. Name the file “params.json” and place in the root directory of the server. Lean more about configuration file specifications.
NOTE: If SFTP is used for optimization, route files will be suffixed with a timestamp of when optimization was completed.
Recommended minimum JSON file contents:
default_params =
{
"rt": 1,
"algorithm_type": 3,
"route_max_duration": 43200,
"route_time": 25200,
"travel_mode": "Driving",
"disable_optimization": false,
"optimize": "Time",
"route_date": 1522368000
}
Upload Files Formatting And Specifications
File formatting and specifications are identical to Route4Me’s Spreadsheets Requirements. Uploaded spreadsheet can contain such columns as Cube, Weight, Alias, Custom Data, etc. Additionally, you can add the “driver_id” column, and the planned routes will be automatically assigned to the users with the respective specified ID.
The main difference between SFTP optimization and the Route4Me Web Software is the “route_group” column, which identifies the existing route structure within an optimized file. If the “route_group” and “seq” columns are not provided, then you will get the following error in the “logs” folder: “Error creating routes: Error file doesn’t have the route_group column required from file“.
Delete Protected/Prohibited | Folder Name | Description |
---|---|---|
Yes | Original | Contains newly uploaded route data files. |
Yes | Optimized | Contains the output of successfully optimized route optimizations. |
Yes | Logs | Contains positive and negative log files of all transactions and activities done within the scope of the SFTP account. |

Once you upload the configuration file to the root directory, you can start uploading route data files for optimization. To do so, first, upload a CSV file with route data into the “original” folder. The name of the route data file should end with “.original” (i.e., “YYYYMMDD_BATCHNAME.csv” → “YYYYMMDD_BATCHNAME.original.csv“).
To optimize the route data file, into the “original” folder, upload an empty CSV file with the same file name syntax as in the route data file with “.completed” at the end of the file name. For example, if you upload a route data file that is named “YYYYMMDD_BATCHNAME.original.csv“, then you need to upload an empty CSV file named “YYYYMMDD_BATCHNAME.original.completed.csv” to optimize the original route data file.
All optimized routes are re-uploaded into the “optimized” folder, preserving their originally file name syntax. If the original input file is named “YYYYMMDD_BATCHNAME.original.csv” then the optimized output file will be “YYYYMMDD_BATCHNAME.optimized.csv“.
Optimization Errors SFTP Sync Troubleshooting
Files that fail to be optimized are in the “optimized“ or “original“ folder, with their file name suffixed with “error“.
Log files in the SFTP server typically cover data issues, formatting issues, missing columns, etc. From time to time, unexpected edge cases may occur that do not have any known error codes.
Suggestions:
- Attempt workarounds using different cases (lowercase and uppercase): in column headers or file names.
- Look for additional or missing delimiters, such as underscores.
- Look for additional or missing enclosure characters, such as double quotes.
- Cross system-compatibility: Linux – Mac – PC, be aware of newlines and carriage returns.
- Locale: Ensure that ASCII or UTF8 is used for file transmissions and names. Ensure dates and formats are consistent with requirements.
Upload File Processing Time And Optimization Duration
Typical route processing times are less than 10 seconds for a 100-destination route or route group, with several hundred stops per route taking closer to 45–60 seconds.
Route Optimization Concurrency And Rate Limiting
Currently, there are no limits on the number of routes or files that can be uploaded to your SFTP account. However, account-level limits for geocoding and route concurrency are inherited and enforced from the master Route4Me account. By default, the system will optimize one route at a time.
Visit Route4Me's Marketplace to Check out Associated Modules:
- Data
SFTP Data Sync
- Operations
Advanced Team Management Add-On
Last Updated: