Absences from Sympa can be imported to the service. A csv-file must be created on the SFTP server. Creation timestamp must be in the file name. This ensures that if only changed information is transferred in the material, the previous information will not be overwritten under any circumstances.
The file is saved in UTF-8 encoding. Records are separated by semicolons (
;). The line feed character is a UNIX line feed character
LF. By default, this line break consists of almost all information systems.
The data does not contain a title row. In the data, one absence and its validity periods are presented on one row. The absence file must be generated from Sympa so that only new absences (type uusi) and/or deleted absences (type poisto) that have been created since the last absence import are present on the file as their own rows.
Rows in the file are processed in sequential order. For example if the first row inserts a new absence on Jan 1st and then the second row removes an absence on Jan 1st, then it will remove the absence it had just created. For this reason, if the import data is spread across multiple files you should ensure that users don't exist in multiple files at the same time, or if they do, that those files are in the correct order (we process the files from the SFTP server in the chronological order they were created in).
1. Setting person identifiers
Person's identifier can be set by editing person's employee number in Employees - Person's information - Identifiers
2. Setting event start end end times
Events created by the Sympa import will be created with the dates specified in the file import and the times as specified in the Worktime settings (Worktime -> Administration -> Working community settings/Setting groups-Setting group settings -> Work hours -> Rendering options -> Work hour event default start time/Work hour event default end time). 08:00 - 16:00 will be used if no times are specified.
3. Setting absence / holiday codes and SFTP settings
Absence / holiday codes and SFTP settings can be configured in Worktime -> Administration -> Working community settings/Setting groups-Setting group settings -> External services -> Sympa. If an event type has multiple possible codes, these can be set separated by a comma.
Note that SFTP settings are only available in working community settings.
Below is a description of the data and their additional information.
|1||Employee number||Employee number|
|2||Absence / holiday code||The codes are defined in the service UI under Sympa settings. If code does not exists then absence is created as holiday.|
Whether the row is a deletion or a new row. Accepts the following values:
Type 'uusi' will create the absence. Type 'poisto' will remove the absence.
|4||Vacation period||This is only present in holidays, in absences it is empty. Saved as description.|
|5||Start date||Absence start date, format
|6||End date||Absence end date, format
Example of the file can be seen below:
445;200;uusi;vacation period, something something;01.06.2016;28.06.2016
445;200;uusi;vacation period, something something. Wrong dates on previous one;06.06.2016;02.07.2016
445;200;poisto;vacation period, something something;01.06.2016;28.06.2016