Bjorn Lunden - Item Update
This document describes the process of updating items from Bjorn Lunden to App4Sales. The connector fetches articles from the Bjorn Lunden API, including details like descriptions, prices, stock levels, and images. It then transforms and maps this data to the App4Sales item structure.
Data Source Configuration
The connector retrieves item data from the Bjorn Lunden REST API. The base URL for the API is configured in the connector settings. The following API endpoint is used:
GET /article: Retrieves a list of all articles. The connector filters out articles that are marked as inactive or closed.
Data Mapping Table
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
ItemCode | id | The unique identifier for the article. |
Description | name | The main description of the article. |
Description2 | descriptionIT | Italian description. |
Description3 | descriptionFR | French description. |
Description4 | descriptionES | Spanish description. |
Description5 | descriptionDE | German description. |
LastAvailableStock | availableStock | The available stock quantity. |
EanCode | barcode | The barcode of the article. |
SalesPrice | sellPrice1 | The primary sales price. Mapped to Price List 1 as well. |
InternalItemCode | entityId | The internal entity ID from Bjorn Lunden. |
ItemCategories | descriptionUK, and other unknown fields | 'descriptionUK' is mapped to an "DescriptionUK" item category. Any other fields returned by the API that are not explicitly mapped are also added as item categories. |
Domain Specifics
Price Logic
The connector reads up to five sales prices from the Bjorn Lunden article and maps them to App4Sales price lists. A price list is only created in App4Sales if a corresponding price from Bjorn Lunden exists. The `SalesPrice` on the item is set to `sellPrice1`.
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
PriceListPrice.ItemCode | id | The item's unique code. |
PriceListPrice.Price | sellPrice1, sellPrice2, sellPrice3, sellPrice4, sellPrice5 | The price for the given price list. A price list price is only created if the price is greater than 0. |
PriceListPrice.PriceListId | Derived | A hardcoded ID from 1 to 5, corresponding to `sellPrice1` to `sellPrice5`. For example, `sellPrice2` is mapped to Price List with ID 2. |
Image Handling
The connector can download images for each article from the Bjorn Lunden API. This functionality is enabled by the "Download images from ERP" setting. The connector first retrieves a list of document metadata associated with each article, filtering for those with image file extensions. It then downloads the actual image files in parallel. The number of parallel downloads can be configured with the "Max count of parallel requests for item pictures upload" setting.
Stock & Availability
The connector retrieves two types of stock values for each item and maps them to the App4Sales stock overview.
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
Stock.AvailableStock | availableStock | The quantity of an item that is available for sale. |
Stock.ShelfStock | physicalStock | The total quantity of an item in the warehouse. |
Related Settings & Prerequisites
Download images from ERP: When enabled, the connector will download images from the Bjorn Lunden API.
Max count of parallel requests for item pictures upload: Controls how many image download requests are made simultaneously. Defaults to 5 if not set or set to zero or less.
Use images only from PIM: If this setting (from the global PIM settings) is enabled, the connector will not download images from Bjorn Lunden, even if "Download images from ERP" is enabled.
Language Mapping
The connector creates a static mapping of language codes to description fields. This ensures that the different language descriptions from Bjorn Lunden are correctly displayed in App4Sales.
Language Code | Description Field |
UK | 1 (DescriptionUK is mapped to an ItemCategory) |
IT | 2 (descriptionIT) |
FR | 3 (descriptionFR) |
ES | 4 (descriptionES) |
DE | 5 (descriptionDE) |