XLSX Connector - Customer Update
This document describes the customer synchronization process for the XLSX connector. The connector reads customer data from an Excel file (.xlsx), which can be provided directly or fetched from an FTP location. It processes customers, addresses, contact persons, payment conditions, and related data, and updates the App4Sales database.
Data Source Configuration
The connector retrieves an Excel file (*.xlsx) as the data source. The file can be provided in two ways:
Direct Upload: The Excel file is uploaded directly through the CMS.
FTP Location: The connector downloads all
.xlsxfiles from a specific folder on an FTP server. The FTP server details (address, username, password) are configured in the administration settings. The folder for customer data is typically named/CUSTOMERS/.
The Excel file should contain the following sheets:
Customers: Main customer data.Addresses: Customer address information.ContactPersons: Customer contact persons.PaymentConditions: Payment condition details. If this sheet is not present or empty, payment conditions are inferred from thePaymentConditionCodecolumn in theCustomerssheet.
Data Mapping Tables
Customers
This table details the mapping of fields from the Customers sheet to the App4Sales customer entity.
App4Sales Field | Source Field (Excel) | Logic/Notes |
CustomerCode |
| Mandatory. Rows with an empty |
CustomerName |
| Mandatory. Rows with an empty |
CustomerEnabled |
| Boolean (true/false, 1/0). Defaults to |
UsesPriceField (Price List ID) |
| The code is matched against the App4Sales price lists to find the corresponding internal ID. If |
Discount |
| The default discount percentage for the customer. |
VatLiable |
| Boolean (true/false, 1/0). Determines if the customer is liable for VAT. For USA administrations, this is always set to |
LanguageCode |
| The customer's language code (e.g., "EN", "NL"). It is mapped to an internal App4Sales language code via the MappedLanguages table. |
PaymentConditionCode |
| The code for the customer's payment condition. If empty, it's set to null to prevent database errors. |
CustomerManager |
| The sales representative or manager for this customer. |
CustomerClassification |
| A code used for classification and filtering in the CMS. |
ChamberOfCommerceCode |
| The customer's Chamber of Commerce number. |
ActionPriceList |
| The ID of a secondary price list for promotional items. Can be set globally via the |
CustomerNote |
| A general note for the customer. When provided, it overwrites any existing backoffice notes for that customer. |
VatCode |
| The customer's VAT identification number. For USA administrations, this is always cleared. |
Website |
| The customer's official website. |
| The customer's general email address. This email is assigned to the main visiting address (VIS). | |
PhoneNumber |
| The customer's main phone number. |
FreeFields | (All other columns) | Any columns in the |
Addresses
This table details the mapping of fields from the Addresses sheet.
App4Sales Field | Source Field (Excel) | Logic/Notes |
(Customer Link) |
| Links the address to a customer. |
AddressType |
| Type of address (e.g., "VIS" for Visiting, "DEL" for Delivery). If empty, defaults to "VIS". The connector ensures that both a VIS and DEL address exist, creating a copy if one is missing. |
IsMainAddress |
| Boolean (true/false, 1/0). Marks the main address. If no main address is specified for VIS or DEL types, the first one found becomes the main one. |
AddressLine1, AddressLine2, AddressLine3 |
| Address lines. |
PostCode |
| The postal code for the address. |
City |
| The city for the address. |
Iso2 (Country Code) |
| The 2-letter ISO country code. It can be mapped to a different code via the MappedCountries table. If empty, it's derived from the |
State |
| The state or province. |
Country |
| The full country name. If empty, it's derived from the |
Contact Persons
This table details the mapping of fields from the ContactPersons sheet.
App4Sales Field | Source Field (Excel) | Logic/Notes |
(Customer Link) |
| Links the contact to a customer. |
IsMainContactPerson |
| Boolean (true/false, 1/0). If no main contact is specified, the first contact person in the list is automatically marked as the main one. |
FirstName, MiddleName, LastName, FullName |
| Name fields. If |
Function |
| The contact person's job title or function. |
| The contact's email address. The value is trimmed. | |
Phonenumber |
| The contact's direct phone number. |
MobileNumber |
| The contact's mobile phone number. |
Language_iso2 |
| The contact's language code. |
Initials |
| The contact's initials. |
Gender |
| The contact's gender. |
Pred |
| The contact's title (e.g. Dhr.). |
Special Logic & Filters
Batch Processing: Customers are processed in batches of 100 to manage memory and performance.
Data Validation: The process skips any customer records where
CustomerCodeorCustomerNameis missing.Address Normalization: The connector ensures that every customer has both a "Visit" (VIS) and a "Delivery" (DEL) address. If one is missing, it creates a copy of the other. If no addresses are provided at all, it may create a dummy address to store the country ISO code.
Main Contact Person: If a contact person is marked as the main contact, it is linked to the customer. If no contact is explicitly marked as main, the first contact person in the list for that customer is automatically designated as the main contact.
Scripts: The process triggers two Jint scripts if they are configured:
BeforeUpdateCustomersbefore the batch processing starts, andUpdateCustomersafter each batch is processed.
Related Settings & Prerequisites
EnablePriceDeduplication: If enabled, migrates customers to use consolidated price lists based on a predefined mapping.DefaultActionPriceListCode: If set, assigns this action pricelist to all customers who do not have one specified.CustomerItemFilter: When enabled, allows for creating fixed item filters for a customer based on data from an extra data source.
Known Limitations
The connector does not process customer-specific item class discounts from the base Excel file; this requires a separate data source.
Dashboards and customer notes are processed, but this is less common with the XLSX connector.