InforLN Connector - SendOrderToBackoffice
This process sends a new sales order from App4Sales to the InforLN backoffice. It takes an App4Sales order, performs some final data transformations, and submits it to the InforLN web service. The backoffice then returns an order number or an error message.
Data Source Configuration
The connector sends order data to an InforLN web service. The endpoint is configured in the administration settings. The method used is A4SInsertSalesOrder, which is a SOAP web service call.
Data Mapping Table
The following table describes the fields that are read from or written to during the process. The main order data is passed in a pre-structured XML document, and only a few fields are explicitly modified.
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
Order Date | From input XML: | The date format is changed by removing dashes ('-'). For example, '2023-12-31' becomes '20231231'. |
Customer Code | From input XML: | The customer code is read from the order XML to determine the login name for the web service call. |
Backoffice Order Number | Returned by the | The returned order number is stored in the App4Sales database for the corresponding order. |
Special Logic & Filters
Login Name for Order
The connector determines a specific login name to be used when sending the order. The logic is as follows:
It starts with the username of the sales representative from the current request.
If the username is empty, it uses the customer code from the order.
It then looks up a "customer manager" associated with that username or customer code. This manager's login name is used for the web service authentication.
Responses & Error Handling
Successful Order Creation: The InforLN backoffice returns an order number. The connector assumes this number is a string with a maximum length of 15 characters. This order number is then saved to the order in App4Sales.
Empty Response: If the backoffice returns an empty response, the connector generates a generic error indicating that no order number was received.
Invalid Order Number: If the returned string is longer than 15 characters, it is considered an error, and the full string is displayed as an error message.
Exceptions: If the web service call fails for any reason (e.g., connection issue, validation error in InforLN), the exception message is caught and returned as an error to the user.
Related Settings & Prerequisites (Optional but recommended)
The functionality of sending orders with alternative delivery addresses is enabled for this connector. The setting is marked with the AlternativeAddress identifier.