How to set up the integration
Estimated, overall set up time: 10 minutes
On a high-level, integrations with AFAS always work through using 'connectors' that expose the required data. To set up the integration you will need to
- Create an App connector
- Unblock the App connector
Additionally, depending on the data you need, you might also need to add and import a custom GetConnector. The rest of the guide, is a detailed step-by-step introduction on how to set up the integration.
Adding custom GetConnectors
Only if you see either of these fields when setting up the integration:
- Read employments
- Read groups
Download our custom GetConnector for employees. You will need it later in step 5 of creating an app connector.
If you don't see either of these fields, skip this section and just continue with the rest of the guide.
Creating an app connector
- Go to Go to General > Management > App connector:
- Click "New" on the top left of the window that just opened:
-
Give the connector any description you like, i.e.: "App connector for integration". Then, make sure that the "Generate a token automatically" is toggled on in the dialog:
- Select "Create a new user group based on App connector name" and click "Next"
-
If you had to download a custom GetConnector, follow the sub-section here. Otherwise continue with step 6.
- Click on "Action" then "Import":
- Click on "1. File"
- Select the file you downloaded as part of the preparation and click "Open":
Note: If you're connecting to AFAS via Citrix web, you'll have to upload the connector files before they can be imported. - Click on "Finish"
- Click on "Action" then "Import":
- Click on "Next"
- Click on "Finish"
- A new dialog should pop up, and you will be able to see your token. You won’t be able to access it again, so save it somewhere secure:
Tip: how to copy your token out of the Citrix workspace
If you’re accessing AFAS via remote Desktop, you can’t use your Clipboard outside the remote Desktop. If you don’t want to copy the token by writing it down, you can copy it like this:
- Click on "Copying":
- Now click the three white lines at the top middle of your screen:
- A few icons should appear, click the one that looks like a clipboard:
- A new window should open, you can now copy the contents by pressing "Ctrl + C" and use it anywhere outside of Citrix:
Unblock the app connector
- Open the properties of the app connector. To do this, go to the app connectors page and double click the name of your connector
- Go to "General" and make sure there is no check mark left to the field that says “Blocked”:
- Click on "Save and close".
Composing the AFAS service domain
The service domain of your AFAS instance takes the form of "<environmentID>.rest.afas.online"
You have to replace the "environmentID" with the five digit number of your environment name. Your environment name can be found at the top of your Profit workspace and will look something like this: "O12345AA" (the first letter is a capital “O”, not a 0)
So in this case your service domain will be: "12345.rest.afas.online"
- ⚠️ You have to use an AFAS production environment. Production environment names are always prefixed with the capital letter “O”, so make sure it looks like this "O12345AA" and not like this "A12345AA" (which would be an “accept” environment)
- When entering the environment ID, make sure to remove the O and AA, so that the URL only contains the five digits (e.g. "12345.rest.afas.online")
Adding the integration
- Paste the service domain and user token into the connection flow and click “Set up integration”: