AFAS to Moodle integration: employees in cohorts per unit and job, completed courses in AFAS
With an integration between AFAS Profit and Moodle, every employee from AFAS automatically gets a Moodle account, in the cohorts of their organisational unit and their job, and is suspended after the termination date. A completed mandatory course in Moodle comes back to AFAS as a course on the employee, so HR sees in AFAS who passed the training.
Organisations that run HR and payroll in AFAS Profit and use their own Moodle for onboarding and mandatory training often add new colleagues to Moodle with a CSV file. People who change jobs stay in the old cohort, and HR retypes completed courses into AFAS by hand.
HR enters the new employee in AFAS, with job, organisational unit and start date.
KoppelHet creates the Moodle user and keeps them suspended until the start date.
The employee joins the cohort of their unit and that of their job; Moodle enrols them in the matching courses through cohort sync.
When they complete a mandatory course, KoppelHet records it as a course with certificate on the employee in AFAS.
After the termination date the account is suspended. If the employee returns, the same user is reopened.
Out: User with name, work email and employee number · Cohort per organisational unit · Cohort per job · Employer as institution in the profile Back: Completed mandatory courses with date
What to watch for with AFAS Profit and Moodle
Note The AFAS Profit classic token expires on 31 August 2027. An integration that still uses it has to move to OAuth before that date. Source
Moodle lets a user belong to several cohorts at once. KoppelHet uses that to put an AFAS employee both in the cohort of their organisational unit and in that of their job. A course for one department and a course for one job then each reach the right group.
AFAS records a course on an employee with its own course code, and a Moodle course has a free idnumber field. When the administrator puts the AFAS code there, KoppelHet knows for every completion which AFAS course to fill, without a separate translation table.
Moodle wants a valid and unique email address for every new user. In AFAS the work email field is often empty for employees without a computer workstation. KoppelHet does not create an account with a private address for them, but puts them on a list for HR, who decide per group how they get access.
AFAS often knows the start date weeks ahead, but the Moodle web service cannot pass a suspension on create. KoppelHet therefore creates the account and suspends it straight away, so the employee can only log in on their first working day and see their onboarding course.
One AFAS environment can contain several employers. The employer goes to the Moodle institution profile field, so reports in Moodle can be filtered per employer, while the employee number stays the fixed key.
A former employee who returns keeps the same employee number in AFAS. KoppelHet then finds the suspended Moodle user by idnumber and reopens it, with the earlier course results, instead of creating a second account.
AFAS can record on an employee's course that the certificate was earned, with a period in which it is valid. Moodle only gives a date on completion. For courses that recur yearly, KoppelHet fills the validity with the term HR sets per course.
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.
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 · Basic
€ 0.000 – € 00.000
€ 000 per month
Frequently asked questions
Do all Moodle courses go back to AFAS?
No, only courses with an AFAS course code in the idnumber. This keeps the AFAS file limited to training HR wants to track.
What does our AFAS administrator need to arrange?
An app connector with the GetConnector for employees and units and the UpdateConnector for courses per employee. The courses themselves must exist in AFAS.
Does Moodle have to run on our own server?
No. It works with your own installation and with a Moodle at a hosting partner, as long as the web service can be enabled and is reachable.
Technical details for IT
For those who want to know how it works under the hood: APIs, fields and sources used.
AFAS is read with a dedicated GetConnector on employees, employments, jobs and organisational units, filtered on change date, through an app connector with only those connectors. Completions go back through the HrEmpCourse UpdateConnector (certificate earned, valid from, valid until).
Moodle is written through the REST web service with a token for a dedicated external service - core_user_create_users, core_user_update_users (suspended), core_user_get_users_by_field (idnumber), core_cohort_create_cohorts, core_cohort_add_cohort_members and core_cohort_delete_cohort_members.
Completion per user and course through core_completion_get_course_completion_status; the course code comes from the Moodle course idnumber.
Which fields are transferred
The key fields. The full mapping is agreed per customer.
Field in AFAS Profit
Field in Moodle
Notes
Medewerker
idnumber en username
Username in lowercase
Roepnaam
firstname
Voorvoegsel + Achternaam
lastname
E-mail werk
email
Empty? Then no account but an alert to HR
Organisatorische eenheid
Cohort (idnumber) en department
Functie
Cohort (idnumber)
Werkgever
institution
Datum in dienst / Datum uit dienst
suspended
Cursusvoltooiing
Cursussen per medewerker (HrEmpCourse)
Moodle course and AFAS course linked through the course code
Tell us which systems you use. In a 30-minute call you hear what is possible, what you arrange yourself and how we start. We begin with the smallest integration that works.