Object of the interface
The interface allows you to import absences entered and validated from third-party software into Timesquare®. The principle is to provide the expected information in a text file that will be read and interpreted by the interface in order to update the database.
In order to import an absence on a validated schedule, the schedule will first be de-validated, the absence will be added and the schedule will be validated again, even if the new schedule generates illegalities.
Learn more about setting up this import.
Processing of the imported information
Content of an absence import row
For each row, the file includes in particular:
- A period which corresponds to the period of deletion of absences present in the database in Timesquare®.
- An identifier that corresponds to the data subject.
- A reason for absence.
- A start date and an end date. These latter dates must fall within the deletion period. In other words, the absence deletion period must imperatively cover all the periods concerned by the imported absences and be identical for all the rows of the file.
Example
I am importing for a period of deletion of absences covering the whole month of June, that is to say from 06/01/2020 to 06/30/2020. This import contains an absence of the Paid Leave type from 06/08/2020 to 06/10/2020 for the employee whose identifier is EMP1.
The file to import therefore contains the following line:
01/06/2020;30/06/2020;EMP1;PaidLeave;08/06/2020;J;0;10/06/2020;J;0;0
Absences to be deleted from Timesquare®beforehand
I can define absences to be deleted over a period for the structure on which the import is performed. This deletion is performed on all the people present in the import structure, even if they are not present in the file.
To do this, I use the Selection of absences to be deleted section of the absence import settings.
If the Selection of absences to be deleted section is entered:
- In case of reimporting an already existing period in Timesquare®, it is necessary to import all the absences of the employees assigned to the structure for the entire import period.
- If absences have been entered manually in Timesquare® before the import, these will be deleted for the employees assigned to the structure at the time of launching the import, even if the employee is not listed in the import file.
Note: If an imported absence is outside the deletion period, it is still imported. On the other hand, absence deletion is only performed for the deletion period.
Example
In the configuration for importing absences, I define that Paid Leave and Disease absences can be deleted. The absence Recovery is therefore not deleted.
EMP1 and EMP2 are assigned to structure LYON.
Before import:
- EMP1 has a Recovery type absence on 06/01/2020.
- EMP2 has a Paid Leave type absence from 06/15/2020 to 06/19/2020.
I import the file with only the following line:
01/06/2020;30/06/2020;EMP1;Disease;08/06/2020;J;0;10/06/2020;J;0;0
After importing this file to the LYON structure, Timesquare® performs the following actions:
- The EMP1 Recovery absence is not deleted because it is not one of the absences to be deleted selected in the import parameters.
- The Paid Leave absence from EMP2 is deleted because it is one of the absences to be deleted selected in the import parameters, even if EMP2 is not part of the file.
- The Disease absence of EMP1 from 06/08/2020 to 06/10/2020 is imported into Timesquare.
File name
The file can be named in two ways depending on whether the third-party system making it available generates a different file for each day or a single file containing multiple days. The file contains one row per absence.
Unique file
The name of the import file is free (label + extension) but once defined in the import settings, it should not change.
Example 1: the Label field in the configuration and the import file are both named absences.txt.
Example 2: the Label control in the configuration and the import file are both named absences_Timesquare.001
Multiple files
The names of the import files must follow a particular syntax. The File label field must explain the nomenclature chosen. Thus, LabelYYYYMMDD.EXT, LabelJJMMAAAA.EXT, LabelJJMMAA.EXT, LabelAAAAMMJJ.EXT and LabelAAMMJJ.EXT are the name retained where:
- "Label" is an alphanumeric character string that I can customize
- "DD" and "JJ" correspond to the day, "MM" corresponds to the month, "YYYY" and "AAAA" correspond to the year on 4 characters, "AA" corresponds to the year on 2 characters
- "EXT" an alphanumeric string of up to three characters that I can customize
Example: The Label field in the configuration is named absencesYYYYMMDD.001 and the three import files are named absences20200504.001, absences20200505.001 and absences20200506.001.
Format
Text. UTF-8 encoding.
Separator between two information
The separator between two pieces of information is the semicolon (;).
Description of the file content
| Field name | Type | Length | Notes |
|---|---|---|---|
| Start date deletion | Date | X | DD/MM/YYYY |
| End date deletion | Date | X | DD/MM/YYYY |
| Employee ID | Alphanumerical | X | 255 characters maximum |
| Reason for absence | Alphanumerical | X | 12 characters maximum |
| Start date | Date | X | DD/MM/YYYY |
| Start unit | Alphanumerical | X | J for Day or H for Hour |
| Start time | Time | X | HHNN |
| End date | Date | X | DD/MM/YYYY |
| End unit | Alphanumerical | X | J for Day or H for Hour |
| End time | Time | X | HHNN |
| Duration | Time | X | HHNN |
Rules
- The start date and the end date of absence correspond respectively to the 1st and last day of absence.
- Start unit and End unit can be different and qualify start date and end date. If they are different and the end date-start date > 1 then the days between start day and end day are of type J (for day).
- The start time and the end time have the value 0 (zero) if the start unit is different from H (for hour).
- The duration is 0 (zero) if the starting unit is different from H (for hour).
- The processing is different depending on the value of Start Unit and End Unit (which are the same):
- J : a complete absence is imported which cancels and replaces any event of the day.
- H : a partial absence is imported from start time to end time.
Example
01/04/2026;30/04/2026;BRZ07;CPBRZ;02/04/2026;J;0;03/04/2026;J;0;0
01/04/2026;30/04/2026;BRZ07;CPBRZ;09/04/2026;J;0;09/04/2026;J;0;0730
01/04/2026;30/04/2026;BRZ07;CPBRZ;22/04/2026;H;0900;22/04/2026;H;1200;0
01/04/2026;30/04/2026;BRZ07;CPBRZ;25/04/2026;H;0900;25/04/2026;H;1200;0230
Comments
0 comments
Please sign in to leave a comment.