Monitor Connector - Item Update
The item update process for the Monitor connector synchronizes item data from XML files hosted on an FTP server with the App4Sales database. It processes item details, classifications, prices, and stock information. The main data source is items.xml, with supplementary data from itemfilters.xml for classifications and Languages.xml for language/translation data.
Data Source Configuration
The connector retrieves data from an FTP or SFTP server defined in the connector settings. It downloads the following files from the root folder specified in the connection URL:
items.xml: Contains the core item data.
itemfilters.xml: Contains item classifications (item classes).
Languages.xml: Contains language information for item descriptions (optional).
The connector processes these files and then deletes the local copies after the update is complete.
Data Mapping Table - Items
App4Sales Field | Source Field (XML Node) | Logic/Notes |
ItemCode | item.ID | Unique identifier for the item. |
Description | items.description | Main description of the item. |
Description2 | items.description2 | Additional description field. |
Description3 | items.description3 | Additional description field. |
Description4 | items.description4 | Additional description field. |
Description5 | items.description5 | Additional description field. |
SalesPrice | items.salespackageprice | The main sales price for the item. Parsed as a decimal value. |
Currency | - | Set to the administration's currency symbol, or defaults to "EUR". |
EanCode | items.eancode | EAN (barcode) for the item. |
Unit | items.unit | The unit of measure for the item. |
VatIncluded | items.vatincluded | A character indicating if VAT is included in the price. Items without this field are skipped. |
VatPercentage | items.vatpercentage | Can be a direct percentage or a string in the format "code~country". If it's the latter, the connector looks up the VAT percentage based on the code and country. Defaults to 0 if the lookup fails. |
LastAvailableStock | items.lastavailablestock | The available stock quantity. |
NextDelivery | items.nextdelivery | The next expected delivery date for the item. |
MinimumOrderQuantity | items.minimumorderquantity | The minimum quantity required for an order. |
PurchasePackageSize | items.purchasepackagesize | The size of a purchase package. |
PicturesBytes | items.picture | A Base64 encoded string containing the item image. The connector decodes this and adds it as an item picture. |
CreatedDate | items.createddate | The creation date of the item record. |
Sysmodified | items.sysmodified | The last modification date of the item record. |
FreeSortField | items.freesortfield | A free integer field for sorting. |
FreeItemFields | items.freeitemfields | A free text field for additional item information. |
SearchDescription | items.searchdescription | A field used for searching for the item. |
RelatedItems | items.relateditems | An XML containing linked items on the item detail card. |
RelatedItemsText | items.relateditemstext | A search field to link items on the scan page. |
Special Logic & Filters
Items that do not have a `vatincluded` value are skipped.
The connector setting `OnlyImportItemsWithPriceList` can be used to filter items based on the existence of a price in a specific pricelist (1-4). For example, if set to 2, only items with a value in `items.price_2` will be imported.
If an error occurs during the processing of `items.xml` or `itemfilters.xml`, the update process for that part is halted and an error is logged.
Domain Specifics
Price Logic
The connector can process multiple price lists for each item. Prices are read from fields with the pattern `items.price_#` in `items.xml`.
App4Sales Field | Source Field (XML Node) | Logic/Notes |
PriceList.Code | items.price_# (the # part) | The number from the XML field name is used as the `Code` for the price list. For example, `items.price_2` corresponds to price list with code "2". |
PriceList.Description | - | A description is generated automatically, e.g., "Pricelist 2". |
PriceListPrice.Price | items.price_# (the value) | The value of the XML field is stored as the price for the item in the corresponding price list. |
Image Handling
The primary image for an item can be included directly in the `items.xml` file as a Base64 encoded string within the `items.picture` field. The connector decodes this string and saves it as the item's picture. If the `OnlyUpdateNewPictures` setting is enabled, existing pictures will not be updated.
Stock & Availability
Stock information is read from the `items.lastavailablestock` field. Additionally, a `StockIndicator` can be calculated based on the stock value and pre-defined formulas in App4Sales if the `GetStockIndicatorByFormula` setting is enabled.
Matrix & Attributes
The connector supports matrix items (parent/child relationships) and item attributes (item classes).
App4Sales Field | Source Field (XML Node) | Logic/Notes |
MatrixParent | items.matrixparent | The item code of the parent item in a matrix structure. |
MatrixXDescription | items.matrixxdescription | Description for the X-axis of the matrix (e.g., "Color"). |
MatrixXValue | items.matrixxcode | The value for the X-axis of the matrix (e.g., "Red"). |
MatrixYDescription | items.matrixydescription | Description for the Y-axis of the matrix (e.g., "Size"). |
MatrixYValue | items.matrixycode | The value for the Y-axis of the matrix (e.g., "XL"). |
ItemClasses | itemclassvalues.value# | Item attributes are created from fields like `itemclassvalues.value1`, `itemclassvalues.value2`, etc. The connector uses `itemfilters.xml` to look up the name of the item class (e.g., "Brand") based on the number in the field name. |
Related Settings & Prerequisites
FTP/SFTP Credentials: The FTP host, username, and password must be configured for the connector to access the XML files.
OnlyImportItemsWithPriceList: (Optional) Can be set to a number from 1 to 4. If set, only items that have a price in the specified price list will be imported.
OnlyUpdateNewPictures: (Optional) If enabled, the connector will not update existing item pictures.
UseStockIndicatorFromConnector: If enabled, the stock indicator is taken directly from the `items.stockindicator` field.
GetStockIndicatorByFormula: If enabled, the stock indicator is calculated using a formula based on the available stock.