Service can be read in files containing events on scheduled runs. The setup of the transfer and import contents are set up in similar manner than importing events using user interface.
With scheduled runs the available columns are a bit different and setup also includes setting up the scheduled transfers. Available column contents are described below. The setup of imported data is done as explained here.
In the import settings you will define the event creator, who is used to create the events (look at the settings below). The edits based on the imported file are done with this person's information. When the import file rows are processed they are compared if the specific event is already created by this event creator set in the settings. If the persons events do not contain the event imported in the file it will be added to persons events. Events that are no longer part of the imported events, and are created by event creator, are removed from persons events.
The fill imported must always include all the events for the person and additions and deletions to persons events are performed based on the file. It means for example that a persons event is removed if it has earlier been transferred in the file, but no longer exists in the file. This way the import file always presents the real situation and events in the service are updated to match this. The source system must create the file always, also when it would only include deleted rows, which means an empty file.
If you are importing file in a format that it only included added and deleter rows, look at the instructions about Sympa - formatted import file in here.
Import settings define how many days of history the import file contains. This setting allows the sended to not send the full history of the events, but rather only the amount of days into the history that is set in the settings.
Nepton reads in the file based on the configured settings. File is moved into archive folder if the folder is set. If archive folder is not set, then file is removed. In case there is an problem with the contents of the file, the file is kept in the original folder.
Import file columns
The import file columns are described in the article about importing events via user interface.
Automating and scheduling imports
Event imports can be automated to repeat on a daily basis (or other time schedule) providing you have an SFTP server where Nepton can fetch the file from. The timing of these can vary but are usually run in the morning before 12pm.
The settings required to configure automated imports are described below. After these settings are done the schedule will run on the next day. The results of the run will be stored into the service log.
|Person used to create event||The person who is marked as the creator of the imported events. Note: For imports, it is a good idea to create your own administrator user who will perform the import. This ensures that if you want to delete events that came through the import, they are always just events imported by this single user. You can for example create a user named "Nepton Import" with administrative rights and use it only for scheduled data import.|
|Import file name||You can use this setting in three ways:
|SFTP host address||Address of file server where to fetch the file. The server should be able to accept SFTP connections.|
|SFTP username||Username to login to file server.|
|Use public key authentication||Public keys can be configured for authentication|
|SFTP password||Password to login to file server.|
|SFTP relative directory path||The directory path where to find the files to import. This is relative to the default directory which is opened when first connecting to the file server e.g. absences/to-nepton/|
|SFTP relative directory path for archiving||Once an import file is processed it is deleted so it doesn't get imported again. We recommend to archive the files by setting the archive folder e.g. absences/to-nepton/processed. Files will then be archived into separate folder for each month.|
|Amount of days to rewrite in the past||
The setting determines how many past days are processed. Note: The transaction end date is used to see if it is among the transactions being processed.
If there is a previously imported event from the past days that is no longer in the transfer file, it will be marked as deleted. In this way, events that have been imported into Nepton but then deleted from the source system can be deleted.
This setting defaults to zero if not set.
Note: It is important that the "Person who is displayed as the creator of events" setting has a user who only creates events via import. So, for example, a user "Nepton Import" can be created that has maintenance rights and is only used for scheduled data import.
|Approve events on import||If "Yes" is selected, transactions will be accepted during import.|
|When times not provided, use the default begin and end times||
If the selection is "Yes" and the event does not have a start or end time, the default times set in the section Work hours > Display settings are used.
If the selection is not given or the selection is "No" and the event does not have a start or end time, the start time is 00:00 and the end time is 24:00.
|Import period rule #n||
These rules define on which days the import is run. e.g.
Rules to trigger the import at specific times are not supported and imports are processed during the morning (usually between 3am to 12pm).
Date format in the import file for fields that indicate a date. The default format is Y-m-d (for example 2021-08-04). The format is defined in the same way as with PHP date function.
Time format in the import file for fields that indicate a time. Default format is H:i:s (for example. 15:30:00). The format is defined in the same way as with PHP date function.
|Date and time format||
Date and time format in the import file for fields that indicate date and time. Default format is Y-m-d H:i:s (for example. 2021-08-25 15:30:00). The format is defined in the same way as with PHP date function.
Character set of the file, default is
What character is used as a delimiter. Default value is
If comma is used as a delimiter, the following value should be used:
What character is used as an enclosure. Default value is
|Skip rows with unknown person||
If the value is yes, lines with an unknown person will be skipped instead of marking the import as failed.
|Personnel numbers to skip||
Comma separated list of personnel numbers of persons that you want to skip in import. For example setting this to be "1234,5678,1995" means that events won't be imported for persons with personnel numbers 1234, 5678 or 1995.
|Event type codes to skip||
Comma separated list of event type codes that you want to skip in import. For example setting this to be "1234,5678,1995" means that event types with codes 1234, 5678 or 1995 won't be imported.
|Column order relevant to integration||
Yes/No. If import file contains a header row for columns, set this to be "No" as columns are detected from header row. If import file does not contain a header row, set this to be "Yes"
if import file contains header, then set The order of the columns matters to value No. In this case each column name must match the column title defined in the settings. For eg:
If import file does not contain header then set The order of the columns matters to value Yes then the file column order must match the setting created. For eg: