HHAFAS Profit logo

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.

  1. Hailey sends a webhook with the id of the changed employee.
  2. KoppelHet fetches the employee, the employments and the salaries and checks whether the legal entity is the Dutch BV.
  3. A new employee starts the onboarding process in AFAS, with contract, schedule, salary and cost centre.
  4. Approved salary entries go to AFAS with their date; proposals still waiting do not.
  5. An end date of the employment in Hailey closes the contract in AFAS.
Hailey HR → KoppelHet → AFAS ProfitSOURCEHailey HRHailey HRTARGETAFAS ProfitKoppelHetmapping · logging · monitoringHailey HR → KoppelHet → AFAS ProfitSOURCEHailey HRHailey HRTARGETAFAS ProfitKoppelHetmapping · logging · monitoring
Out: Employee with personal details and address · Employment with type and end date · Scope in hours and percentage · Salary with effective date · Cost centre and bank account

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, architecture and compliance

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.

Price indication · Complex

Leave your work email and you see the price indication right away.

We only use your address to follow up on your question about this integration.

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 HRField in AFAS ProfitNotes
employmentNumberMedewerker (EmId)Fixed key
firstName, lastName, dateOfBirth, genderPersoonsgegevensSplit the name prefix
streetAddress, postalCode, city, countryWoonadres
personalIdentityNumberBSNOnly if HR records the BSN here
iban en bicBankrekening (AfasBankInfo)
Dienstverband: startDate, endDate, employmentTypeContract (AfasContract)
scopeHours en scopePercentageRooster (AfasTimeTable)
Salarishistorie (date, amount) met payPeriodSalaris (AfasSalary)
legalEntityId en costCenterIdWerkgever en kostenplaatsThrough a lookup table

Related

Which systems do you want to connect?

Tell us which systems you use and what should happen automatically. Together we define the smallest working solution, with a clear design and a quote before building.