Activate connection with AFAS Profit
The connection with AFAS can be made via Manage > Connections > AFAS. Before connecting, you need to add an App Connector for financial mutations and files in AFAS (see below) and ensure that the following data is entered correctly in Declaree;
- Each category 'code' is filled with the correct general ledger account from AFAS
- Each VAT 'code' is filled with the correct VAT code from AFAS
- Each VAT 'code (2)' has been filled with the correct VAT general ledger account from AFAS
- Every user 'code' has been filled with the creditor number from AFAS
- Every user 'code (2)' is filled with the employee code from AFAS
To make the connection, you will need some information;
- API Token: See "Add AFAS App Connector" below
- Customer environment: See General > Environment > Management > Information (Employee code)
- Administration: See General > Administration > Open (Number from the "Adm." column)
- Journal: The journal number on which declarations will be entered.
After making the connection, you can select one or more reports in the reports overview and export them via the toolbar "Export" > "AFAS Online".
Add AFAS App Connector
To be able to export transactions to AFAS, you need a so-called App Connector. Login to AFAS and choose General > Manage > App connector.
Press New to add a connector, give it a description and choose the group allowed to use this connector. Then press Finish to create the connector.
In the connector properties menu on the left, select "UpdateConnectors" and press New. From the list of connectors, select "Financial mutation" (FiEntries), "File" (KnSubject) and "Financial free fields" (FiEntriesCustom). Then click Finish and OK to save the app connector.
Creating API Token
To add an API Token, open the app connector in General > Manage > App connector.
- Uncheck the Blocked field
- Go to the tab: User Tokens and click New
- Select the user.
- Fill in the description (it must be unique) and click Next
- Click Copy to copy the API Token to the Clipboard.
Please note that after completing the wizard, you can no longer access the API Token via AFAS Profit. If the token is no longer known, you can delete the old token and add a new one.
After these steps have been completed, you can make the connection by going to Manage > Connections > AFAS Profit. When entering the token, the code in bold between the brackets should be entered in Declaree:
Once the connection has been established, declarations can be exported in the reports overview by selecting them and choosing "Export" > "AFAS" from the menu. It is also possible to automatically export reports in e.g. the status "approved", see the "Export" choice in the AFAS connection wizard.
After a successful export of a declaration report, the transaction lines can be found under "Financial" > "General ledger" > "Financial mutations":
When opening a transaction, the report (PDF) can be retrieved by pressing "Open attachment":
Known (error) messages during export
Enter a value at 'Account number'
Check whether a relation code (AFAS creditor number) has been set in Declaree for the relevant employee. This depends on the field you have assigned in the AFAS connection wizard for the "creditor" field.
Also, for VAT rates in Declaree, check that you have entered both the VAT code and the general ledger account for VAT amounts in the VAT "code (2)" field.
For code differentiation 'ABC', there is no allocation in account 'YXZ' or the allocation is blocked.
The set Projects/Cost centre codes in Declaree (see Management > Projects), which are called "Specialisations" in AFAS, are assigned to specific general ledger accounts. It is therefore only possible to select these specialisations with the same category (general ledger account). E.g. your exception "Department ICT" is assigned to general ledger account 4800 "Miscellaneous expenses". In Declaree, the category "Miscellaneous" is linked to general ledger account "4800". In this case, you can only use the cost centre "Department ICT" for expense claims with category "Miscellaneous".
Invoice number 'ABC' is already used in financial with Creditor XYZ
It is not possible to export a claim report twice. Delete the entry in AFAS and try again.
This UpdateConnector is not supported
The App Connector added in AFAS in the first step of this article for setting up the connection does not have the required authorised Update Connectors:
In the connector properties menu on the left, select "UpdateConnectors" and press New. From the list of connectors, select "Financial mutation" (FiEntries), "File" (KnSubject) and "Financial free fields" (FiEntriesCustom).