
Payroll integration
Hailey HR to AFAS integration: employment, scope and salary to Dutch payroll
With an integration between Hailey HR and AFAS Profit, new employees of the Dutch BV arrive from Hailey in AFAS with employment, hours, salary and bank account, and approved salary changes follow with their effective date. HR keeps working in Hailey, payroll runs in AFAS and only completes the Dutch payroll tax details.
What the integration does
Scandinavian groups that use Hailey HR in every country and run payroll for a Dutch BV in AFAS Profit retype new Dutch colleagues from Hailey. A pay rise still awaiting approval in Hailey sometimes already ends up in the AFAS run.
- Hailey sends a webhook with the id of the changed employee.
- KoppelHet fetches the employee, the employments and the salaries and checks whether the legal entity is the Dutch BV.
- A new employee starts the onboarding process in AFAS, with contract, schedule, salary and cost centre.
- Approved salary entries go to AFAS with their date; proposals still waiting do not.
- An end date of the employment in Hailey closes the contract in AFAS.
What to watch for with Hailey HR and AFAS Profit
- A salary in Hailey has a history of dates and amounts, also for rises already planned for later. KoppelHet writes each point as a salary line with that effective date in AFAS, so a rise from 1 January does not have to be prepared by hand.
- Next to the salary history, Hailey also shows proposals still awaiting approval, with their own amount and effective date. Those proposals stay out of AFAS until they are approved and part of the history.
- An employee can have several employments in Hailey, with a priority for periods that overlap. AFAS works with one running contract per employer; on overlap KoppelHet takes the employment with the highest priority and reports the other to payroll.
- Hailey records the scope of an employment in hours and in percent. AFAS needs hours per week and a part-time percentage for the schedule; KoppelHet copies both instead of deriving one from the other.
- For a fixed-term employment Hailey provides the type and the end date of the fixed term. KoppelHet puts that end date on the AFAS contract, so payroll sees which contracts are expiring.
- The bank fields in Hailey are set up for Sweden and Europe at once, with clearing number, account number, IBAN and BIC. For a Dutch colleague the integration only uses IBAN and BIC; the clearing number stays empty and does not go to AFAS.
- A webhook from Hailey only contains the id of the employee or the company, not what changed. KoppelHet therefore fetches the whole employee after every notification and compares it with what is already in AFAS, so only real differences are written.
How we build and run it
- The integration runs on the KoppelHet platform, hosted in a data centre in the EU.
- Every sync and every error is visible in the functional log; on an error your administrator is notified.
- A change that cannot go through is not half-applied but queued for another attempt.
- KoppelHet is ISO 27001 certified. Data travels encrypted and stays on the platform no longer than needed.
- After go-live we manage the integration and adjust it when your process changes.
- The integration fits next to your existing integration layer. Only the fields in the design are transferred; the platform keeps no register of its own.
Implementation and price
This is not an app you switch on. We build the integration for your organisation on our platform, with building blocks we reuse on every project. So it is custom work that does not start from scratch.
A consultant prepares the intake and analyses both systems. We then record the mapping and exceptions field by field, test in the test or acceptance environment and go live at a moment you choose. Costs are a one-off amount for the setup and a monthly amount for platform, monitoring and support.
Frequently asked questions
What does the integration see in Hailey?
What the user behind the token may see. We therefore create a separate user with only the rights for the Dutch employees and their salaries.
Does leave from Hailey also go to AFAS?
Not in the first version. Hailey supplies both requested and approved leave; that can be added later as an extension, with only the approved part.
Technical details for IT
For those who want to know how it works under the hood: APIs, fields and sources used.
- Hailey is read through the Hailey HR API (v1) with a personal access token as bearer. The token is valid for one year and can be extended through POST /PersonalAccessToken/Extend without the token changing. Endpoints GET /Employees, /Employees/{employeeId}, /Employments (status WillStart, Active or Ended; priority on overlap) and /Salaries (payPeriod Yearly, Monthly, Biweekly or Hourly; history; pendingApproval and pendingAmountApproval). Which fields are returned depends on the token user's rights.
- Webhooks are set up by the administrator under integrations in Hailey; they arrive as a POST with a JSON body containing companyId or employeeId.
- AFAS is written through the HrOnboarding UpdateConnector for new employees and KnEmployee (AfasContract, AfasTimeTable, AfasSalary, AfasBankInfo) for changes.
Which fields are transferred
The key fields. The full mapping is agreed per customer.
| Field in Hailey HR | Field in AFAS Profit | Notes |
|---|---|---|
employmentNumber | Medewerker (EmId) | Fixed key |
firstName, lastName, dateOfBirth, gender | Persoonsgegevens | Split the name prefix |
streetAddress, postalCode, city, country | Woonadres | |
personalIdentityNumber | BSN | Only if HR records the BSN here |
iban en bic | Bankrekening (AfasBankInfo) | |
Dienstverband: startDate, endDate, employmentType | Contract (AfasContract) | |
scopeHours en scopePercentage | Rooster (AfasTimeTable) | |
Salarishistorie (date, amount) met payPeriod | Salaris (AfasSalary) | |
legalEntityId en costCenterId | Werkgever en kostenplaats | Through a lookup table |
Related
Hailey HR → Active Directory
Hailey HR to Active Directory integration: domain accounts from Hailey, expiring on the last working day
Hailey HR → ADP iHCM
Hailey HR to ADP iHCM integration: approved salaries and end of employment to Dutch ADP payroll
Hailey HR → Arbodienst (SIVI)
Hailey HR to the occupational health service via SIVI: sick days from the Hailey calendar as absence reports
Hailey HR → DATEV
Hailey HR to DATEV integration: German employees and salaries from Hailey HR to the tax adviser