
Accounts in applications
AFAS to HubSpot integration: HubSpot users based on function and department in AFAS
With an integration between AFAS Profit and HubSpot, a new employee in sales, marketing or customer service automatically gets a HubSpot user with the permission set for their function and the team for their department in AFAS. On the end date access is removed, after the manager from AFAS has been able to hand over contacts and deals.
What the integration does
Employers that run HR in AFAS and sales and service in HubSpot often only add new account managers to HubSpot once they have already started. When someone moves from inside sales to field sales the old rights remain, and after a departure customers stay assigned for months to someone who no longer works there.
- HR creates the new employee in AFAS, with function and organisational unit.
- As soon as AFAS has the work email address, KoppelHet creates the HubSpot user, with the permission set of the function and the team of the unit.
- The HubSpot welcome email goes out on the start date, not earlier.
- When the function or unit changes in AFAS, KoppelHet adjusts permission set and team on the effective date.
- Before the end date the manager receives a list of contacts and deals to hand over. After the last working day the user is removed.
What to watch for with AFAS Profit and HubSpot
- AFAS does not report a new or changed employee by itself; webhooks only exist for dossier items and workflows. KoppelHet therefore reads its own GetConnector on a fixed interval with only the fields HubSpot needs, so without salary or BSN.
- At a new hire the work email address is often not yet in AFAS, because IT creates it later in Microsoft 365. HubSpot cannot create a user without an email address. KoppelHet therefore waits until the address is in AFAS and flags it when that comes too close to the start date.
- Not every AFAS employee belongs in HubSpot. Which organisational units and functions get a HubSpot user is recorded in a table. An employee without a sales role thus stays out and costs no seat.
- The organisational structure in AFAS is a tree of units. HubSpot teams can also have a parent team, so the sales regions in AFAS become sub-teams under the sales team in HubSpot. Managers in HubSpot thus see the figures for their whole region.
- One AFAS environment can contain several employers, and someone can be employed by two of them. HubSpot allows only one user per email address. KoppelHet then creates one user and uses the function of the main employment as the basis for permissions.
- On departure KoppelHet uses the manager of the unit in AFAS. Before the end date they receive a list of contacts and deals still assigned to the leaver. Removal can follow, because in HubSpot records that were not handed over otherwise get a removed owner.
- Besides the name, AFAS also holds the preferred name. In HubSpot customers see their account manager's name in emails and on meeting pages. KoppelHet therefore uses the preferred name as first name, with the name prefix as part of the last name.
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
Can AFAS not talk to HubSpot through Entra ID?
It can if you have a Professional or Enterprise account with single sign-on and keep the roles in Entra ID accurate. Teams and seats then still need separate handling. Directly from AFAS the function in HR decides permissions, without an extra step.
Is the email address also written back to AFAS?
No. The work email address comes from Microsoft 365 or Google; HubSpot only uses what is in AFAS. That keeps one source for the address.
What if someone moves from sales to a role without HubSpot?
The integration then treats it as a departure from HubSpot: the manager gets the handover list and the seat is freed on the effective date of the new function.
Technical details for IT
For those who want to know how it works under the hood: APIs, fields and sources used.
- AFAS is read through the Profit REST API with a dedicated GetConnector on the employee, filtered on change date, within an app connector with OAuth (client credentials). The classic token expires on 31 August 2027.
- HubSpot is written through the user provisioning API (/settings/users/2026-09) with email, firstName, lastName, roleId, primaryTeamId, secondaryTeamIds and sendWelcomeEmail; seats through seatNames on a PUT. Teams with parentTeamId through the Teams API (/settings/teams/2026-09), job title as hs_job_title through the Users API. Permission sets with a paid seat require the billing-write scope.
Which fields are transferred
The key fields. The full mapping is agreed per customer.
| Field in AFAS Profit | Field in HubSpot | Notes |
|---|---|---|
Medewerker (personeelsnummer) | Koppeltabel naar de HubSpot-gebruiker | Fixed key, also when the email address changes |
Roepnaam | firstName | |
Voorvoegsel en achternaam | lastName | |
E-mail werk | email | Must be unique in HubSpot |
Functie | roleId (rechtenset) en seatNames | Through a table; only certain functions get a paid seat |
Organisatorische eenheid | primaryTeamId | Parent unit becomes the parent team |
Omschrijving functie | hs_job_title | |
Datum in dienst | sendWelcomeEmail op de startdatum | |
Datum uit dienst | Verwijderen van de gebruiker | |
Leidinggevende van de eenheid | Ontvanger van de overdrachtslijst |
Related
ADP Workforce Now → AFAS Profit
ADP Workforce Now to AFAS integration: Dutch employees from the US HR system in AFAS Profit
AFAS Profit → 4PS Construct
AFAS to 4PS Construct integration: payroll journal per employer in the right 4PS company
AFAS Profit → Adobe Creative Cloud
AFAS to Adobe Creative Cloud integration: users and product profiles from AFAS Profit
AFAS Profit → AG5
AFAS to AG5 integration: employees, employments and absence from AFAS Profit in the skills matrix