You can import and manage catalogCommerce: a top-level container for catalog entries such as categories, products, and variants (SKUs). entries (such as productCommerce: various forms of merchandise that you can display and purchase from the public site, including products, variations/SKUs, bundles, packages and dynamic packages.s, variantCommerce: a variant or SKU corresponds to a specific product with specific characteristics. For example, a product line of shirts has individual variations/SKUs that include size, color, and collar size.s (SKUCommerce: Stock Keeping Unit; corresponds to a purchasable product with specific characteristics. For example, a product line of shirts has individual variations/SKUs for sleeve size, color, and collar size.s), and packageCommerce: a unit that contains multiple products or variants, with a single unique pricing for the entire package; comparable to an individual SKU because the package item must be purchased as a whole (such as a computer system).s) in bulk using an Excel spreadsheet (CSVcomma-separated values; tabular data in a plain text file separated by the comma character. format) as an alternative to manually creating catalog entries, which is tedious when dealing with a large amount of catalog data.
This section explains how to complete these tasks.
- Import .csv spreadsheets to create catalog entries in Commerce Manager.
- Assign catalog items to your category structure.
- Associate an entry with others (for instance, a variant/SKU appears within a product or a package).
- Edit or delete catalog items.
Using the CSV import feature
Follow these steps to import and set up a new catalog.
- Create CSV data files (using an Excel spreadsheet or Notepad, for example) with information about categories, entries, and entry relations following the specification below. See also Sample CSV files.CSV file format
- In the first row, insert headers that correspond to data attributes being imported (for example, product name, price, description, image file location).
- Use the following attributes to identify each item being imported.
- Code. A unique code to identify each category or entry.
- Name. A unique name for each data row.
- Entry Type. (for catalog entries only) In each row, insert one of the following terms to indicate entry type.
- Parent & Child Entry Code (for entry relations only). Specify the relationship between entries (for example, to display product variations). Although, the following attribute is:
- Action. Specify the import action.
You must specify a command for each row of the CSV file.
If you enter Insert for that data already exists, or Update if no data exists, an error occurs during import, and those rows are not imported.
- Category Code (by comma). Specify the entry's category.
- SEO URLCorresponds to simple address in CMS. Depending on the site setup, it may be used instead of the hierarchical URL when links are rendered in outgoing responses. For incoming requests, the site always responds to the SEO URL, regardless of settings.
For more information, see http://world.episerver.com/blogs/Magnus-Rahl/Dates/2013/12/Replace-SEO-URL-generation-in-EPiServer-Commerce-75/.. A unique URLUniform Resource Locator. Also known as a web address such as http://world.episerver.com. for each catalog item.
An error occurs if you import a file that contains more than one occurrence of the same URL.
- Create necessary meta fields for the new catalog entries. See also Creating a catalog meta class.
- For each CSV file, create a mapping file, which links data in the CSV file to Commerce Manager attributes.Mapping file types
Select the type of mapping file you need.
Mapping file type Used to specify Example Category w/ Meta Data Data for categories or subcategories within a catalog CSV File type 1—Category file Entry w/ Meta Data Data for catalog entries (packages, products, variation/SKUs, and bundleCommerce: a collection of variations and SKUs that let customers purchase two or more items at once.s) CSV File Type 2—Entry files Entry Relation Relationships between entries. For example, many SKUs to one product, or several SKUs and products to a package. CSV File Type 3—Entry relations file Entry Association Associations among entries (such as, advertising other items under text like "You may also be interested in...") CSV file type 4—Associations file Variation w/ Inventory Information for the inventory section of the Pricing/Inventory tab. CSV file type 5—Pricing/inventory file Sale Price Information for the pricing section of the Pricing/Inventory tab. CSV file type 6—Sale price file
For each mapping file type, the view displays a different set of fields and attributes. You manually assign attributes to each CSV file data column. Figure 11: Mapping file tab shows an example.
- In Commerce Manager > Catalog Management, choose an existing catalog folder or create a new one to which to import.
- Choose Import/export > CSV Import.
- Drag and drop the CSV files you created in step 1.
- Import the CSV files and their corresponding mapping files.
A categoryCMS: A built-in Episerver property. You apply a category to content, but you need to build the functionality to display the filtered results. Commerce: A grouping of purchasable products. (Same as node.) file specifies data for categories or subcategories within a catalog.
- The top row has column headers that match metadata fields. The headers can also have different names.
- Category Code in column B is important because it specifies where the entry data is stored.
- The code under Parent Code (column C) can be used to create subcategories. If Parent Code is set to null or rootThe parent of all folders in a file system. (Despite being called the root, it is generally found at the top of the structure.), the category is created in a catalog's root level. Figure 1 shows that Infants and Toddlers categories are created at the root level, while the Diapering Supplies category is located under Infants as a subcategory.
Entry files specify data for catalog entries. The Products, Variation/SKUS, and Packages CSV files for this example are shown in Figures 2, 3, and 4.
The entry relations file links one entry to others. In the following example, Var1 through Var5 (different diaper sizes) are associated with Prod1 (Diapers), while Var9 through Var11 (different quantity for wipes) are associated with Prod2 (Wipes), and so on. Some variants are assigned to packages.
The Prod, Var, and Package codes must be the codes from the entry CSV files (Figures 2, 3, and 4). If you include codes not defined in the entry CSV files, an error occurs when they are imported into Commerce Manager.
The associations file creates associations among different entries. In Figure 6, Var10 is associated to Var1 as an accessory, and Var2 to Var1 as a cross-sell item.
The pricing/inventory file specifies information for each entry's Pricing/Inventory tab.
The sale price file specifies information for the pricing section of the Pricing/Inventory page.
Example: Importing and setting up a new catalog
The following example shows how to use CSV import using the guidelines. Create a new catalog called Baby Stuff in the Catalog Management system.
Step 1: Create CSV files containing data for new entries
This example uses these files.
Step 2: Create meta fields for new catalog entries
The example files use default attributes only, so you do not need to create additional meta fields. If you want to create new meta fields, follow these steps. See also Catalog meta-classes and meta-fields.
- Commerce Manager > Administration > Catalog System > Meta Classes.
- Select Create New > New Meta Class.
- Enter a Name, Friendly Name (for example, Baby Catalog), and a description (optional) for the meta-class.
- For Object Type, choose Catalog Entry.
- Click OK.
- Select Create New > New Meta Field.
- Enter in a Name, Friendly Name (for example, Baby Diaper Size), and an optional description.
- Choose the data type and other properties by selecting check boxes.
- Click OK to save.
- Repeat for all fields.
- Associate the new meta fields with the meta-class you created.
- From the left navigation frame, click the Meta Classes node.
- For Element , select Catalog Entry.
- Under Type, choose the meta-class (for example, Baby Catalog) you created earlier.
- Select desired meta fields from the list at the bottom of the screen.
- Click OK to save.
Step 3: Upload CSV data files to CSV import page
- Click Catalog Management > Catalogs. The Catalog List view appears in the main area.
- Above the main view, select Import/Export and CSV Import Catalog. The CSV Import Catalog page appears.
- On the CSV Import tab, drag and drop a file to import from the source location. The uploaded file is added to the Files available for import list.
- Repeat step 3 for each CSV file you want to upload.
Step 4: Create a mapping file for each CSV file
- In the main view, select the Mapping file tab.
- Complete the fields as follows.
- Edit existing mapping file section
- Load mapping file. Retrieves previously created and saved mapping files. Because this example has no existing mapping file, leave this section blank.
- Meta Class, Language section
- Mapping Type. Select Category w/ Meta Data.
- For CSV Entry files, select Entry w/ Meta Data.
- For CSV Entry Relations file, select Entry Relation.
- For CSV Associations file, select Entry Association.
- For CSV Pricing/Inventory file, select Variation w/ Inventory.
- For CSV Sale Pricing file, select Sale Price.
- Meta Class. Select Default Catalog Node.
- Language. Select the language version you want to update. To update the status of a non-master language version, map the Is Available field with that status. You can also update the Available from and Expires on fields with the Start Publish and Stop Publish times, respectively.
- Mapping Type. Select Category w/ Meta Data.
- Data file and CSV adjustment section
- Data File. The drop-down values are based on the CSV data files you uploaded on the CSV Import tab in step 2. For this example, select BabyStuffCategory.csv. Leave the remaining fields alone and move to the next section.
- Delimiter. Select the default value.
- Text Qualifier: Select the default value.
- Encoding. Select the default value.
- Fields and Attributes, Column headers in the data file, and Custom values section
Items under Fields and Attributes with superscripts 1 and 2 are required attributes in the CSV files being imported (1—required for Insert, 2—required for Update).
Values in the Fields and Attributes column are representative of the Meta Class selected in the MetaClass, Language section (which was previously imported or created in Commerce Manager).
Values in the Column headers in the data file column's drop-down menus are representative of the Data file selected in the Data file and CSV adjustment section (which was previously imported).
- Select an appropriate Column header drop-down value to map with the meta-class Fields and Attributes to the left. The selected value appears in the Custom values column.
- Save mapping file section
- Enter file name. For this example, save the mapping files using the same CSV file names.
- Edit existing mapping file section
- Click Save. The browser redisplays the CSV Import tab, and the mapping file is added to the list in the Choose mapping file section.
- Repeat steps for each CSV file you want to import.
When all mapping files are saved, the CSV Import view should look like Figure 12.
Step 5. Import CSV files and corresponding mapping files to a catalog
At the CSV Import tab view (Figure 12), do the following:
- In the Files available for import section, select and highlight the CSV file you want to import. For this example, select BabyStuffCategories.csv.
- In the Choose mapping file for import section, select and highlight the mapping file that corresponds to that CSV file. For this example, select BabyStuffCategories.xml.
- From the Catalog drop-down, select the catalog into which you want to import CSV data. In this example, choose Baby Stuff.
- Click Start import. The Importing catalog dialog box shows completion percentage and logging messages.
- Click Close Window.
- Repeat the steps to import all the remaining CSV and Mapping pairs.
Step 6. Verify import
In the Catalog Management system, expand Catalog > Baby Stuff and verify that the CSV file's content was imported into the appropriate catalog.