Example - Importing new products using Kentico Import Toolkit

Kentico Import Toolkit is a utility that allows you to import products to the system.

This example demonstrate importing new products from an XLSX file to the sample E-commerce Site using Kentico Import Toolkit.

Preparing a source file

Before starting to import new products, prepare your XLSX file with products. The top row should contain the column names from the database table. We add five cellphones to sections according to their operating system:

  • iOS (Node ID: 118) – Apple iPhone
  • Android (Node ID: 117) – Samsung Galaxy S5, Sony Xperia Z3 and Huawei Ascend P7
  • Windows PhoneNokia Lumia 1020

Since the sample E-commerce Site does not have a section for Windows Phone, the parent node of Nokia Lumia 1020 will be Cellphones (Node ID: 68).

Products to import in an XLSX file

Download the XLSX file with the example data here.

Importing the products

  1. Launch Kentico Import Toolkit.

  2. Select Start new import session, and click Next.

  3. In Step 1, specify the root folder of the project into which you want to import the products.

  4. Confirm that you did a backup of your project, and click Next.

  5. In Step 2, select the following properties, and click Next:

    • Select data type to import: Pages
    • Automatically publish pages under workflow: No (cleared)
    • Import data to site: E-commerce Site
    • Import as: Product - Cellphone
    • Import as products: Yes (selected)
    • Import options: Import new and overwrite existing pages
      • Note: In this case, all of the options in the Import options field would work (since the sample E-commerce Site does not contain the imported products).
        Selecting object type of the products
  6. In Step 3, select the File (XML, CSV or Excel formats), browse for the prepared XLSX file, and click Next.

  7. Since the data starts in the A1 cell, just click Next in Step 4.

  8. In Step 5, click Next.

  9. In Step 6, map the following target fields to the following source fields:

    • CellPhoneWeight: CellPhoneWeight
    • CellPhone3G: CellPhone3G
    • DocumentName: DocumentName
    • DocumentCulture: DocumentCulture
    • DocumentSKUName: DocumentName
    • DocumentSKUDescription: DocumentSKUDescription
    • SKUNumber: SKUNumber
    • SKUName: DocumentName
    • SKUDescription: DocumentSKUDescription
    • SKUPrice: SKUPrice
    • SKUSiteID: SKUSiteID

Some of the fields are mapped automatically (from the list above and also not from the list above). Check whether these fields are mapped correctly.

  1. To the Import the pages under following parent path or parent node ID field, enter the ={%ParentNodeID%} macro expression.

  2. Leave the WHERE condition field blank, clear the Save the old ID to new ID mappings to file field, and click Next.

    Mapping columns from the source field to the target fields

  3. In Step 7, select Import the data, and click Import data.

    Target data preview

  4. Close the Toolkit.

    Import finished

The system now contains the five products you just added. Open the Products application in the administration interface to see the products assigned to the specified sections.

Imported products in Kentico