The SSH File Transfer Protocol (also known as Secure File Transfer Protocol or SFTP) is a network protocol that provides file access, file transfer and file management over any reliable data stream.
A MyExpensesTM user with SFTP administrator access can configure the system to automatically export files to and/or import files from a SFTP server either belonging to the MyExpensesTM customer or a SFTP server belonging to a third party.
MyExpensesTM currently supports the following file exports:
- Export interfaces – any exported batch file can be automatically sent to a remote SFTP server.
MyExpensesTM currently supports the following file imports:
- Inbound interfaces – any file that can be imported as an inbound interface can be automatically read from a remote SFTP server.
- Bank link – any transaction file supported by MyExpensesTM bank link can be automatically read from a remote SFTP server.
This document is a guide to how to setup SFTP in MyExpensesTM as an administrator and how to use SFTP for the export and imports described above. Section 2 describes the core SFTP configuration. Sections 3 to 5 describe how the export and imports work with SFTP.
1.1. Licensing and Access Levels
The customer requires SFTP licensing switched on in MyExpensesTM in order to setup SFTP transfers. Customer Administrator users require SFTP ► ADMIN access level to view the SFTP Configuration page.
1. SFTP Configuration
The core SFTP configuration page can be found in MyExpensesTM by navigating to:
Administrator ►System ►SFTP Configuration
2.1. Servers and Login
Click Add a new server to add a new SFTP server:
Fill in the Description field with a friendly name for the server and fill in the Host name field with the server’s name or IP address
We also need to login to the SFTP server using a username and either a password or a SSH key as authentication.
To login using a password, select Password as the authentication:
Fill in the Username and Password fields. Press the button to reveal the password on the screen.
To login using a SSH key, select SSH key as the authentication:
Fill in the Username field. The user (client) public key is shown on the screen. Click Export to file to download it to a file. This will need to be imported and registered on the SFTP server against this user for them to login.
Once a server has been added, the SFTP configuration page will show more option buttons on the left as shown below. Servers may be soft deleted and recovered as this the case with most entities in MyExpensesTM. Deleted servers are disabled in MyExpensesTM and won’t be used.
2.2. Upload Transfers
Clicking on Upload transfers shows a list of file transfers that have been setup to transfer files from MyExpensesTM to a SFTP server. Currently there are only export interfaces that fall into this category. To add a new one, click Add a new export interface transfer:
Fill in the Description field with a friendly name for the transfer. Select the Server to be used for the transfer. Optionally, provide a Server Folder for the files to be transferred to on the server. This will be a folder relative to the root folder associated with the logged in user. If blank, the root folder will be used. Finally, set the Schedule (times) that you wish the transfer to be active each day. By default, the transfer is active 24 hours a day, but you can alternatively set a time window. This must be longer than 30 minutes.
Export interface transfers may be soft deleted and recovered as this the case with most entities in MyExpensesTM. Deleted export interface transfers are disabled in MyExpensesTM and won’t be used.
Once you have created an export interface transfer, it will be listed on the main page:
The export interface transfer will not work until its’ filters have been set. To do this, click the button:
Currently, the only filters are claim types. By assigning a claim type then any batch files created for export that use this claim type will be eligible for transfer using this transfer. See section 3.
2.3. Download Transfers
Clicking on Download transfers shows a list of file transfers that have been setup to transfer files from a SFTP server to MyExpensesTM. Currently there are two download transfers – inbound interfaces and bank link.
2.3.1. Inbound Interfaces
To add a new one, click Add a new inbound interface transfer:
The settings are like those for export interfaces described in section 2.2 except for File Mask. This setting filters what files are included in the transfer. For example, setting the file mask to *.csv will only transfer files with a csv extension.
Inbound interface transfers may be soft deleted and recovered as this the case with most entities in MyExpensesTM. Deleted inbound interface transfers are disabled in MyExpensesTM and won’t be used.
Once you have created an inbound interface transfer, it will be listed on the main page:
2.3.2. Bank link
To add a new one, click Add a new bank link transfer:
The settings are identical to those for inbound interface transfers (section 2.3.1).
Bank link transfers may be soft deleted and recovered as this the case with most entities in MyExpensesTM. Deleted bank link transfers are disabled in MyExpensesTM and won’t be used.
Once you have created a bank link transfer, it will be listed on the main page:
3. Export Interfaces
In Expenses ► Export or MyTime ► Export or TimeOff ► Export or InvoiceFlow ► Export, on selecting a batch to be exported and the export format e.g., Sage Line 200 PI, you will see the batch output on the screen in the desired format:
Here, you can download the output as a file by clicking
Alternatively (and assuming the system has been setup to allow SFTP transfer of export interface batches), you will see another button: . On clicking this, MyExpensesTM will look for SFTP export interface transfers with matching assigned filters (currently claim type). If one or more transfers are found to match, the following message will appear:
MyExpensesTM is constantly running a background task which is scanning for files ready to be transferred and then carrying out transfers of any files found. The background task will in due course notice the batch files that have been created here and transfer the files to the SFTP server associated with each transfer. Note that this may not happen straight away if a transfer has a schedule with a time window set in which case the transfer will be delayed until that time.
If, clicking on the button, there are no matching SFTP transfers, then the following message will appear, and no batch file will be produced for transfer.
4. Inbound Interfaces
MyExpensesTM is constantly running a background task which is scanning for files ready to be transferred and then carrying out transfers of any files found. For inbound interfaces, any files found on the SFTP server will be downloaded to MyExpensesTM. For transfers with a schedule set to a time window, the transfer will be delayed until the next active time.
Once an inbound interface file has been transferred to MyExpensesTM, the file will be imported and appear in inbound interfaces (Administration ► Tools ► Inbound interfaces) the next time the MyExpensesTM automation is run. This may take a couple of hours.
1. Bank Link
MyExpensesTM is constantly running a background task which is scanning for files ready to be transferred and then carrying out transfers of any files found. For bank link, any files found on the SFTP server will be downloaded to MyExpensesTM. For transfers with a schedule set to a time window, the transfer will be delayed until the next active time.
For Bank Link to pick up transaction files received using SFTP transfer(s), one or more SFTP banks need to be created in Bank Link. To do this, navigate to Administration ► Expenses ► Bank Link:
Select the Banks option on the left and click Add a new bank at the bottom of the screen.
Click Continue next to SFTP:
Enter the Bank name of the bank where the transaction files are coming from, i.e., where the SFTP server is hosted.
Select the File type to match the format of the transaction files expected from this bank.
By default, the SFTP server is pre-selected as Bank. This is correct as the files are coming from the banks’ SFTP server.
Finally, select the bank link SFTP transfer. The transfers listed here are that setup in the SFTP configuration (see section 2.3.2).
Bank Link is now configured to import transactions from files received using SFTP from the server associated with the selected transfer. The transactions are imported from the received files according to the schedule setup in Bank Link.
6. Event Log
MyExpensesTM is constantly running a background task which is scanning for files ready to be transferred and then carrying out transfers of any files found. The activity of this background task is constantly being captured by the system in an event log.
The contents of the event log can be viewed by navigating to Administration ► System ► SFTP Configuration and clicking on the Event log option on the left of the page:
The events can be filtered by:
- Event type: Transfer events (marked by
) log when a file was successfully transferred. Exception events (marked by
) log any problems encountered that prevented a transfer from occurring.
- Date: Note that events are only kept for a set number of days defined by MyExpensesTM system administrators. This cannot be changed by company administrators.
- Transfer type: This is currently export interfaces, inbound interfaces or bank link.
- Transfer: This shows only the events related to a particular transfer.
Click on the next to an event to show it in a popup window (transfer event):
…or for an exception event:
This shows the full timestamp of the event and for long error messages allows the whole error message to be seen.