Xlsx Connector - SendOrderToBackoffice
This process exports an App4Sales order into an XLSX file and uploads it to a configured FTP/FTPS/SFTP server. A new XLSX file, named after the order number (e.g., 12345.xlsx), is created for each order.
Data Source Configuration
The system generates an XLSX file based on the App4Sales order data. This file is then uploaded to a specified folder on an FTP server.
Protocol: FTP, FTPS, or SFTP
Host/Address: Configured via the
Session.Administration.Addresssetting. The URI scheme (ftp://,ftps://,sftp://) determines the protocol.Username: Configured via the
Session.Administration.Usernamesetting.Password: Configured via the
Session.Administration.Passwordsetting.Target Folder: The file is uploaded to a directory named
Orderson the server, relative to the user's root directory.
Data Mapping Tables
Order Header (Sheet: "Orders")
Excel Column | Source App4Sales Field | Logic/Notes |
OrderNo |
| If the order number is missing, a new one is generated via |
OrderDate |
| The date the order was placed. |
Created |
| The system timestamp when the order was created. |
CustomerName |
| The name of the customer who placed the order. |
CustomerCode |
| The unique code of the customer. |
AddressLine1 |
| The delivery address is sourced from the order's |
AddressLine2 |
| The delivery address is sourced from the order's |
AddressLine3 |
| The delivery address is sourced from the order's |
PostCode |
| The delivery address is sourced from the order's |
City |
| The delivery address is sourced from the order's |
State |
| The delivery address is sourced from the order's |
Country |
| The delivery address is sourced from the order's |
Reference |
| The customer's reference for the order. |
YourReference |
| The sales representative's reference for the order. |
Notes |
| General notes for the order. |
Remark1 |
| Additional remarks fields on the order. |
Remark2 |
| Additional remarks fields on the order. |
Remark3 |
| Additional remarks fields on the order. |
Vat |
| The total VAT amount for the order. |
Total |
| The grand total amount of the order. |
SubTotal |
| The total amount before VAT and shipping. |
ShippingCostsIncVat |
| Shipping costs including VAT. |
Order Lines (Sheet: "OrderLines")
Excel Column | Source App4Sales Field | Logic/Notes |
OrderNo |
| The order number, linking the line to the header. |
LineNumber |
| The sequential number of the order line. |
ItemCode |
| The code of the item on the line. |
Description |
| The description of the item or a free-text entry. |
Quantity |
| The quantity of the item ordered. |
Price |
| The unit price of the item. |
Discount |
| The discount percentage applied to the line. |
Instruction |
| Any special instructions for the order line. |
Special Logic & Filters
Order Numbering: If an order lacks an
OrderNr, a new number is generated by the App4Sales server and assigned to the order before the export. This ensures every exported file has a unique identifier.File Naming: The exported XLSX file is named using the order number, for example,
"SO12345.xlsx". Any characters that are invalid for file names are stripped from the order number before creating the file name.
Responses & Error Handling
The method returns the order number (
OrderNr) as a string upon successful execution.The connector does not process any response from the FTP server. If the file upload fails, an exception is thrown, and the process is halted. There is no built-in retry mechanism for FTP uploads.
Related Settings & Prerequisites
For the order export to function correctly, the following administration settings must be configured:
FTP Server Address (
Session.Administration.Address): The full URI to the FTP server, including the protocol (e.g.,ftp://ftp.example.com).FTP Username (
Session.Administration.Username): The username for FTP authentication.FTP Password (
Session.Administration.Password): The password for FTP authentication.