HR Admins can import past leave records into CiviHR. This feature is especially useful for migrating leave data from another system and storing all previous leave records in one place.
Before leave records can be imported, the entitlements for each staff member will first need to be set up. This means that staff will have the absence period and public holidays configured, alongside the leave types.
Make sure you've read the importing data instructions before attempting to import any new data into the system.
To import past leave records, the data must be formatted in a csv file. The fields in this file must match the leave fields in the system.
The columns to include in the csv file are:
- Contact ID
- Absence ID
- Start Date
- End Date
- Absence Date
- Total Quantity
Before you import past leave requests, you will need to export data from the system to find the contact ID for each staff member. This ID will allow you to link the past leave requests to the relevant staff record when importing the data.
For more on exporting contacts, read the Exporting Contacts article.
Export job contract IDs for all staff members
Add the appropriate job contract ID to each row of the leave request csv file.
Import leave requests
To import leave, go to Configure -> Leave -> Import Leave Requests. Upload the csv file, select the column header tick box, and press continue. This will take you through to the data mapping page. Match each data row to its matching field in CiviHR by selecting the relevant field name from the dropdown option. Press continue. This takes you to a preview screen showing a report of the data due to import. Check the numbers and fields match then press import when ready.
For a complete walkthrough of importing leave requests, watch the presentation below:
Step 1: To import Leave records, the first step is to open Configure on CiviHR Dashboard page.
Step 2: Click Leave
Step 3: Click Import Leave/Absence Requests
Step 4: Click Choose file to select the CSV file containing the leave absence record.
Step 5: For this tutorial, the CSV file for import is Staff leave absences
Step 6: Notice that the maximum size of the file for upload is 2MB, also the file format type is specified.
Step 7: Check the box to confirm whether the First row of the file contains column headers.
Step 8: Select the date format used in your CSV file.
Step 9: Click CONTINUE to move to the next step
Step 10: Match fields from your CSV file to appropriate CiviHR fields by clicking on the drop down arrow to choose from the list of CiviHR Fields.
Step 11: The first time you import from a particular file, it's a good idea to check the box to "Save this field mapping"
The saved mapping can then be easily reused the next time similar data is imported, by requesting that it be loaded at this step.
Step 12: Click CONTINUE to move to the next step
Step 13: This screen previews the results of importing your data, reports the number of rows to be imported, and allows you to double check your field matches.
Step 14: To start the import, click IMPORT NOW
Step 15: This screen shows how many contact records were successfully imported.
Step 16: Click DONE to exit the page.
Check to make sure that your import has worked as expected by searching for the contacts you just imported and examine their Leave profile record.