Set up SFTP for HR import
  • 25 Apr 2023
  • 2 minutes to read

Set up SFTP for HR import


Article Summary

Configure HR import to use CSV files from the file system

Before you can set up SSH File Transfer Protocol (SFTP) for HR import you will need to ensure that you have access, as it is not enabled by default.

Follow these steps to set up SFTP for HR import:

  1. Navigate to the HR import default settings via Quick-access menu > HR import.
  2. Set the File access setting to Directory check and set Files directory to '/totara/data/sftp' (without the quotes). When first configuring SFTP for HR import it makes sense to trigger the sync manually, but once you are happy with the behaviour you may want to enable the Scheduled HR importing setting to automatically check for new files and run the import.
  3. Go to Manage elements and enable any elements you wish to import. Each element can control its own File access and Schedule settings, but will use the default setting if not otherwise specified. Also ensure the source is set to CSV here.
  4. The Source contains all records is a critical setting. If set to No (the default) it will create and update records in the file. If you set it to Yes then it expects the file to be a complete list of all users and will delete any users not found in the file. If unsure, leave it set to No.
  5. Go to the Sources section and view the CSV page for each element you have enabled. Here you can see the expected location for the files as well as the file format. You can remap column headings to match your file's structure here, but the content role is expected to conform to the required structure. See HR import CSV file available fields for more information on the required structure.

Import a test file

We recommend creating a small import file with one or two test users and testing your import before trying with your real data. Follow these steps to import a test file:

  1. Create a file with the name given on the Sources CSV page. For example, this would be 'user.csv' for users or 'pos.csv' for positions.
  2. The file is expected to be located in a subdirectory called 'csv/ready' below the root of your SFTP directory, so after logging in via SFTP make sure to create those folders and put the file with the correct name inside. The full path to the file will be something like 'csv/ready/user.csv'.
  3. Once you have uploaded a suitably formatted file to the correct location, go to the Run HR import page (Quick-access menu > HR import > Run HR import) and check for errors. If everything has been set up correctly, click Run HR import.
  4. Once the import is complete you should be able to see a record of what was done on the HR import log page. If your file contained any formatting issues you will see these detailed here. If required, correct the errors and upload the file again.
  5. After a successful HR import run, HR import will delete the file from the SFTP directory. Upload it again to repeat the process. Once you are satisfied that the process is working as expected you may want to enable automated scheduling.

Automating HR imports via SFTP

Once your imports are working and HR import is scheduled, enable any automation on your side to automatically upload new HR import files to the correct folder via SFTP, so that the files are available when the HR import schedule is expecting them.

© Copyright 2024 Totara Learning Solutions. All rights reserved.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.