---
title: "AFAS - Connectors"
slug: "afas"
description: "Automate data integration for HR, payroll & finance with AFAS using Dataddo. Learn to create data source & load records. Get help with setup & troubleshooting."
tags: ["Fixed-schema connector", "How-to guide", "Data source"]
updated: 2023-12-04T08:29:52Z
published: 2023-12-04T08:29:52Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dataddo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AFAS

**AFAS** is a Dutch software company that provides business software solutions for various aspects of company management, including HR, finance, payroll, and CRM. Their software aims to help organizations streamline their processes, improve efficiency, and manage different aspects of their operations through integrated software tools.

## Authorize Connection to AFAS

### In AFAS

To authorize your AFAS account, you will need an **AFAS token** (= API token).

1. In your AFAS account, create an **App Connector** that will allow Dataddo to securely extract your data. To do so, refer to [the official AFAS documentation](https://help.afas.nl/help/NL/SE/120718.htm) (Dutch only).
2. After creating the connection, **copy the AFAS token**.

### In Dataddo

1. On the **Authorizers** page, click on [Authorize New Service](https://app.dataddo.com/service/new) and select AFAS.
2. Select your **Environment Type** and provide your **Environment ID**.
3. Fill in the generated **AFAS token**.
4. Rename your ***authorizer*** for easier identification and click on **Save**.

## How to Create an AFAS Data Source

1. On the **Sources** page, click on the [**Create Source**](https://app.dataddo.com/sources/new) button.
2. Select the connector from the list and name your ***data source***.
3. On the **Dataset** step, select your **dataset**.
          **DATADDO TIP**

          

If you're unsure which dataset to select, use the search bar to look for datasets with the desired attributes or metrics.
4. On the **Account** step select your ***authorizer*** from the drop-down menu.
          **Didn't find your authorizer?**

          

Click on **Add new Account** at the bottom of the drop-down and follow the on-screen prompts. You can also go to the **Authorizers** tab and click on [**Add New Service**](https://app.dataddo.com/service/new).
5. On the **Attributes and Metrics** step, select the **metrics and attributes** you want to extract.  

![Create a source using a custom-schema connector.](https://cdn.document360.io/084ed225-3f99-4644-a2da-39ca0cd5ef45/Images/Documentation/Create%20Source%20-%20Custom-Schema%20Connector.png)
6. On the **Metadata** step, select which [**metadata fields**](/docs/metadata-inclusion) such as extraction time to add to your data.
7. On the **Snapshot** step:
  1. Configure your [**sync frequency**](/docs/extraction#extraction-frequency) or click **Show advanced settings** to set the exact synchronization time.
          **DATADDO TIP**

          

If you need to **load historical data**, refer to the [**Data Backfilling**](https://docs.dataddo.com/docs/data-backfilling) article.
  2. [Optional] Enable the **Allow Empty Data Extractions** toggle to allow the extraction when no data is available.
8. In the top-right corner, click **Test Data** button to preview extracted data. You can **adjust the date range** for a specific time frame.
9. Click on **Save** and **congratulations, your new data source is ready!**

          **DATADDO TIP**

          

In **Optional Settings** you can choose your **Sorting Column** to order your data according to one of the attributes.

You can, for example, choose to retrieve only the latest records like **last updated date** or **created date**. For example, sorting your data by **last updated date** will allow for only the most recently modified 10 000 records to be extracted daily.

You can also filter results a field called **JSON FILTER**. To learn more about this, please consult [the official AFAS documentation](https://help.afas.nl/help/EN/SE/App_Cnr_Rest_GET.htm#o95678).

---

## How to Load All Your Records

To load historical data, we recommend first checking if fields such as **created on** or **last modified on** can be added to your **GetConnector**. These fields should be available for nearly all GetConnector definitions.

Once all your historical data is extracted, the **"created on"** or **"last modified on** fields will allow you to sort your data according to **date**. As a result, you can keep extracting **only the most recent records**.

          No **"created on"** or **"last modified on"** fields

          

If these fields are not available, you can sort data only according to e.g. ID. In this case, you **won't be able extract the most recent data** after you are done with historical data load. Proceed with the [**alternative approach**](/docs/afas#alternative-approach) instead.

### Load All Data in Batches

Loading AFAS historial data will be done **in batches**.

          DATADDO TIP

          

Load your historical data to **a data warehouse** using the [**upsert**](https://docs.dataddo.com/docs/data-storages#upsert) write mode to make sure that Dataddo will take care of any duplicates for you.

**1. Increase the limit to 50,000 records** By default, the AFAS connector will extract **10,000 records**. Increase the limit to 50,000 (recommended maximum) in your source's advanced settings.

Click on your source and navigate to the **Advanced Settings** tab and **change the limit** to 50,000 records.

**2. Run manual data extraction** Click on the [manual data load](/docs/data-backfilling) button to extract the initial 50,000 record. You can check if your extraction was succesful in the logs.

**3. Load historical data to your data warehouse** If you are using **a data warehouse**, navigate to your flow and click on the [manual data insert](/docs/data-backfilling-to-storages) button.

**4. Go back to your source and increase the Skip field by 50,000** Navigate back to the **Advanced Settings** tab of your source and increase the **Skip** field by 50,000. Next extraction job will skip the previously extracted data and will extract the next 50,000 records. ![AFAS - historical data load](https://cdn.document360.io/084ed225-3f99-4644-a2da-39ca0cd5ef45/Images/Documentation/AFAS%20-%20historical%20data%20load.png)

**5. Perform manual data load for your source and flow again**

**Repeat steps 2-5** until there is no more data left or until you get a number lower than the limit (50,000). Don't forget to **increase** the Skip field by 50,000 every time or insert your data using **upsert** write mode to avoid duplicates.

          Example

          

The total number of records of your specific GetConnector is **323,000**, you will need to extract data in **7 batches**. As the last batch will only produce 23,000 records, you will need to **re-adjust the limit as per step 1**.

In some cases, sorting data by **ID** or a similar field will make more sense for the initial historical data load.

### Setting up Daily Increments

Once all historical data has been loaded, **return your source's settings to the initial state** to extract the latest records.

If you expect a few thousands records a day, we recommend setting your limit to **10,000-20,000**. Otherwise, extract full **50,000 records** daily, in which case we recommend using the the [**upsert**](/docs/data-storages#upsert) write mode to insert data into your data warehouse.

If you want to extract **only yesterday's data** (including data what was **modified** yesterday), we recommend trying a **JSON filter**. To set a JSON filter up, refer to [the official AFAS documentation](https://help.afas.nl/help/EN/SE/App_Cnnct_View_Audit.htm#o86242) .

          JSON filter

          

This filter can be applied only **when creating a new source**. After loading all your historical data, set up a new source with the JSON filter and connect it to your data warehouse. Don't forget to delete the original source.

### Alternative Approach

In case you cannot sort data using the **created on** or **last modified on** fields, you will need to create **multiple sources** for your GetConnector and extract **all** data every time. The sources should look as the following:

- 1st source - limit: 50,000, skip: 0
- 2nd source - limit: 50,000, skip: 50,000
- 3rd source - limit: 50,000, skip: 100,000
- Etc. (until you extract all records)

Add all of these sources created for a specific GetConnector into **a single flow**. The data will be **unioned** into **a single table** which will then be inserted into your data warehouse.

**You will need to repeat this process for all the GetConnectors that require this approach.**

---

## Troubleshooting

### Data Preview Unavailable

No data preview when you click on **Test Data** might be caused by an issue with your ***source*** configuration. The most common causes are:

- **Date range**: Try a smaller date range. You can load the rest of your data afterward using [manual data load](https://docs.dataddo.com/docs/data-backfilling).
- **Insufficient permissions**: Please make sure your authorized account has at least admin-level permissions.
- **Invalid metrics, attributes, or breakdowns**: You may not have any data for the selected metrics, attributes, or breakdowns.
- **Incompatible combination of metrics, attributes, or breakdowns**: Your selected combination cannot be queried together. Please refer to the service's documentation to view a full list of metrics that can be included in the same ***data source***.

## Related Articles

Now that you have successfully created a ***data source***, see how you can connect your data to a dashboarding app or a data storage.

**Sending Data to Dashboarding Apps**

- [Simple Data Integration to Dashboards](https://docs.dataddo.com/docs/simple-data-integration-to-dashboards)
- [Data Backfilling to Dashboarding Apps](https://docs.dataddo.com/docs/data-backfilling-to-dashboarding-apps)

**Sending Data to Data Storages**

- [Batch Ingestion to Data Warehouses](https://docs.dataddo.com/docs/ingestion-to-data-warehouses)
- [Data Backfilling to Storages](https://docs.dataddo.com/docs/data-backfilling-to-storages)

**Other Resources**

- [Troubleshooting](https://docs.dataddo.com/docs/troubleshooting)
- [Extraction Logs](https://docs.dataddo.com/docs/extraction-logs)
- [Data Duplication](https://docs.dataddo.com/docs/data-duplication)

An API token is a code snippet used to secure API access. It's sent to API servers as identification, confirming whether the user or application has access, and provides both authentication and user/application information to the API server.

Authorizers act as credentials for external services (e.g. Facebook or Google). To enable Dataddo to access and retrieve your data, you need to grant access to accounts that possess admin-level permissions or higher within these services.

Upsert inserts new rows and updates existing ones in the destination. By ensuring that the data in the table is updated if a matching record exists, or a new one is inserted, upsert prevents data duplication.
