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
- Quantity
- Total Quantity
- Comments
- Status
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.
Initial Process
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
Importing Leave
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: