ConfigurationProduct Stock and Price Import

Product Stock and Price Import

Product Stock and Price Import

Product stock and price import functionality is used to import product stock and product price data from the MS Dynamics NAV database to the SQL database. This import exists next to the product import because stock and price information of a product might need to be imported more frequently since such data is regularly changed. This also adds the ability to handle start and end dates of prices configured in Dynamics NAV. Note that the product stock and price import will always import all visible products from Dynamics NAV unlike the product import which takes only changed products (can be configured differently though).
 
Imported product prices are based on prices for the B2C Template Customer, which is specified in the 'Options' window (tab 'General') of the 'Sana Commerce Live' menu item in Dynamics NAV. Imported product stock is based on the Location Code for this Template Customer.
 
Before the 'Product stock and price import' process is performed the availability of the product or a variant on both databases is checked. If the product or variant is not available on the SQL database the stock and price for this product is not imported.
 
'Product Stock and Price Import' functionality uses the Sana Commerce task scheduler. You can read more about it in this chapter.
 
The configuration of the Product Stock and Price Import task is performed in the 'sanaCommerce' configuration section of the backoffice web.config file.
To configure the Product Stock and Price Import task:
  • Open the backoffice web.config file.
  • Locate the 'sanaCommerce' configuration section.
  • Locate the 'tasks' subsection:
       <task name="ProductStockandPriceImportTask"
           type="Sana.Commerce.Tasks.Import.ProductStockandPriceImportTask, Sana.Commerce.Tasks.ProductImport"
           time="4:00am"
           enabled="true"
           sourceCustomerProviderId="NavisionFashionCustomerProvider"
          sourceCatalogProviderId = "NavisionFashionCatalogProvider"
           destinationWebsiteCode = "B2xSql"
           batchSize="10"
           importType="StockandPrice"/>
  • Check the following configuration nodes and change them if needed:
    time: the daily time when the Product Stock and Price Import task should be performed.
    sourceCustomerProviderId: Identifier of the Customer provider, which is used to get a B2C Template Customer from NAV. It is selected from the 'Sana Commerce - Modules' configuration section of the web.config.
    sourceCatalogProviderId: Identifier of the Catalog provider, which is used as the source for the product price and stock data. It is selected from the 'Sana Commerce - Modules' configuration section of the web.config.
    destinationWebsiteCode: the code of the webshop to which the stock and price import is performed. It is selected from the 'Sana Commerce - Sites' configuration section of the web.config.
    batchSize: the amount of products which are handled in one batch.
    importType: this parameter specifies what type of data is imported: 'Stock', 'Price', or 'StockandPrice'. It determines which data (stock and price) will be updated by the import.
All configuration nodes are required parameters and should be filled in to prevent any problems.

When product price is imported it always includes VAT.
 
The 'Price Including VAT' setting on 'Customer' card in MS Dynamics NAV doesn't have any influence on price which is imported.
ConfigurationProduct Stock and Price Import