Add and change employees (UpdateConnector KnEmployee)
UpdateConnector to add and change employees.
UpdateConnector name: KnEmployee
Profit also contains a separate UpdateConnector with a unique key ('GUID'): KnEmployeeGUID. You only need this UpdateConnector if you cannot use the default key fields in KnEmployee.
The following general rules apply here:
- In case of an INSERT action, Profit uses the provided 'GUID', as long as it is unique. If this is not the case, Profit generates a standard SQL message for this. If you do not provide a 'GUID', Profit adds a 'GUID' itself.
- In case of an UPDATE or DELETE action, Profit looks up the record using the 'GUID', but the other key fields are in fact mandatory. If the 'GUID' is incorrect or unavailable, the line is rejected.
The status in the XML (UPDATE, INSERT) is not used in the KnEmployeeGUID connector for the objects without a 'GUID' (these are the agencies). If the employee already has a line on the date, then it is updated; else it is added. The delete status is in fact used.
If you also want to add a new person for the new employee, or change the person(al details) for an existing employee, you use the KnPerson UpdateConnector.
You can retrieve a list of fields to be supplied for each UpdateConnector and generate an XML example. See the description for AFAS Online or for a local installation.
- New employee (general comment)
Actions that can be performed with the connector
Points of attention:
- You can add or change one contract for an employee in an XML file.
Start of employment message
If you want to report an employment start for an employee, you must also deliver the fields in the following segments:
You can only deliver agencies other than the Tax authority if they have been linked to the employer of the employee.
Record the birth name separately
When you add an employee, the SpNm' and 'Is' ( ) fields if they are recorded in the XML. You can however supply a last name prefix, using the 'IsBi' field. For example:check box is always selected. The UpdateConnector ignores the '
This completes thefield (in / / , on the tab). The same value is entered in the field.
In the 'IbCk' field, you determine whether the system checks the IBAN. In the 'Iban' field, you enter the IBAN number.
You can run an UPDATE on position allocation lines (segment AFASOrgunitFunction / AfasSalaryCost).
Contract, salary, timetable and job records
If the employee does not have a contract yet (employment start message), you can deliver the contract with underlying salary, timetable and job data in one go.
If you deliver a new contract with a new timetable in a single go, the system gives an error message for the timetable. This is because adding a contract automatically adds a timetable. This causes an error if another record is added on the same date. This problem does not occur with the 'KnEmployee' UpdateConnector, because it uses the date to look up an existing record, and does not check the status in the XML.
This also occurs with other combinations such as timetable/salary.
You can delete a contract with the 'KnEmployeeGuid' UpdateConnector.
Sub-employment or additional employment
Enter the employment type in the 'PEmTy' field:
- S: sub-employment
- N: additional employment