1. Creating Connectors
This chapter covers the steps for creating the necessary connectors in AFAS.1.1. Creating a user account for Payt in AFAS
Create a new user in AFAS that will be used solely for the connection with Payt. We call this the connector user.1.2. Creating an AppConnector
To establish the connection between AFAS and Payt, an AppConnector for Payt must first be created in AFAS. This AppConnector serves as a container for the group of GetConnectors from Payt. Create this AppConnector in AFAS by navigating to:General -> Management -> AppConnector -> New (description e.g. Payt REST API) Select a user group with at least the following access rights (or create a new user group with these access rights):
- Access to all administrations (General -> Administration -> Filters -> All administrations)
- Access to all dossier items (CRM -> Dossier -> Filters -> CRM - Dossier items -> All dossier items)
- Access to all definition filters (General -> Management -> Definition -> Filters -> General - execute definition -> All rights)
1.3. Creating a user token (For use in Payt)
A user token is also required. Create this token in AFAS by navigating to:- General -> Management -> AppConnector -> Payt REST API -> Maintenance by client -> User tokens
Manually add user token to your own app connector Be sure to keep the copied token on hand to enter in the onboarding wizard in Payt. If you’re unsure where to insert the token in Payt, please contact your Payt implementation specialist.
1.4. Creating GetConnectors
The GetConnectors needed for the integration can be imported. These GetConnectors will be provided by Payt during implementation. If you use different fields, you can create your own connectors or modify the fields in the imported connector. Import the following required GetConnectors:Payt_administrationsPayt_payment_conditionsPayt_sales_entries_v12Payt_distribution_methods - Extended v2.0 - Tab DigitalPayt_sales_invoices_for_cp_ordermanagement_v11Payt_subject_attachmentsPayt_Verkoopfactuurregels
- Click General -> Output -> Management -> GetConnector
- Right-click in the GetConnectors window
- Click Actions -> Import
- Select all of the GetConnectors that are mentioned above.
Payt_subject_attachments.Additionally, there’s an optional GetConnector
Payt_verstrekking to retrieve information from the digital tab. See section 4.1.
Creating your own connector in AFAS
If you want to create new connectors, you can do so in AFAS via:General -> Output -> Management -> GetConnector -> New
1.5. Adding GetConnectors to the AppConnector for use
To be able to use the GetConnectors, they must be added to the AppConnector for Payt. Do this in AFAS by going to the AppConnector you added in 1.2 and follow the same steps as in 1.4.General -> Management -> AppConnector -> Payt REST API -> GetConnectors -> New
1.6. Adding AppConnectorSubject for dossier items
To get the PDF files of the invoices into Payt, the standard AFAS connectorAppConnectorSubject must be added to the AppConnector for Payt.
Do this in AFAS via:General -> Management -> AppConnector -> Payt REST API -> Connectors -> New -> AppConnectorSubject
2. All required AFAS fields
The Payt GetConnectors are prefilled with the most commonly used fields in AFAS to populate fields in Payt. If you want to use different AFAS fields to populate Payt and thus configure your own connectors, you can use the fields in this chapter.2.1. GetConnector: Payt_administrations
The Payt_administrations connector should pass the basic data of the administration. These are the following field names:
| Field name in Payt | Explanation | Type |
|---|---|---|
| administration_name (mandatory) | Administration name | Text |
| administration_code (mandatory) | Administration code in AFAS | Text |
| administration_origin_id (mandatory) | Administration ID in AFAS | Text |
2.2. GetConnector: Payt_payment_conditions
The Payt_payment_conditions connector can transmit the payment terms used in AFAS. On the Payt side this determines which steps are applicable to an invoice.
The field names for this connector are:
| Field name in Payt | Explanation | Type |
|---|---|---|
| payment_condition_code (mandatory) | Payment condition | Text |
| payment_condition_description (mandatory) | Payment condition description | Text |
2.3. GetConnector: Payt_subject_attachments
For invoice attachments, use thePayt_subject_attachments connector. This is a linking table to match the actual attachment to an invoice via invoice_dossier_item_extra from the Payt_sales_invoices GetConnector.
These are AFAS field names:
attachment_idsubject_idfile_idfile_name
2.4. GetConnector: Payt_sales_entries_v12
The Payt_sales_invoices GetConnector retrieves sales entries from AFAS.
It’s possible other entries need to be retrieved as well, such as journal entries. In that case, use the Payt_sales_entries GetConnector. It’s important to ensure only entries needed in Payt are passed through this connector. You can apply filters in the GetConnector.
All available headers can be found here (always up to date):/imports/csv
2.5. Note on debtor name/address fields
At least one of the following fields must be filled:debtor_company_namedebtor_firstnamedebtor_lastname
debtor_company_name and debtor_lastname because the source system only has one name field. In that case, use debtor_name, optionally combined with debtor_is_company (value 1 or 0).
NOTE: If no email address is provided, but the other 4 fields are valid and filled in, no emails will be sent: only letters.
3. Check data for accuracy
After creating the connectors, you can check the data for accuracy.Open the REST services URL
Navigate to your AFAS REST services endpoint. Replace or
CLIENT_UID with your 5-digit UID (usually present in all usernames):4. Additional Information
4.1. Digital tab
If you’re using thedigital tab in AFAS, you can use the optional connector Payt_verstrekking to retrieve the right information. It first selects based on the sales relationship. Then, if available, the Work email address from Projects is used. If unavailable Subscriptions is used as a fallback, with Sales Invoices as a final fallback option.
The regular email address is used as debtor_invoice_email, and the reminder email as debtor_reminder_email.
4.2. Payment Conditions
If you don’t want to use your default payment conditions, for example to separate direct debit invoices, you can use the fieldinvoice_payment_condition with the value true/false (check this in the GetConnectors Payt_sales_entries and Payt_sales_invoices).
Payt will then match these payment conditions for you via the implementation specialist or support desk.