Adding the GetConnectors
As AFAS doesn’t provide the necessary prebuilt connectors, they need to be added
Upload the files to your AFAS server
-
⚠️ First, download the two necessary GetConnectors for applicants and vacancies
-
Click the three white lines at the top middle of your screen:
-
In the menu that appears now, click the upload button:
-
Select the two connectors that you just downloaded and finish the selection dialog:
-
Select any location to store the two files and click "OK":
Import the connectors
-
Go to General > Output > Management > GetConnectors:
-
Click "Import":
-
Open the dialog for uploading Files:
-
Select the two connectors that you just uploaded under the "Upload the files to your AFAS server" section of this guide and click "Open":
-
You should now see the two connectors in listed in the import window:
-
Click "Finish"
Creating a user and user group
Create user
-
Go to General > Management > Authorization tool:
-
Click on User > New system user...
-
You have to prefix the username with your environment ID (which consists of five numbers) and it cannot exceed 20 characters.
For example:
- User: "12345.integrationUsr"
- Description: "User for granting API access"
-
Click next on the following dialog:
-
Make sure to add a valid email address to the user:
-
Click on the user you just created, then:
-
There is no “save” button, just close the window to persist your changes
Create group
-
Open the Authorization window, just as you did when creating the user, and click on Group > New...:
-
Click the "Create a completely new user group":
-
Enter any name and description, i.e.:
- Name: "integrationUserGroup"
- Description: "Only contains one user for moderating API access"
-
Click on the "..." where it says "Enter based on":
-
In the window that pops up, select the option "Manually" and click "OK":
-
Click on "Next" and optionally add any comments
-
Click on "Finish"
Add user to group
-
Open the Authorization window, just as you did when creating the user and group
-
Go to
1. "User maintenance"
2. Select the user you just created
3. Click "New"
-
Enter the first letters of your group name into the blue field below "Grp.", then hit Enter. Click the checkbox on on the left of your group and click "OK":
-
You should now be able to see the the group appear in the list:
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, click the "..." at the bottom of the dialog:
-
Enter the first letters of your group name into the blue field below "Grp.", then hit "Enter". Select your User Group and hit "OK":
-
After that, click "Finish".
Configure its read and write permissions
-
Open the properties of the app connector. To do this, go to the app connectors page and double click the name of your connector
-
Click on "GetConnectors", then click "New":
-
In the new window, click on the blue field below “Definition”, enter "custom_applicants" and hit enter. Then check the box on the left:
-
Now repeat the same process for "custom_vacancies":
-
Click “Finish”
- ⚠️ If you renamed the files before importing the GetConnectors you have to enter a different value in the search -
Now, go to "UpdateConnectors", then click "New":
-
In the new window, click on the blue field below Connector ID and enter "HrCreateApplicant", and click the check box on the left of the field:
-
Click “Finish”
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 "Finish".
Generate the token
-
Open the properties of the app connector. To do this, go to the app connectors page and double click the name of your connector
-
Click on "User tokens", then "New":
-
Give the token any description, i.e.: "Token for granting API access", then the "..." right next to "User":
-
Select the user you created, then click "OK":
-
Click "next".
-
On the new page you will 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:
-
Select the token, then right click on the selection and click "copy":
-
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:
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)