Visma.NET Connector - ItemUpdate
This function synchronizes item data from Visma.NET to App4Sales. It processes inventory information, VAT details, unit of measures, sales categories, and item attributes. It also handles item images and updates stock information, ensuring that App4Sales has the most current product data. The synchronization typically runs as part of a scheduled connector sync.
Data Source Configuration
The connector retrieves item-related data directly from the Visma.NET API. This includes:
Inventory Information: Core item data (e.g., product codes, descriptions, default prices) are fetched from Visma.NET Inventory.
VAT Information: VAT zones, categories, and rates are retrieved from Visma.NET VAT settings.
Unit of Measures: Units used for sales, purchase, and base units are pulled from Visma.NET Unit of Measure definitions.
Sales Categories: Sales categories and their sub-categories are fetched from Visma.NET Sales Categories, and linked to inventory items.
Item Attachments (Images): Image data is fetched for each item's attachments from the Visma.NET API, provided that attachment synchronization is enabled in the connector settings and PIM images are not exclusively used.
Order Types: Active sales order types are retrieved from Visma.NET Sales Order Types to ensure consistency with App4Sales order types.
Data is pulled from the Visma.NET API using internal API calls for each specific entity.
Data Mapping Table - Items
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
|
| Direct mapping from the Visma.NET inventory number. |
|
| Mapped from the Visma.NET internal inventory ID, converted to a string. |
|
| Direct mapping of the item description. |
|
| The default sales price for the item. |
| Hardcoded | Always set to 'E' (Exclusive). |
|
| Derived from matching the item's |
|
| The sales unit for the item. |
|
| Extracted from |
|
| If the setting |
Data Mapping Table - ItemClasses
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
|
| A custom ItemClass named "Filter" is created based on the item's posting class description. |
|
| A custom ItemClass named "Item class" is created based on the item's item class description. |
|
| For each sales category an item belongs to, an ItemClass is created. If the sales category has a parent, the ItemClass description will be the parent's name. Otherwise, it will be "Sales category". The ItemClass value is the sales category's name. |
Data Mapping Table - ItemCategories
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
|
| Item categories are derived from Visma.NET Inventory attributes.
|
Data Mapping Table - Stock
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
|
|
|
| Live stock call (if enabled), | If |
Data Mapping Table - Purchase Package Size
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
|
| Defaults to 1.
|
Special Logic & Filters
Item Filtering: Items with a status of 'Inactive' or 'NoSales' in Visma.NET Inventory are skipped during synchronization.
Sales Category Linking: Sales categories are retrieved from Visma.NET and processed to create hierarchical information. Items are then linked to these sales categories.
Order Type Synchronization: Active sales order types from Visma.NET are synchronized to App4Sales. The standard "SO" order type in Visma.NET is mapped to the "Order" type in App4Sales. New active Visma.NET order types are added to App4Sales if they don't already exist, with
SendToBackofficeset to true andOnRelationCardset to false by default.
Domain Specifics (Expanded)
Image Handling
The connector handles item images attached to items in Visma.NET.
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
| Derived from image binary data | A hash is generated from the raw bytes of the image downloaded from Visma.NET. |
| Implicit from Visma.NET Attachments order | The sequence number is based on the alphabetical order of the attachment names from Visma.NET (starting from 1). |
|
| Links the picture to the App4Sales item using its |
| Derived from image binary data | Same hash as used in |
| Image data from Visma.NET Attachment API | Raw image bytes downloaded from Visma.NET. Only stored if the hash does not already exist in App4Sales. |
| Hardcoded | Always set to 'ERP'. |
Logic/Notes:
Images are retrieved from
inventory.Attachments(Visma.NET).Images are only synced if
DontSyncErpAttachmentssetting is false andUseImagesOnlyFromPIMPIM setting is false.Each attachment's raw data is fetched via a specific API call using its attachment ID.
A hash is computed from the image's binary content to identify unique images.
If an image with the same hash already exists in App4Sales, only a link to the existing image is created; the image data itself is not re-stored.
Images are sorted alphabetically by their filename from Visma.NET before assigning a sequence.
Stock & Availability
Stock information is synchronized and can be configured to use either summarized data or detailed live calls.
Logic/Notes:
The primary stock field updated is
LastAvailableStockon the App4Sales Item.Live Stock Information: If the
SyncDetailedStockInformationsetting is enabled, the connector makes a real-time API call to Visma.NET to retrieve detailed stock values. These values are then processed (including any configured stock formula) to determineLastAvailableStock. This also populates an internalfullStockValuesdictionary with detailed stock breakdowns:Shelf Stock (from Visma.NET OnHand)
To Be Delivered (from Visma.NET SoBooked)
To Be Received (from Visma.NET SoShipped)
Available For Shipment (from Visma.NET AvailableForShipment)
Available Stock (calculated using the App4Sales stock formula)
Warehouse filters (
warehousesToInclude,warehousesToExclude) can be applied to these detailed stock calls.Summarized Stock Information: If
SyncDetailedStockInformationis disabled,LastAvailableStockis calculated from theWarehouseDetailsprovided within the main Visma.NET Inventory data.If the
Warehousesetting is empty, stock is summed from all available warehouses in Visma.NET.If the
Warehousesetting contains a comma-separated list of warehouses, stock is summed only from those specified warehouses.
Matrix & Attributes
The connector processes various attributes and classification data from Visma.NET to enrich App4Sales items with ItemClasses and ItemCategories.
Logic/Notes:
ItemClasses:
"Filter" ItemClass: Created from
inventory.PostingClass.Description."Item class" ItemClass: Created from
inventory.ItemClass.Description.Sales Category ItemClasses: For each sales category an item belongs to, an ItemClass is generated. The name of the ItemClass is either "Sales category" or the parent category's name if a hierarchy exists. The value is the specific sales category name.
ItemCategories:
Derived from
VismaNetInventoryAttributeobjects.The content of the ItemCategory (name/value combination) is influenced by the
OnlyUseAttributeDescriptionForItemCategoriessetting.
Related Settings & Prerequisites
The following connector settings and prerequisites influence the Item Update process:
DefaultVatCodeForItems: Used to identify the relevant VAT zone in Visma.NET for calculatingVatPercentage.Warehouse: A comma-separated list of warehouse IDs. If provided, stock synchronization will only consider these warehouses whenSyncDetailedStockInformationis false.SyncDetailedStockInformation: Boolean flag. If true, the connector performs live API calls to retrieve detailed stock information and applies the App4Sales stock formula. If false, stock is derived from the main inventory data.DontSyncErpAttachments: Boolean flag. If true, item attachments (images) from Visma.NET will not be synchronized to App4Sales.CustomItemFieldForTheItemStatus: Specifies the name of a custom field or attribute in Visma.NET from which to source the item's status. The value must match a predefined App4Sales item status.PurchasePackageSizeAttribute: Specifies the name of an attribute in Visma.NET from which to source thePurchasePackageSize. If present, it overrides the unit-based calculation.UnitFieldForPackageSize: Determines which unit (Sales, Purchase, or Base Unit) from Visma.NET to use for calculatingPurchasePackageSizeifPurchasePackageSizeAttributeis not used.PIM Setting
UseImagesOnlyFromPIM: If this PIM setting is enabled in App4Sales, images from Visma.NET will not be synchronized, regardless of other connector settings.App4Sales Stock Formula: The calculation for "Available Stock" (when
SyncDetailedStockInformationis true) is based on the formula configured in App4Sales.