MicrosoftBusinessCentral Connector - Item Update
This document details the Item Update process for the App4Sales platform using the Microsoft Business Central connector. The connector synchronizes item data, including variants, pricing, stock, images, and various attributes, from Microsoft Business Central to the App4Sales internal database. This process ensures that App4Sales has up-to-date product information for sales representatives. The update typically runs on a scheduled basis.
Data Source Configuration
Item data is retrieved from various endpoints within the Microsoft Business Central API. The specific endpoints and filters applied are influenced by connector settings. Authentication against the Business Central API is required. Data is pulled from Business Central.
Base Item Data: Retrieved from an item endpoint configured via
UseItSuitsFashionDatasetting. Additional properties can be expanded usingExtraItemExpandProperties. Items marked as 'Blocked' in Business Central are excluded. If theItemBooleanCustomFieldForSyncFlagsetting is specified, only items with this custom boolean field set to true are synchronized.Item Variants: If
EnableItemVariantSupportis enabled, variant information is fetched for each item from theitems({itemId})/ItemVariantsendpoint.Units of Measure: Retrieved from the
ItemUnitsOfMeasureendpoint.Extended Texts: Retrieved from the
ExtendedTextLinesendpoint.Item Attribute Values: Retrieved from the
ItemsAttributeValuesendpoint. Blocked attributes are excluded.Purchase Order Lines: If
ShowDateOfNextPurchaseOrderArrivalForItemis true, future purchase order lines are retrieved from thePurchaseOrderLinesendpoint.Default Dimensions: Retrieved from the
DefaultDimensionendpoint, filtered by ParentType 'Item'. IfUseDimensionValuesis enabled, dimension values are also retrieved from theDimensionValuesendpoint to provide full dimension names.Stock Information: Retrieved through internal stock repositories and builders, which aggregate data based on configured locations and Stock Keeping Units (SKUs).
Workflow Document Statuses: If
ItemWorkflowStatusesForSyncis configured, statuses are retrieved from theGACWorkflowDocStatusOviewendpoint. Items are then filtered based on these statuses.Item References: If
ItemReferenceTypeForEanCodeandItemReferenceUnitOfMeasureForEanCodeare configured, item references are retrieved from theItemsReferencesendpoint, primarily for EAN code determination.Additional Item Information: If
UseItemInformationTableForAdditionalItemInfois true, extra item details are retrieved from theItemInformationendpoint.Item Categories: Retrieved from the
ItemCategoriesendpoint.VAT Posting Setup Entries: Retrieved from the
VatPostingSetupEntryendpoint for VAT percentage calculation.Item Pictures: If not handled by an FTP directory (
FtpPictureDirectory) or PIM system (UseImagesOnlyFromPIM), pictures are downloaded directly from Business Central via anItemPictureRepository.
Data Mapping Table - App4Sales Item
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
|
| Base item code from Business Central. For variants, it's derived as |
|
| Internal GUID of the item from Business Central. |
|
| Item description. |
|
| 'I' if Business Central's |
|
| Item type from Business Central. |
|
| Defaults to |
|
| The earliest |
| Derived from | Stock indicator, reflecting overall stock status. Defaults to -1 if no stock information is available. |
|
| Determined by the |
|
| Timestamp of the last modification in Business Central. |
|
| Raw byte content of item images. |
|
| Mapped from Business Central's |
|
| Defaults to |
|
| Prioritized logic: 1. If |
|
| Prioritized logic: 1. If |
|
| Calculated based on |
| Derived from | For variant items, a JSON object containing |
| Various fields from | A collection of categories derived from multiple sources: unknown elements, price list codes (if |
Data Mapping Table - App4Sales Item Stock
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
|
| Item code for which the stock information applies. |
|
| Available stock quantity. |
|
| Stock quantity currently on the shelf. |
|
| Quantity committed to sales orders. |
|
| Quantity expected from purchase orders. |
Special Logic & Filters
Item Filtering: Items are filtered based on their 'Blocked' status in Business Central. Further filtering occurs if
ItemBooleanCustomFieldForSyncFlagis set, only syncing items where this custom flag is true. After initial processing, items can also be filtered byItemWorkflowStatusesForSyncto include only those matching specified workflow statuses.Variant Handling: If
EnableItemVariantSupportis active, each item variant from Business Central is treated as a separate App4Sales item, with itsItemCodeconstructed by appending the variant code to the parent item code.Price Calculation: Sales prices are dynamically determined, prioritizing price list configurations over the item's base unit price.
Purchase Package Size: This field is populated based on a cascading logic involving specific Unit of Measure, Order Multiple, or a custom field/attribute.
VAT Percentage: Calculated by matching the item's VAT product posting group (and optionally business posting group) against VAT posting setup entries.
Last Available Stock: Determined by a priority system, checking specific item information, custom fields, or general stock information.
Item Categories (Dynamic): Many properties, attributes, and related data points are dynamically converted into App4Sales Item Categories, providing rich classification for non-technical users. This includes extended texts, dimensions, and specific stock quantities.
Image Download: Item pictures are downloaded from Business Central only if not already managed by an FTP server or a PIM system, preventing redundant downloads.
Domain Specifics (Expanded)
Price Logic
The connector supports flexible price retrieval and calculation, considering both base unit prices and configured price lists.
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
|
| Determined by the following hierarchy:
The |
|
| If |
Image Handling
Item images are handled based on existing configurations for efficiency.
Source: Images can originate directly from Microsoft Business Central.
Conditional Download: Images are only downloaded from Business Central if the
FtpPictureDirectoryconnector setting is empty (meaning no FTP server is used for images) AND theUseImagesOnlyFromPIMsetting is false (meaning no PIM system is exclusively managing images). This prevents unnecessary data transfer if images are managed externally.Mapping: Downloaded images are stored as raw bytes in
Item.PicturesBytes.
Stock & Availability
Stock information is a composite of various Business Central data points, reflecting different aspects of availability.
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
| Derived from | A general indicator of stock availability, derived from the collected stock information. Defaults to -1 if not available. |
|
| Determined by the following prioritized logic:
|
|
| Quantity of items on purchase orders. |
|
| Quantity of items reserved on purchase orders. |
|
| Calculated quantity of items remaining on order (Total on PO - Reserved on PO). |
|
| If |
Matrix & Attributes
The connector supports mapping Business Central attributes, dimensions, and categories to App4Sales ItemClasses and Free Fields. Variants are also managed as distinct items with linked parentage.
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
|
| For variants, the |
|
| For variant items, a JSON object is stored in |
|
| For each variant, an |
|
| Mapped from Business Central item attributes. If |
|
| Each default dimension from Business Central is added as an item category (e.g., "DimensionCode" -> "DimensionValue"). If |
|
| If |
|
| Extended text lines are grouped by language and extended text number, then concatenated and added as an item category (e.g., "Extended text [LanguageCode-ExtendedTextNo]"). |
|
| Any unknown elements (custom fields) found directly on the |
Related Settings & Prerequisites
The following connector settings significantly influence the Item Update process:
FtpPictureDirectory: If empty, pictures may be downloaded directly from Business Central.UseImagesOnlyFromPIM: If false (andFtpPictureDirectoryis empty), pictures may be downloaded directly from Business Central.UseItSuitsFashionData: Influences the item endpoint used for retrieving base item data.ExtraItemExpandProperties: Specifies additional properties to expand when fetching item data.ItemBooleanCustomFieldForSyncFlag: A custom boolean field in Business Central used to filter which items are synchronized.EnableItemVariantSupport: Enables the retrieval and mapping of item variants as distinct App4Sales items.ShowDateOfNextPurchaseOrderArrivalForItem: If true, the earliest expected receipt date from purchase orders is calculated and added to item categories.UseDimensionValues: If true, full dimension values (names) are retrieved and used when mapping default dimensions.ItemWorkflowStatusesForSync: A comma-separated list of workflow statuses; items will be filtered to include only those matching these statuses.ItemReferenceTypeForEanCode,ItemReferenceUnitOfMeasureForEanCode,ItemReferenceBarcodeTypeFOrEanCode: Settings used to determine EAN code from item references.UseItemInformationTableForAdditionalItemInfo: If true, additional item information from a dedicated table is used forLastAvailableStockand populating item categories.PriceListCodeForStandardPrice: The code of the price list to use for determining the standard sales price.CustomerPriceGroupCodeForItemUOM: If set, uses the Unit of Measure from the sales price associated with this customer price group.UnitOfMeasureForPurchasePackageSize: If set, uses the quantity per unit from a matching Unit of Measure forPurchasePackageSize.UseOrderMultiplyFieldForItemPurchasePackageSize: If true, uses the item's Order Multiple forPurchasePackageSize.ExtraFieldNameForPurchasePackageSize: A custom field name to retrievePurchasePackageSizefrom unknown elements or attributes.VATBusinessPostingGroupCodeForItemVATPercent: Used in conjunction withVatProductPostingGroupto find the correct VAT percentage.FreeFieldNameForLastAvailableStock: A custom field name to retrieveLastAvailableStockfrom unknown elements.AddPriceListsToItemCategories: A comma-separated list of price list codes; prices from these lists will be added as item categories.UseLevelsForItemCategoryCode: If true, item category codes are generated hierarchically (e.g., "Parent | Child").IndicatorFieldNameToSyncItemCategories: A custom boolean field in Business Central used to determine if an item category should be synchronized.
Known Limitations
The system assumes the correctness of configured custom field names and references. Incorrect settings may lead to missing data or unexpected behavior.
Price lists are applied based on a single
PriceListCodeForStandardPrice. More complex pricing rules (e.g., customer-specific pricing, quantity breaks beyond basic sales price logic) might require custom logic or additional development.Image handling prioritizes external sources (FTP, PIM) over Business Central download. If external sources are misconfigured, images may not sync correctly even if available in Business Central.
Stock calculations are aggregated from Business Central's stock information; advanced multi-warehouse logic or real-time stock checks beyond the provided data points are not inherently supported by this connector.