CSV Connector - Item Update
The Item Update process syncs items, prices, stock, filters (attributes), and images from CSV and ZIP files located on an FTP server. The process can run in two modes: a full sync that first wipes all existing item data, or an incremental update.
Data Source Configuration
The connector retrieves data from an FTP location defined in the administration settings. It looks for specific files in designated subfolders. The FTP server details (Address, Username, Password) must be configured.
Items: Reads all
*.csvfiles from the/items/directory on the FTP server.Item Filters: Reads all
*.csvfiles from the/itemfilters/directory on the FTP server.Item Images: Reads a single ZIP archive (e.g.,
itempictures.zip) from the root FTP directory. This is only processed if images are not set to be synced via the main FTP Picture Sync task.
Data Mapping: Items
Item data is read from the CSV files in the /items/ folder.
App4Sales Field | Source Field (CSV Header) | Logic/Notes |
ItemCode |
| The unique identifier for the item. Records without an ItemCode are skipped. |
EanCode |
| The EAN barcode for the item. |
Description |
| Main item description. |
Description2 |
| Additional description field. |
Description3 |
| Additional description field. |
Description4 |
| Additional description field. |
Description5 |
| Additional description field. |
SearchDescription |
| Text used for searching the item in the app. |
SalesPrice |
| The base consumer sales price. The value is parsed as a decimal using an invariant culture (e.g., "123.45"). |
Currency |
| The currency code for the base sales price (e.g., EUR, USD). |
VatIncluded |
| A character indicating the VAT calculation method. Defaults to 'E' if parsing fails. |
VatPercentage |
| The VAT rate as a number. Parsed as a decimal using an invariant culture. |
LastAvailableStock |
| The stock quantity. Parsed as a decimal using an invariant culture. |
Unit |
| The sales unit of the item (e.g., PCS, BOX). |
MinimumOrderQuantity |
| The smallest quantity that can be ordered. Parsed as a decimal using an invariant culture. |
PurchasePackageSize |
| The quantity per purchasable package. Parsed as a decimal using an invariant culture. |
CreatedDate |
| The creation date of the item. If parsing fails, it defaults to the current sync time. |
NextDelivery |
| The next expected delivery date for out-of-stock items. The expected format is `yyyy-MM-dd`. |
FreeItemFields |
| Contains custom field data. See the "Free Fields" section for details on formatting. |
Data Mapping: Price Lists
The connector can dynamically read additional price lists from the item CSV file. Columns must be named in the format salesprice[Number], for example, salesprice1, salesprice2, etc.
App4Sales Entity | Source Field (CSV Header) | Logic/Notes |
PriceList |
| A new Price List is created for each unique number found (e.g., "PriceList 1"). The number becomes the Price List ID and Code. |
PriceListPrice |
| A price record is created linking the item to the corresponding price list with the specified price. Zero or empty values are skipped. |
Data Mapping: Item Filters (Classes & Values)
Item filters (attributes/classifications) are read from the CSV files in the /itemfilters/ folder. These are used to create filter options in the app.
App4Sales Field | Source Field (CSV Header) | Logic/Notes |
ItemClass (Name) |
| The name of the filter group (e.g., "Color", "Brand"). The connector also checks |
ItemClassValue (Value) |
| The specific value for the filter (e.g., "Red", "Nike"). The connector also checks |
(Link to Item) |
| This field links the filter value to a specific item. |
Sequence |
| Determines the display order of the filter values. |
Domain Specifics
Price Logic
Pricing is handled in two ways. A single base price is defined by the SalesPrice and Currency columns in the main item CSV. Additionally, multiple price lists for B2B scenarios can be provided by adding more columns to the item CSV file, named as salesprice1, salesprice2, and so on. The number in the header is used as the ID for the App4Sales Price List.
Image Handling
Item images are sourced from a ZIP archive (e.g., itempictures.zip). The connector extracts files with .jpg, .jpeg, and .png extensions. The filename itself is used to link an image to an item. The code uses a helper function to parse the filename, which likely expects a convention such as ITEMCODE_SEQUENCE.jpg (e.g., SHIRT01_1.jpg, SHIRT01_2.jpg). This process is skipped if the "Use images only from PIM" setting is active in the portal.
Stock & Availability
Stock is provided in the LastAvailableStock column in the item CSV file. There is no specific multi-warehouse logic in this connector; it is a single stock value per item. The NextDelivery field can be used to show when an item is expected to be back in stock.
Free Fields
The connector supports two formats for free fields, controlled by the UseDeprecatedFreeFieldsFormat setting.
Modern Format (default): The
FreeItemFieldscolumn should contain a string of key-value pairs, separated by semicolons, with the key and value separated by a colon. For example:Material:Cotton;Origin:Vietnam.Deprecated Format: The
FreeItemFieldscolumn is treated as a single text value. Commas are replaced with periods. This value is assigned to a single free field with the hardcoded caption "Vrij veld", unless the `HideFreeFieldCaption` setting is enabled.
Special Logic & Filters
Data Cleaning: If the
CleanDatasetting is enabled, the connector will execute aTRUNCATE TABLEcommand onitems,ItemPrices,PriceLists,itemclasses, anditemclassvaluesbefore importing. This erases all existing item data.Record Skipping: Item records from the CSV file are completely ignored if they do not have a value in the
ItemCodecolumn.Price Skipping: Prices from dynamic `salesprice` columns are not added if the value is zero or empty.
Related Settings & Prerequisites
The following connector settings in the portal control the item sync behavior:
Clean data: If checked, all existing item, price, and filter data will be deleted before the sync starts. Use with caution.
Separator character used in import files: Defines the column separator for all CSV files. Defaults to
;if left empty.Use deprecated free fields format: Enables the old single-value free field logic.
Hide free field caption: Hides the "Vrij veld" caption when the deprecated free field format is used.