Sage100 Connector - ItemUpdate
The ItemUpdate function synchronizes item-related data from Sage100 to the App4Sales platform. It retrieves items, prices, VAT percentages, warehouses, stock information, and item classifications from Sage100 APIs and SQL services, then transforms and maps this data to the internal App4Sales item structure. This process ensures that App4Sales has up-to-date information on products for sales representatives and for internal use.
Data Source Configuration
The connector retrieves item data from various Sage100 API endpoints and a SQL service.
Item Units: Fetched from the API endpoint
ArticleService/rest/GetUniteVenteList.Item Prices: Fetched from the API endpoint
TarifService/rest/GetListTarifArticles. These include item-specific pricing and category-based tariffs.VAT Percentages: Retrieved from the API endpoint
TaxeService/rest/GetList.Warehouses: Obtained from the API endpoint
StockService/rest/GetListDepot.Available Stock: Queried from the SQL Service endpoint
SqlService/rest/GetDatausing the SQL viewview_webservice_availablestock.Item Classes: Sourced from the API endpoint
ArticleService/rest/GetCatalogueList. These are used to build item classifications in App4Sales.Items: The core item data is retrieved from the API endpoint
ArticleService/rest/GetList.Item Pictures: Fetched from the API endpoint
FileService/rest/ArticleImage/{itemCode}, where{itemCode}is dynamically replaced with the item's reference.
Data Mapping Table - Items
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
ItemCode |
| Direct mapping from Sage100 item reference. |
EanCode |
| Direct mapping from Sage100 barcode. |
Description |
| Direct mapping from Sage100 item title/description. |
Unit |
| Looks up the unit's |
InternalItemCode |
| Direct mapping from Sage100 item reference. |
PurchasePackageSize | Derived | Hardcoded to |
SalesPrice |
| Direct mapping from Sage100 sales price. |
VatPercentage |
| Defaults to |
VatIncluded |
| Set to 'I' (Included) if Sage100 |
NextDelivery |
| If Sage100 |
AcceptsDefaultDiscount |
| Set to |
ItemType |
| Mapped by converting the Sage100 article type enumeration to its string representation. |
Description2 |
| Direct mapping from Sage100 additional language description 1. |
Description3 |
| Direct mapping from Sage100 additional language description 2. |
LastAvailableStock |
| Aggregated from all available stock records for the item and calculated using the stock formula (default: |
ItemClasses (Assortment) |
| Uses |
ItemClasses (Assortment2) |
| Uses |
ItemClasses (Assortment3) |
| Uses |
ItemClasses (Assortment4) |
| Uses |
FreeItemFields |
| Mapped from Sage100 free fields. Converted into an XML string containing key-value pairs. Free fields with a value of "0" are skipped if the |
FreeSortField |
| If an |
Data Mapping Table - Item Prices
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
PriceList.Id |
| Mapped from Sage100 price category ID. Uses a default value if null. |
PriceList.Code |
| String representation of Sage100 price category ID. |
PriceList.Description |
| Mapped from Sage100 price category description. |
PriceList.Selectable | Derived | Hardcoded to |
PriceListPrice.ItemCode |
| Mapped from Sage100 item reference for pricing. |
PriceListPrice.PriceListId |
| Mapped from Sage100 price category ID. Uses a default value if null. |
PriceListPrice.Price |
| Mapped from Sage100 sales price. Note: The connector currently only uses prices exclusive of VAT. |
Data Mapping Table - VAT Percentages
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
VatCodePercentage.Country | Derived | Hardcoded to |
VatCodePercentage.VatCode |
| Mapped from Sage100 tax code. |
VatCodePercentage.VatPercentage |
| Mapped from Sage100 tax rate. |
Data Mapping Table - Warehouses
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
Warehouse.MagCode |
| Mapped from Sage100 warehouse ID. |
Warehouse.MagDescription |
| Concatenation of Sage100 warehouse code and title/description (format: |
Special Logic & Filters
Item Status Filtering: Only items with a Sage100
Statusof 'Active' are processed. Items with other statuses are skipped.Webshop Item Filtering: If the connector setting
Pass Web Shop Itemis enabled, only items with a Sage100Webshopstatus of 'Active' are processed.Stock Calculation: The
LastAvailableStockfor an item is calculated based on a configurable stock formula. The default formula is+ShelfStock-ToBeDelivered+ToBeReceived. Stock values from Sage100SqlServiceAvailableStock.QteAvailcontribute to this calculation.Image Handling Conditional Logic: Item pictures are fetched from Sage100 if the
UseImagesOnlyFromPIMsetting isfalse. If this setting istrue, the connector assumes images are managed by a separate PIM system and does not attempt to fetch them from Sage100.Free Fields Zero Value Handling: When mapping free fields, any free field with a value of "0" will be skipped if the connector setting
Allow zero values in free fieldsisfalse.
Domain Specifics (Expanded)
Price Logic
The connector retrieves item prices from Sage100 using the TarifService/rest/GetListTarifArticles API. Prices are categorized by IdCategorieTarifaire, which maps to App4Sales PriceList.Id. The SalesPrice (PrixVente) is directly mapped to PriceListPrice.Price. Note: The connector currently only supports prices exclusive of VAT. Inclusive VAT prices are not considered in the current implementation. VAT percentages are applied based on the UseVatCodeForVatLiability setting, which looks for a matching VAT code (CodeTaxe) from Sage100.
Image Handling
Item pictures are retrieved from Sage100 via the FileService/rest/ArticleImage/{itemCode} API endpoint. The system attempts to fetch images for each item unless the UseImagesOnlyFromPIM setting is enabled. If an image is not found or an error occurs during retrieval, it is logged, but the item update process continues without the image.
Stock & Availability
Stock information is obtained from the Sage100 SQL service by querying the view_webservice_availablestock view. The QteAvail field from this view is used to calculate the LastAvailableStock in App4Sales. The calculation is dynamic and based on a configurable stock formula, which defaults to +ShelfStock-ToBeDelivered+ToBeReceived if no specific formula is defined.
Matrix & Attributes
Item classifications in App4Sales are derived from Sage100's catalogue system and free fields. The IdCatalogue1, IdCatalogue2, IdCatalogue3, and IdCatalogue4 fields from Sage100 Item entities are mapped to generic 'Assortment' item classes in App4Sales. The Description (Nom) from the Sage100 ItemClass is used for the item class value; if not available, the catalogue ID itself is used. Additionally, Sage100's free fields (InfosLibres) contribute to both App4Sales free item fields and additional item classes or a free sort field, depending on how their corresponding ItemCategory is configured in App4Sales (i.e., whether it's marked as a free field, filter, or free sort field).
Related Settings & Prerequisites
The following connector settings influence the behavior of the ItemUpdate function:
Use vatcode for vatliability: (
UseVatCodeForVatLiability) Specifies the VAT code to use for determining the default VAT percentage for items. If a matching VAT code is found in Sage100, its percentage is applied.Pass Web Shop Item: (
IsWebshopItem) If enabled, only items marked as 'Active' in Sage100's webshop status will be processed.Allow zero values in free fields: (
AllowZeroValuesInFreeFields) Iffalse, free fields with a value of "0" from Sage100 will be ignored and not mapped to App4Sales.
Additionally, the global PIM setting UseImagesOnlyFromPIM, found in PimSettings, controls whether item pictures are sourced from Sage100 or an external PIM system. If true, Sage100 item pictures are skipped.
Known Limitations
The connector currently only handles prices exclusive of VAT when updating price lists. Inclusive VAT prices are not supported.
Item pictures are fetched individually per item, which may impact performance for a very large number of items.
The stock formula has a default value (
+ShelfStock-ToBeDelivered+ToBeReceived); if Sage100 stock fields do not align with these, custom configuration of the stock formula is required.