
Accounts in applications
AFAS to Salesforce integration: sales and service staff from AFAS as Salesforce users
With an integration between AFAS Profit and Salesforce, every new employee with a sales or service job in AFAS automatically gets a Salesforce user with the right profile, the right role and their manager set. On the end date in AFAS the user is deactivated, so the licence is released and customer data is closed off.
What the integration does
Organisations with HR in AFAS Profit and sales and customer service in Salesforce create Salesforce users after an email from HR. Account managers who leave sometimes stay active for weeks, with their licence and their access to every customer record.
- HR records the new account manager in AFAS, with job, organisational unit and start date.
- KoppelHet reads the employee from AFAS and uses the job to decide whether a Salesforce user is needed, and with which profile.
- The user appears in Salesforce with name, work email, role and manager, and signs in with single sign-on or through Salesforce's invitation email.
- When the employee changes job or department, KoppelHet adjusts profile, permission sets and role.
- On the end date the user is deactivated. If that is not possible straight away, KoppelHet freezes the user and the administrator gets an alert.
What to watch for with AFAS Profit and Salesforce
- AFAS stores the name prefix separately from the surname, while Salesforce only has a first and last name. KoppelHet puts the prefix in front of the surname, so 'Jan de Vries' appears in Salesforce the way colleagues and customers know him.
- With several employers in one AFAS environment the same person can have two employee numbers. Salesforce has one employee number per user. KoppelHet uses the number of the main employment and puts the employer in the company field, so no second user is created.
- Salesforce gives every user exactly one profile, and that profile determines which licence the user consumes. The job in AFAS sets the profile; a job without Salesforce work produces no user, so licences are not used up by colleagues who never work in it.
- In AFAS the manager is often the head of the organisational unit, for example a branch director without a Salesforce licence. Salesforce can only point to an existing user as manager. KoppelHet then looks one level up in AFAS, to the first manager who does have a Salesforce user.
- Salesforce refuses to deactivate a user who is still the default owner of leads or cases or is used in a hierarchy field. If the AFAS end date hits such a user, KoppelHet freezes the account at once, so sign-in is no longer possible, and tells the administrator what still has to be handed over.
- Salesforce requires an alias of at most eight characters, shown in list views and reports. KoppelHet builds it from the AFAS preferred name and surname, with a sequence number when two colleagues end up with the same alias.
- The integration gets its own app connector in AFAS with only the employee fields Salesforce needs. Salary, citizen service number and bank details never come near the CRM.
This integration is also part of joiner, mover, leaver.
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 happens to a leaver's accounts and opportunities?
They stay owned by the deactivated user; Salesforce does not delete users. A sales manager or administrator transfers them to a colleague in Salesforce. KoppelHet reports who is leaving, so that can happen in time.
Can we assign permission sets per job too?
Yes. The lookup table holds a profile and zero or more permission sets per AFAS job. You maintain that table yourselves; a new job without a rule goes on a list for the administrator.
Does anything go back from Salesforce to AFAS?
Not by default. AFAS stays the source for name, job and department. Writing back, for example, a Salesforce user ID to a free field in AFAS can be added later as an extension.
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 and employments, filtered on modification date, under a dedicated app connector (OAuth or token). The classic token expires on 31 August 2027.
- Salesforce is written through the REST API on the User object, with a connected app (OAuth 2.0) and an integration user with the Manage Users permission. Creating a user needs, among others, Username (unique across all Salesforce orgs), Alias (at most 8 characters), Email, LastName, ProfileId, TimeZoneSidKey, LocaleSidKey, LanguageLocaleKey and EmailEncodingKey. EmployeeNumber is at most 20 characters.
- Extra permissions go through PermissionSetAssignment. On departure KoppelHet sets IsActive to false; if Salesforce refuses, KoppelHet sets IsFrozen on the related UserLogin record and deactivation follows after handover.
Which fields are transferred
The key fields. The full mapping is agreed per customer.
| Field in AFAS Profit | Field in Salesforce | Notes |
|---|---|---|
Medewerkernummer | EmployeeNumber | Fixed key to find the user again |
Roepnaam | FirstName | |
Voorvoegsel + Achternaam | LastName | |
Naamgevingsregel | Username, Email en FederationIdentifier | |
Roepnaam + achternaam (ingekort) | Alias | At most 8 characters, with a sequence number for a duplicate |
Functie | Title, ProfileId en permission sets | Through a lookup table per job |
Organisatorische eenheid | Department en UserRoleId | |
Werkgever | CompanyName | |
Leidinggevende (medewerkernummer) | ManagerId | Only if the manager has a Salesforce user |
Datum uit dienst | IsActive |
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