MultiversExtendedV2 - Item Update
This process syncs item data from XML files, downloaded from an (S)FTP server, into the App4Sales database. It handles items, prices, stock, categories, and images. The synchronization processes files in a specific order, starting with categories, then prices, stock, and finally the item files themselves. It processes the newest files first and stops if it encounters a file with a different date to prevent using outdated information.
Data Source Configuration
The connector retrieves XML files from a configured (S)FTP server. The specific files and directories are configured in the connector settings.
Items: XML files containing the core item data. The file location is configured in the
FtpItemLocationsetting, and the file name prefix is configured in theFtpFileNameForItemSyncsetting.Categories: XML files with item categories and classifications. The file location is configured in the
FtpLocationCategoriessetting, and the file name prefix is configured in theFtpFileNameForCategorySyncsetting.Prices: XML files containing price information. The file location is configured in the
FtpLocationPricessetting, and the file name prefix is configured in theFtpFileNameForProductPricessetting.Stock: XML files with stock information. The file location is configured in the
FtpLocationStockssetting, and the file name prefix is configured in theFtpFileNameForProductStockssetting.Images: Image files (e.g., JPG) are downloaded from the FTP server. The main image location is configured in
FtpImageLocation, and a separate location for mood pictures can be set inFtpMoodPictureLocation.
Data Mapping Table - Items
App4Sales Field | Source Field (XML) | Logic/Notes |
ItemCode |
| The ItemCode is composed based on settings. It can be a combination of |
InternalItemCode |
| The internal item code is always the |
Description |
| The item description. If the setting |
SearchDescription |
| The search keys for the item. |
EanCode |
| The EAN code of the item. |
Unit |
| The unit of the item. |
PurchasePackageSize |
| The purchase package size. By default, it's taken from |
VatPercentage |
| The VAT percentage of the item. |
LastAvailableStock |
| The available stock. It can be taken directly from |
IsActionItem | - | This is set to |
AcceptsDefaultDiscount | - | This is set to |
FreeSortField | Category or Attribute | An integer value used for sorting. The source is determined by the |
RelatedItems |
| If the |
Free Fields | Varies | Several pieces of information are mapped to free fields, including item status, unit description, and extra descriptions. See the "Special Logic & Filters" section for more details. |
Data Mapping Table - Item Prices
App4Sales Field | Source Field (XML) | Logic/Notes |
SalesPrice |
| The sales price of the item. The logic depends on several settings. If |
Currency |
| The currency of the price. |
VatIncluded | - | Hardcoded to 'E' (Excluded). |
Data Mapping Table - Item Stock
App4Sales Field | Source Field (XML) | Logic/Notes |
LastAvailableStock |
| The stock is calculated based on a formula defined in the App4Sales settings. The formula uses fields from the `MultiversProductStock` entity, which is read from the stock XML files. If no stock file is provided, it can also be retrieved via an API call. |
NextDelivery | - | The next delivery date, which can be retrieved from stock data. |
StockIndicator | - | The stock indicator is calculated based on the `LastAvailableStock` and the thresholds defined in the App4Sales settings (`QuantityForRed` and `QuantityForGreen`). |
Special Logic & Filters
Item Filtering: Items can be skipped based on several conditions:
If they are blocked and
SyncBlockedItemsis disabled.If they are inactive and
SyncInactiveItemsis disabled.If they are discontinued and
SkipDiscontinuedItemsis enabled.If they match a specific attribute value defined in
SkipItemsByAttribute.If no price information is found and
DoNotSkipItemsWhenThereIsNoPriceInXmlorDoNotSkipItemsWhenThereIsNoPriceInApiis disabled.
Status Free Field: A "Status" free field can be created with values based on the item's status (discontinued, inactive, blocked, active). The labels for these statuses are configured via settings like
StatusFreeFieldTermForDiscontinuedItems.Staffel/Tier Prices: The connector can create a "Staffel" free field containing tier pricing information. The logic for this is controlled by settings like
AddStaffelBasedOnThisLadderPriceVolumeDiscountandPriceCodeForStaffel.Multi-language Descriptions: The connector can handle multiple languages for item descriptions. The default language is set with
DefaultLanguageCode, and additional languages can be configured. Short and long descriptions from the XML are mapped to the corresponding App4Sales description fields.
Domain Specifics
Price Logic
Prices are read from separate XML files specified by FtpLocationPrices and FtpFileNameForProductPrices. The connector can handle general prices, action prices, and tiered pricing (staffels). If the setting GetMultiversPriceList is enabled, the connector will also create and update pricelists and pricelist prices in App4Sales.
Image Handling
Images are downloaded from the (S)FTP server. The main image folder is configured in FtpImageLocation. Mood pictures for lookbooks can be downloaded from a separate folder specified in FtpMoodPictureLocation. The connector expects JPG files and matches them to items based on the item code.
Stock & Availability
Stock information is retrieved from XML files (configured via FtpLocationStocks and FtpFileNameForProductStocks) or through an API call. The final stock value is calculated using a formula that can be customized in the App4Sales settings. This formula can use fields like available stock, actual stock, reserved stock, and blocked stock from the source data. The connector can also determine the next delivery date.
Matrix & Attributes
The connector supports matrix items (parent/child relationships) and maps item attributes and categories to App4Sales item classes and free fields. Categories are read from the category XML files. The setting UseCodeForItemCategories determines whether the code or the description from the category is used for mapping. The connector can also create a hierarchical structure of item categories based on the MultiLevelItemCategories setting.
Related Settings & Prerequisites
FtpAddressForItemSync: The (S)FTP server address.PortalUsername/PortalPassword: Credentials for the (S)FTP server.UseSFTP: Must be enabled to use SFTP instead of FTP.FtpItemLocation,FtpFileNameForItemSync: Path and file prefix for item XML files.FtpLocationCategories,FtpFileNameForCategorySync: Path and file prefix for category XML files.FtpLocationPrices,FtpFileNameForProductPrices: Path and file prefix for price XML files.FtpLocationStocks,FtpFileNameForProductStocks: Path and file prefix for stock XML files.UseExtendedProductId,ItemCodeWithoutUnit: Control the composition of the App4SalesItemCode.SyncBlockedItems,SyncInactiveItems,SkipDiscontinuedItems: Control which items are synchronized based on their status.GetMultiversPriceList: Enables the synchronization of pricelists.UseProductSubstitutesForRelatedItems: Enables the synchronization of related items.
Known Limitations
Based on the code analysis, the following limitations have been identified:
The connector seems to rely heavily on a specific naming convention for the XML files, including a date stamp (yyyyMMdd). Files that do not follow this convention might be ignored.
The error handling for file downloads is basic, with a retry mechanism of 5 attempts. If the FTP server is unreliable, this might lead to incomplete data synchronization.