# How to Connect to AFAS Software

This guide walks you through the steps required to connect your AFAS Profit environment using an App Connector.

We support multiple employments per employee and to use the [**EmployeesOne** endpoint](https://developers.apideck.com/apis/hris/reference#tag/Employees/operation/employeesOne), you need to import the preconfigured **GetConnector Employment_data** available for download in this guide. 

---

## 1. Add a New App Connector

- Log in to **AFAS Profit**
- Navigate to:  
  `General → Management → App Connector`
- Click **New**

Use the following settings:

- **Description**: `Apideck` or the name of your app  
- **Automatically generate a token**
- **Create a new user group based on the App Connector name**

![create-app-connector](https://res.cloudinary.com/apideck/image/upload/v1752663717/docs/connectors/afas-software/create-app-connector.png)

---

## 2. Add GetConnectors

- **Download the preconfigured `GetConnectors` ZIP file here:**  
  [Download GetConnectors Files (ZIP)](https://res.cloudinary.com/apideck/raw/upload/v1753093172/docs/connectors/afas-software/AFAS_Getconnectors.zip)
- In the App Connector wizard, go to the **GetConnectors** step
- Click **Actions → Import** to import the GetConnectors you've downloaded

![import-getconnector](https://res.cloudinary.com/apideck/image/upload/v1752663718/docs/connectors/afas-software/import-getconnectors.png)

### Required GetConnectors

- `Employees`  
- `Employment_data`  
- `Organization_Chart`

![imported-getconnector](https://res.cloudinary.com/apideck/image/upload/v1752663979/docs/connectors/afas-software/imported_getconnectors.png)

## Customizing GetConnectors

To modify the fields, edit the imported GetConnectors.
If you need to add custom fields, add them to the Employment_data GetConnector. This connector returns all data for a specific employee, including multiple employments.

- Go to the app connector / GetConnectors  
- Double-click to edit  
- Select **Data**  
- Add or remove any fields as needed

![edit-getconnectors](https://res.cloudinary.com/apideck/image/upload/v1752663718/docs/connectors/afas-software/edit-fields-getconnectors.png)

Once imported, skip the **UpdateConnectors** step and click **Finish**

![skip-update-getconnector](https://res.cloudinary.com/apideck/image/upload/v1752663719/docs/connectors/afas-software/skip-updateconnectors.png)

---

## 3. Copy the User Token

- After finishing the App Connector wizard, a **user token** will be shown
- This token is displayed **only once**, so make sure to **copy and store it securely**

![copy-usertoken](https://res.cloudinary.com/apideck/image/upload/v1752663716/docs/connectors/afas-software/copy-usertoken.jpg)

To regenerate the token:

- Navigate to:  
  `General → Management → App Connector → User Tokens → New`

  ![generate-new-usertoken](https://res.cloudinary.com/apideck/image/upload/v1752663719/docs/connectors/afas-software/generate-new-token.jpg)

---

## 4. Set Access Rights for the New User Group

- Go to:  
  `General → Management → Authorisation tool → Group maintenance`
- Open the newly created user group
- In the **Authorisation** tab, enable:
- **HRM - Werkgevers**
![authorize-group1](https://res.cloudinary.com/apideck/image/upload/v1753780093/docs/connectors/afas-software/authorize-the-group3.png)
- **HRM - Medewerkers**
![authorize-group2](https://res.cloudinary.com/apideck/image/upload/v1752663717/docs/connectors/afas-software/authorize-the-group2.png)

---

## 5. Vault Connection Setup

Now that your App Connector is configured, you can set up the connection in Vault.

- The **Environment name** contains your company number, followed by the environment type  
  *E.g.* `12345.rest` is for production
- Enter the names of the **GetConnectors** that you have previously imported into AFAS or created yourself
- The **User Token** has to be added with the tags:  

```xml
<token>
  <version>1</version>
  <data>ABC</data>
</token>
```
![vault-configuration](https://res.cloudinary.com/apideck/image/upload/v1752663719/docs/connectors/afas-software/vault-configuration.png)