Baan Connector - Item Update
This document describes the process of updating items from the Baan ERP system to the App4Sales platform. The connector retrieves item data, including pricing, images, and classifications, from the Baan web service and maps it to the App4Sales database.
Data Source Configuration
The connector communicates with a SOAP web service. The URL for the web service is configured in the administration settings.
Service: BaanService
Endpoint: The URL is configured in the App4Sales administration settings. The default URL in the code is
http://194.120.245.101:3000/BaanService.asmx, but this is overridden by the administration setting.
The item update process uses the following web service methods:
GetFilterNames(): Retrieves item class definitions.A4SListItems(string slsRepID): Retrieves the list of items. TheslsRepIDis the username from the current session.
Data Mapping Table
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
ItemCode | ID (from entityNode attribute) | The unique identifier of the item. |
Description | items.description | The description of the item. |
SalesPrice | items.salesPrice | The base sales price of the item. The comma is replaced by a dot for decimal conversion. |
Currency | Hardcoded | The currency is hardcoded to "EUR". |
PurchasePackageSize | items.purchasePackageSize | The purchase package size. Parsed as a decimal. |
VatPercentage | items.vatpercentage | The VAT percentage. Parsed as a decimal. |
EanCode | items.eanCode | The EAN code of the item. |
LastAvailableStock | items.lastavailablestock | The last known available stock. Parsed as a decimal. |
NextDelivery | Hardcoded | The next delivery date is hardcoded to 1900-01-01. |
Sysmodified | items.sysmodified | The system modified date. Parsed as a DateTime. |
CreatedDate | items.createdDate | The created date of the item. Parsed as a DateTime. |
VatIncluded | items.vatincluded | A character indicating if VAT is included. Defaults to 'E' if the source is empty. Takes the first character of the string. |
FreeSortField | items.freesortfield | A free sort field. Parsed as an integer. |
Price Logic
The connector handles multiple price lists. The base price is taken from `items.salesPrice`. Additional prices for other price lists are also retrieved and stored.
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
PriceList: Default | items.salesPrice | The default sales price. |
PriceList: Pricelist 2 | items.price_2 | The price for "Pricelist 2". |
PriceList: Pricelist 3 | items.price_3 | The price for "Pricelist 3". |
PriceList: Pricelist 4 | items.price_4 | The price for "Pricelist 4". |
Image Handling
The connector processes a single image per item, which is provided as a base64 encoded string.
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
PicturesBytes | items.picture | The image is a base64 encoded string. It is converted to a byte array and added to the item. The connector performs a hash check to avoid duplicate images. |
Matrix & Attributes
The connector retrieves item classifications (called "filters" in the web service) and maps them to App4Sales item classes and values.
First, the connector calls GetFilterNames() to get a list of all possible item classes. Then, for each item, it checks for fields with the caption `items.itemclassvalue` followed by an index. The index is used to look up the item class description from the `GetFilterNames()` result. The value of the field is then assigned as the item class value.