Import Products from the CSV File

In the webstore a customer can download the CSV template, fill it in with products which should be imported to a shopping cart, and upload the file. The CSV file can be uploaded by dragging and dropping it to the highlighted placeholder or a customer can click on the placeholder and select the file.

Many users with motor disabilities rely on a keyboard. They can use the Tab key to navigate to the file selection control, and press Enter to open the file explorer where they can select the necessary CSV file.

In the Separator dropdown list, customers should select the separator which is used in their CSV file to separate product data. For example, customers can use coma (,) or semicolon (;) to separate product and product variant IDs, quantity and UOM.

Product Import Validation

The Shopping cart upload content element validates product information that a customer imports from the CSV file. When a customer uploads the CSV file and it contains wrong data, a customer will see the Correct uploading errors pop-up where all the error messages will be shown.

The Shopping cart upload content element can also validate products units of measure and variants that are imported from the CSV file. That is why when a customer uploads the CSV file and it contains wrong units of measure and/or variants of the products, a customer can choose the correct units of measure and/or correct variants for the products in the Correct uploading errors pop-up.

The Pop-up Window Where a Customer Can Select the Correct Units of Measure for Products

A Pop-up Window Where a Customer can Select the Correct Variants for Products

A Pop-up Window with a Message When the Customer Has Configured a Variant ID for Products That Have no Variants

After selecting the correct units of measure and/or variants for the products, a customer can click Upload file to upload the updated CSV file to the shopping cart. If the CSV file contains some other wrong data, it will not be uploaded, instead the error messages will be shown in the Correct uploading errors pop-up.

If a customer clicks on the Add available items to cart button in the Correct uploading errors pop-up, then all products which do not have any errors will be added to the shopping cart.

If a customer clicks on the Download the CSV file button, the downloaded CSV file will contain all error messages shown right next to the invalid product data. This way a customer can check what product data is wrong in the CSV file, fix it and upload it again.

Validating Product CSV Files with Comments

In addition to required product information such as units of measure, variants, quantity, and product numbers, the Shopping cart upload content element also validates shopping cart line comments imported by the customer from the CSV file.

To use the shopping cart line comments functionality, it should be enabled. In Sana Admin click: Setup > Ordering > Shopping cart. Enable the Comment per shopping cart line option for the necessary customer type.

Below are different scenarios that illustrate how the CSV file is validated under various conditions.

Scenario 1

Customer uploads the CSV file without comments when the shopping cart line comments feature is disabled.

In this case, the Shopping cart upload content element will validate the product information. If any errors are found, a user can correct them, then the CSV file will be successfully uploaded.

Scenario 2

Customer uploads the CSV file with comments when the shopping cart line comments feature is disabled.

A pop-up window with a message will be shown informing a customer that the item comments are not supported.

A customer can either download the CSV file or upload it without comments.

If a customer downloads the CSV file, the error message will appear for each product record that contains a comment. This allows a customer to fix the issues and reupload the CSV file.

If a customer chooses to upload the CSV file without comments and there is no wrong product data, then the CSV file will be successfully uploaded to the shopping cart without comments. However, if the CSV file contains some wrong units of measure and/or variants of the products, a customer as usual can choose the correct units of measure and/or correct variants for the products in the Correct uploading errors pop-up.

Scenario 3

Customer uploads the CSV file without comments when the shopping cart line comments feature is enabled.

An error message will appear in the Shopping cart upload content element, notifying a customer that the Comment column is missing from the CSV file. The Comment column is mandatory when the Comment per shopping cart line option is enabled in Sana Admin.

Scenario 4

Customer uploads the CSV file with comments when the shopping cart line comments feature is enabled.

When the Comment column is included in the uploaded CSV file (whether filled or empty), the product data will be validated. If there is any incorrect product data, a customer can then select the correct units of measure and/or correct variants for the products in the Correct uploading errors pop-up, and upload the updated CSV file to the shopping cart.

Once the CSV file with comments is successfully uploaded, the comments will be displayed in both the shopping cart and at checkout.

Comments Displayed in the Shopping Cart

Comments Displayed on the Checkout Page

The maximum character limit for each comment is 900. If any comment in the CSV file exceeds this limit, the Correct uploading errors pop-up will appear in the Shopping cart upload content element, notifying a customer that some comments in the CSV file exceed the 900-character limit.

A customer can either download the CSV file or upload it without comments.

If a customer downloads the CSV file, an error message will appear for each product record with the comment that exceeds the 900-character limit. This allows a customer to correct the comments and reupload the CSV file.

If a customer chooses to upload the CSV file without comments and there is no wrong product data, then the CSV file will be successfully uploaded to the shopping cart without comments.