Twinfield - AFAS - Connect with AFAS manual
This guide explains how to set up an App Connector in AFAS to connect with Twinfield. AFAS uses a unique connector system, so proper setup is essential for the integration to work.
1. Access AFAS Environment ๐
Open Citrix Workspace (required for remote access).
Log in to AFAS: https://login.afasonline.com/
2. Navigate to App Connector Section ๐
Go to: General
>Management>App Connector
3. Create a New App Connector ๐ ๏ธ
Click New.
Fill in the following details:
Description: Enter a clear name (e.g., "Twinfield Integration").
Generate token automatically: Enable this option.
Create a new user group: Select this to assign permissions.
Create a new user: Assign a dedicated user for the connector.
Click Next.
Adding GetConnectors and UpdateConnectors ๐
Adding GetConnectors ๐ฅ
In the App Connector assistant, click Actions
>Import.Select the required GetConnector file and complete the import process.
Adding UpdateConnectors ๐ค
Click New under the UpdateConnectors tab.
Select the appropriate connectors from the list.
Click Next.
โ Required GetConnectors (Fetch Data)
Profit_Administrations: Fetches administrations.Profit_Accounts: Fetches general ledgers.Profit_Debtor_Invoices: Fetch Debtor Invoices.Databrydge_Profit_Journals: Fetches journals.Profit_Transactions_Allocated: Fetches allocated transactions.Databrydge_Profit_Transactions_Allocated: Fetches simplified allocated transactions.Profit_VAT_Code: Fetches VAT codes.Databrydge_Profit_Periods: Fetches financial periods
Importing the Custom Connector
Most connectors are available in the standard connectors list. However, the following are custom connectors and must be imported manually:
Databrydge_Profit_Transactions_Allocated
Databrydge_Profit_Journals
Databrydge_Profit_Periods
To import it, follow these steps:
Download the custom connector file.
Go to the connectors screen and click the Actions button.
In the displayed menu, select Import.
Click the File button and select the downloaded file.
Complete the import process.
โ Required UpdateConnectors (Modify Data)
KnDimCode: Fetches and saves cost centers and projects.FiEntries: Saves transactions.KnSalesRelationOrg: Saves debtors.
Generating and Storing the API Token ๐
Once the assistant is completed, AFAS will generate an API token.
โ ๏ธ Important: This token is displayed only once. Copy and store it securely.
Configuring Permissions & Authorizations๐
To ensure the App Connector only accesses necessary data, follow these steps:
1. Access the Authorization Tool
Go to: General
>Management>Authorization Tool
2. Assign User to the Correct Group
In the User Maintenance tab, select the user you created for the connector.
Switch to the Member Group tab.
Click New and add the ADM record.
Testing the Connection ๐งช
You can test the connection using tools like Postman, a script, or the AFAS Connection Test site.
Visit the AFAS Connection Test site:
AFAS Connection TestEnter your AFAS Online member number (your ID).
Select the appropriate environment type.
Enter the token you saved when you created the connection.
Press โLogin with tokenโ
Verify that the App Connector can:
โ Read the necessary data.
โ Post transactions to AFAS for the selected administration.
This is done by checking if the configured GetConnectors and UpdateConnectors are in the list of available connectors. If any issues arise, ensure the correct connectors are assigned and that permissions are configured properly.
Final Checks โ
Ensure all required GetConnectors and UpdateConnectors are included.
Validate that the connector works correctly by testing with real data.