Add-ons and ModulesProduct Import

Product Import

Sana Commerce 8.3
Your provider

Product Import for NAV

The product import functionality is used to import products from the MS Dynamics NAV database to the SQL database.
It imports the following entities: products, product categories, product variants, variant components, related products and VAT rates.
  
Prepacks are not supported in the product import.
 
You can read about field mapping between Microsoft Dynamics NAV and SQL databases during the product import process here.

When the product import process is performed for the first time, the following conditions should be met to import a product:
  • Item and item variants are visible;

    Invisible items are not imported.

  • Item is not blocked:
    For Sana Commerce - NAV Connector: the 'Blocked' check box on the 'General' tab of the 'Item' card is unchecked;
    For Sana Commerce - NAV Connector with PFS add-on: in addition to the 'Blocked' check box the item should have the status in the 'Item Status' table on the 'Fashion' tab with the 'Sales Blocked' check box unchecked.
Next time the product import process is performed it will import only products which have been modified since the last time of a successful product import run. Changes to a product, product variant, product price, product translation and related products are tracked and registered as a modified product in Dynamics NAV. The last import date is saved in the product import process only when the product import process completed successfully.
It is possible to configure the product import to import always all products, instead of only the changed products. This can be useful for small catalogues but normally this is not recommended because of performance reasons.
The properties 'Visible' and 'Blocked' are also imported during the product import process and can be seen on the 'Catalog overview' page of the 'Catalog' module in the backoffice:
 

The 'Visible' Option on the 'Catalog Overview' Page
 

The 'Visible' and 'Blocked' Options on the 'View Product' Page
 
The product import uses the B2C Template Customer to determine the price and warehouse location code to be used. This customer is specified in the 'Webshop Card' (tab 'General') of the 'Webshop' menu item in Dynamics NAV.
 
During the product import process the following steps are performed:
 
Step 1: VAT information is imported from the NAV database into the table 'VatRate' in the SQL database. The data from columns 'VAT Prod. Posting Group' and 'VAT %' is imported from the NAV table 'VAT Posting Setup' to the SQL database.

Step 2: Item categories and Product groups are imported in the SQL database. This information is saved in the table 'Product Category' in SQL database. The category translations are imported to the 'ProductCategoryTranslation' table. The Id for product group has the form 'XXX__YYY',
where 'XXX' is the item category Id and 'YYY' - the product group Id.
Item categories and Product groups which were deleted in NAV will be deleted in SQL database next time the product import process is performed.

Step 3: The import of products is performed. If the imported product is a simple product (meaning a product without variants), all its data is saved in the 'Product' table and product translations - in the 'ProductTranslation' table. During the import of a product with variants the variant and variant component information is stored in the following tables in SQL database: 'VariantComponentGroup' > 'VariantComponent' > 'VariantComponentTranslation' > 'ProductVariant'.
 
Pfs module only:
The Sana Commerce API does not return information about the 'Variant Component' groups. Therefore during the import of products with variants from NAV, additional groups for components are generated in SQL database which are configured in the 'web.config' file. These groups are stored in the 'VariantComponentGroups' table in the SQL database:
 

The 'VariantComponentGroups' Table
 
The components might be repeated in NAV for each component code in SQL database.  That is why the additional suffix '_H' is added for horizontal components.
 
For products with variants components are created in the SQL database and assigned to the normalVariantComponentGroupCode which is configured in the configuration of the product import process. 
 
If a product variant has status 'Sales Blocked' in the 'Item Status' field in the 'Variants' table in NAV, the variant will not be imported.
 
The Sana Commerce - NAV Connector supports different VAT groups per variant.
 
The Sana Commerce - SQL Provider doesn't support different VAT groups per variant. That is why VAT groups for variants are not imported. The product's VAT group is inherited for all variants in SQL Provider.
 
The product translation table, variant component translation table and item category/product group translation tables in MS Dynamics NAV database relate to such tables in the SQL database: 'ProductTranslation', 'VariantComponentTranslation', 'ProductCategoryTranslation'.

If any data of mentioned tables in MS Dynamics NAV database was deleted then it is not deleted during import to the SQL database.

 
Step 4: Related products for imported products are saved in the 'RelatedProduct' table. If two products are interchangeable (are set as related products to each other), two records are created with both products. If a related product is deleted in the NAV database, during the next time the product import process is performed, the record in the 'RelatedProduct' table is deleted as well.
 
The field 'Main Navigation Code' on the Item card is not imported, because the related custom product navigation is not imported as well.
Add-ons and ModulesProduct Import