Xlsx Connector - Create Customer
The Xlsx connector facilitates the creation of new customers by generating an Excel (.xlsx) file containing the customer's information and uploading it to a designated FTP server. This process is initiated when a new customer is created within the App4Sales application.
Trigger & Permissions
This functionality is triggered when a new customer is saved in the App4Sales application. It requires the FTP server's address, username, and password to be correctly configured in the connector's administration settings. The customer data is then pushed to the external system.
Data Source Configuration
Type: Push
β Format: XLSX (Excel Workbook)
β Location: The file is uploaded to a subfolder named Customers on the FTP server specified in the administration settings.
β Filename: The Excel file is named using the customer's code, for example, 10001.xlsx.
Payload Mapping
The connector maps the App4Sales customer model to an Excel file. The properties of the customer object are written as columns in the 'Customers' sheet.
Excel Column | App4Sales Field | Logic/Notes |
debCode | Customer.CustomerCode | Directly mapped. |
customerName | Customer.CustomerName | Directly mapped. |
customerGuid | Customer.CustomerGuid | Directly mapped. |
contactFullName | Customer.MainContactPerson.FullName or first contact person's FullName | Uses the main contact person's full name. |
visitAddress1 | Address.AddressLine1 (where AddressType is 'Visit') | The first line of the visiting address. |
visitAddress2 | Address.AddressLine2 (where AddressType is 'Visit') | The second line of the visiting address. |
visitPostCode | Address.PostCode (where AddressType is 'Visit') | The postal code of the visiting address. |
visitCity | Address.City (where AddressType is 'Visit') | The city of the visiting address. |
deliveryAddress1 | Address.AddressLine1 (where AddressType is 'Delivery') | The first line of the delivery address. |
deliveryAddress2 | Address.AddressLine2 (where AddressType is 'Delivery') | The second line of the delivery address. |
deliveryPostCode | Address.PostCode (where AddressType is 'Delivery') | The postal code of the delivery address. |
deliveryCity | Address.City (where AddressType is 'Delivery') | The city of the delivery address. |
contactEmail | Customer.MainContactPerson.Email or Customer.Email | Defaults to the main contact person's email; otherwise, the customer's email is used. |
customerEmail | Customer.Email | Directly mapped. |
contactFax | Address.Fax (where AddressType is 'Visit' or 'Delivery') | Uses the fax number from the visiting address; otherwise, the delivery address fax is used. |
contactPhone | Customer.MainContactPerson.Phonenumber or Customer.Phone | Defaults to the main contact person's phone number; otherwise, the customer's phone number is used. |
customerPhone | Customer.Phone | Directly mapped. |
sysmodified | DateTime.Now | The timestamp of when the file is generated. |
languageCode | Customer.LanguageCode | Directly mapped. |
countryCode | Address.Iso2 (where AddressType is 'Visit' or 'Delivery') | Defaults to the visiting address's ISO2 code; otherwise, the delivery address's code is used. If neither is available, it defaults to 'nl'. |
discount | Customer.Discount | The customer's discount percentage, converted to a string. |
usesPrice | Customer.UsesPriceField | Indicates if the customer uses a specific price field. |
paymentCondition | Customer.PaymentConditionCode | Directly mapped. |
isVATLiable | Customer.VatLiable | "True" or "False" based on the customer's VAT liability. |
vatCode | Customer.VatCode | Directly mapped. |
mobilePhone | Customer.MainContactPerson.MobileNumber | The mobile number of the main contact person. |
chamberOfCommerceCode | Customer.ChamberOfCommerceCode | Directly mapped. |
website | Customer.Website | Directly mapped. |
Validation & Defaults
Customer Code: If the
CustomerCodeis not provided, the connector attempts to retrieve it based on the customer's GUID.Country Code: Defaults to 'nl' if no visiting or delivery address with an ISO2 code is available.
Contact Person: If no main contact person is explicitly set, the first contact person in the list is used.
Response & Error Handling
The system considers the customer created once the Excel file is successfully uploaded to the FTP server. The CustomerCode used in the file is assigned back to the customer object in App4Sales. Any FTP connection or write errors will interrupt the process and be logged.
Related Settings & Prerequisites
FTP Address: The FTP server's URL or IP address. This must be configured in the administration settings.
FTP Username: The username for FTP authentication.
FTP Password: The password for FTP authentication.