Setting up the connectors
A vital and critical step during the installation of the AFAS ApiCenter application is to make sure that your AFAS environment is ready to send and receive data needed for the ApiCenter flows.
This guide will help you correctly setup the AFAS connectors for ApiCenter use, but remember to pay close attention to the details. Since the connectors are very spelling and case-sensitive. Every step of the guide is required to setup a successful connection.
This guide does assume you know how to edit connectors, and are familiar with how configuration in connectors work.
Step 1: Download the latest connector set
Here you can find the latest connector-set that you will need to correctly setup the environment in your Profit AFAS. With future updates the connector set will also update from time to time. Be sure to keep to stay informed for eventual updates. When an update is released, A document will become available on how to adjust the current connector set to the new connector set.
Step 2: Import the connector set into Profit AFAS.
When you downloaded the connector set. Open your AFAS environment and open the GetConnector Management, in the following menu: General -->Output-->Management-->GetConnector.
- In this menu select the Import option.
If these buttons are missing, please read the following article: FAQ: missing buttons
- Select all the connector files from the connector set, and import them into the AFAS environment. If everything is correctly imported, the result should look like the screenshot below.
Step 3: Adjust the connector set to match your environment
In this step, we will guide you through the different connector and tell you what to adjust so that your application can run smoothly. The connectors are not plug-and-play. It will require some adjusting to make sure that information can actually be sent.
Step 3a: The product (ApiCenter_Article) connector
- AFAS knows only 2 content fields, description, and extra description. Most webshops uses 3 content fields. You can choose which property is used for which. The third can be supplemented with an additional free field but is optional. All three content fields are by default configured for existing AFAS fields, but not necessarily the correct ones. Be sure to replace these 3 for the correct descriptions.
- By default the connector allows for an option to determine the visibility of the product on for example the webshop. In the connector set, this is configured to a free field. This means that the field will not exist in your environment. If you wish to use this functionality, replace this field. If you do not want to use this functionality, remove this field from the connector.
- By default, there is the option to include the SEO information, however this is not standard in AFAS, If you require this information, please specify these fields. If not, please remove these fields from the configuration.
- Do you require a hard filter, for example an identifier for just webshop products. The benefit of a hard filter is to exclude products from being send to ApiCenter. Yes, ApiCenter can filter products afterwards, but this is ineffective and will still consume API calls.
Then use this next additional field for this. This can be any free field. If you do not want to use a hard filter, please remove this from the connector.
If you use this field correctly, it should be added to the filter settings of the connector like this:
- Do you have multiple storeviews on your webshop, then make sure to configure this next field, so that the connector knows to which store the product will need to goto.
- All image information and attributes/features should be added to this connector
Step 3b: The category (ApiCenter_Categories_AG) connector
- By default, we support categories to be multi-layered. In this guide; Appendix C; an explanation is provided on how to setup multi-layered categories in your AFAS environment. If you choose to enable multi-layered categories, please replace the dummy fields, with the free fields from your own AFAS environment. If you choose not to use this functionality, simply remove these two fields.
Step 3c: The dimensions (ApiCenter_Dimensions) connector
- Only the weight property is default in AFAS. If the customer also requires the other dimensions, free fields will need to be created and the dummy fields will need to be replaced in the connector. If you choose not to use this functionality, please remove the dummy fields from the connector.
Step 3d: The Images (ApiCenter_Article) connector
AFAS does not provide the images for a product as a readable array, so every image must be added to the endpoint separately. Since some applications desire more information than AFAS can provide, additional free fields can be added to display this information. A total of 7 images can be supplied with AFAS and all these have the option to add free fields. In most extreme case this will be 28 free fields defined.
Our expectations is, that only free fields will be added for which functionality the customer will choose to use. For example; the second image is supposed to be the 'thumbnail' image on the webshop. In this case, you only need to add the one free field for the second image. The other free field 'dummy' fields, will need to be removed. Only add what is required.
There are 4 'possible' fields per image, be sure to remove those which are not used.
Step3d-2: Video Support on The Images (ApiCenter_Image) connector
With version V.2022.01 of the Connector set ( Connector set v.2022.01 ) videos can be supported.
Add the following fields, with the precise name to the connector and your videos can be retrieved with the product from AFAS.
Step 3e: The Stock (ApiCenter_StockItem) connector
AFAS has multiple ways to display stock information. For a counter application it may be important to use reserved stock in calculation instead of the actual representation of the stock, since AFAS could calculate incoming stock to the totals. By default, the ActualStock is being used by the integration.
Just like the product connector, the stock connector has the option to provide a hard filter in the connector. If you choose to utulize the filter, replace the free field with the corresponding field(s) in your environment. If not, remove the dummy field.
Step 3f: The Unit (ApiCenter_Unit) connector
Step 4: Finalize the setup in the App Connector.
- Open the General section. Then go to the Management options and select the 'App connector' again.
- Double-click on the APICenter App Connector to open the App Connector properties.
- Under the GetConnector section you can add new Connectors by pressing the 'Nieuw'-button highlighted below.
- Next, highlight all the ApiCenter connectors and press Complete (Voltooien).
- Under the UpdateConnectoren section you can add new Connectors by pressing the 'Nieuw'-button highlighted below.
- Up next, select the following rows: Contact, Organisatie, Persoon, Verkooprelatie organisatie, Verkooprelatie persoon, Verkooporder and press Complete:
- This leaves to the following set of Connectors in the UpdateConnector (see image below), press Ok.
If you want to send quotations to AFAS you will need to also add the FbSalesQuotation update connector with the method shown above.