AFAS Profit logoHubSpot logo

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.

  1. HR creates the new employee in AFAS, with function and organisational unit.
  2. 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.
  3. The HubSpot welcome email goes out on the start date, not earlier.
  4. When the function or unit changes in AFAS, KoppelHet adjusts permission set and team on the effective date.
  5. 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.
AFAS Profit → KoppelHet → HubSpotSOURCEAFAS ProfitTARGETHubSpotKoppelHetmapping · logging · monitoringAFAS Profit → KoppelHet → HubSpotSOURCEAFAS ProfitTARGETHubSpotKoppelHetmapping · logging · monitoring
Out: HubSpot user with name and work email address · Permission set based on the AFAS function · Team based on the organisational unit · Job title in the HubSpot profile · Handover list for the manager on departure

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, 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 · Basic

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

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 ProfitField in HubSpotNotes
Medewerker (personeelsnummer)Koppeltabel naar de HubSpot-gebruikerFixed key, also when the email address changes
RoepnaamfirstName
Voorvoegsel en achternaamlastName
E-mail werkemailMust be unique in HubSpot
FunctieroleId (rechtenset) en seatNamesThrough a table; only certain functions get a paid seat
Organisatorische eenheidprimaryTeamIdParent unit becomes the parent team
Omschrijving functiehs_job_title
Datum in dienstsendWelcomeEmail op de startdatum
Datum uit dienstVerwijderen van de gebruiker
Leidinggevende van de eenheidOntvanger van de overdrachtslijst

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.