⚙️File specification for payroll transactions to be imported into HRM Payroll
This article contains a description of how to structure files with payroll transactions (text files) for import to HRM Payroll.
File format and file requirements
The file must be a text file, for example with the file extension .csv, .tsv or .dta.
- File name: We recommend that you give each file a unique file name, for example
Lon_20230525_01.csv. - Field delimiter: Use
<;>or. - Line break: Use
CrLf, which is the standard character for files in Windows-based systems. - Character encoding: UTF-8.
- Header row: We recommend that the top row contains headers for each field, but this is not a requirement.
Import of payroll transactions
This file is used both for transferring absence transactions such as sickness and annual leave, time transactions such as e.g. unsocial working hours, overtime and worked time, as well as other types of payroll transactions such as e.g. per diem allowance and expenses allowance.
If the file is created by a time reporting system and contains absence transactions, it is important to also create a schedule file alongside this file. Schedule must first be imported or manually entered in HRM before absence transactions can be imported. Standard schedules can also be added for employees, but it is then important that the schedule shows the actual shifts for the employee.
You can also create several files if, for example, you want a separate file for absence transactions.
| Field Name | Description |
| Employee number | The employee number to which the entry belongs. (Alphanumeric max 10 chars) |
| Pay type no. | Pay type number (Numeric max 3 chars) |
| Quantity | Quantity (decimal number) |
| Quantity unit | The unit for quantity; can be 'hrs', 'days', 'cal.days', 'pcs', 'km', '10km' or omitted if the transaction does not involve absence. |
| Unit price | Unit price (decimal number) |
| Amount | Amount (decimal number) |
| From date | The transaction's start date in the format YYYYMMDD. |
| To date | The transaction's end date in the format YYYYMMDD. |
| Extent % | Extent in % (decimal number). Example: 72.5 in the file corresponds to 72.5% |
| Holiday factor | Sets the holiday factor for the pay line date interval if specified. Must be between 0.6 and 25 |
| Child ID | Unique ID identifying a child for parental leave |
| Comment | Text message displayed on the payslip alongside the pay line. |
| Account coding levels (1-xxx) | Account coding can be e.g. Account, Cost Centre, Project, Department, Business Unit, etc., and can be included in the file (Alphanumeric fields). If using multiple account coding dimensions, these must be separated into unique fields. |
All time transaction rows must Always have employee number and pay code; the other required values depend on the type of transaction.
All decimal numbers can be written with either a comma (,) or a decimal point (.) as a decimal separator.
Import of absence
When importing absence, The main rule is to create one record per absence period. For example, if you are absent for the whole of January, this becomes one row in the file with dates from 1 January to 31 January. If the absence extends across days off, e.g. annual leave over two weeks, the absence does not need to be split into two rows.
It is also very Important to correctly specify the extent of absence in the extent field. You can choose to omit extent and instead submit the number of hours/days including unit. HRM will then calculate the extent against the schedule, which means a schedule must exist as if you worked and were not absent. For example, if you have a schedule of 8 hours in a day and you submit that you were sick for 4 hours (alternatively 0.5 days) that day, HRM will count this as 50% sick. It is recommended to send extent.
It is also Important that if the extent varies for different dates, the absence must be split into several rows. For example, if you become sick and go home during a workday and then are sick for the rest of the week, The first day must be its own record as the day's extent is different.
If you have been absent at the end of a month/period that continues into the next month/period, and the month ends with days off, it is Important that the transaction's dates also include the days off you were absent. If the following month starts with a day off, this must also be included in the absence interval.
For example, if you are on parental leave 100% during January and 31 January is a Saturday, the absence transaction dates should be from 1 January to 31 January. If the absence continues throughout February, this absence must be reported for the next payroll period from 1 February to 28 February. This is Important, as absence over days off also affects wage calculations.
Calculation in HRM of imported absence transactions
The following applies to number and extent for the different units when importing absence. If the pay code in HRM is not linked to a reason for absence, they are imported as they appear in the import file.
Calendar days (kdgr)
For transactions with the unit kdgr, dates and extent are used for calculation. The Number of days should be the Number of calendar days between the transaction dates. If extent is not in the file, it is calculated by dividing the Number of days in the file by the Number of calendar days between the dates (which in normal cases becomes 100%).
Example: 50% on sick leave for a full month
From: 2023-10-01, To: 2023-10-31, Number: 31, Unit: kdgr, Extent: 50
Work days (dgr)
For transactions with the unit dgr, dates and extent are used for calculation. Number of days can be the Number of work days (e.g. 5 for one week) or decimal absence days (e.g. 2.5 for one week at 50%), depending on requirements and collective agreement rules. The recommended method is to send extent and Number of full days according to the example below. If extent is not in the file, it is calculated by dividing the Number of days in the file by the Number of work days according to the schedule between the transaction's dates.
Example: 50% sick Monday - Friday
From: 2012-10-01, To: 2012-10-05, Number: 5, Unit: dgr, Extent: 50
Hours (tim)
For transactions with the unit tim, dates and number are used for calculation. Note that extent is not used, only the number of hours is relevant. Extent is calculated by dividing the number of hours in the file by the number of scheduled hours between the transaction's dates.
Example: 50% sick one workday with schedule time 8 hours
From: 2012-10-01, To: 2012-10-01, Number: 4, Unit: tim, Extent: left blank.
Read here how to create an import template to import/read payroll transactions in the payroll process.
Please note: This article is AI-translated. This means that linguistic errors or misunderstandings may occur.