Importing and exporting a catalog
You can import a productCommerce: various forms of merchandise that you can display and purchase from the public site, including products, variations/SKUs, bundles, and packages. Also known as a catalog entry. catalogCommerce: a top-level container for catalog entries such as categories, products, and variants (SKUs). from an external system into Optimizely Commerce. You can also export a catalog.
When to import or export
When setting up an e-commerce site, you need to get the products into the system. You may also need to import a product catalog as new items are added to an external system's catalog. Or, you might want to move or copy catalogs between websites.
While you can manually create a catalog and add catalog entries, that option is less useful with a large catalog. Instead, use one of the import or export methods to efficiently move products into and out of a catalog.
Import and export methods
- Import/Export feature. Export a product catalog or import a .zip file into Optimizely Commerce.
- CSV Import. Manage a product catalog in bulk using the Import via CSV files, which uses an Excel spreadsheet saved as a .csv file. Before the import or export, the product types are mapped to the catalog structure and format. You can use the CSVStands for "comma-separated values"; tabular data in a plain text file separated by the comma character. import feature for your entire catalog, or just portions of it.
Depending on the import or export setup, you may need to manually edit the information for imported products (such as adding images, documents, and associations) and their variations to complete the task.
Importing or exporting catalog data via a .zip file
The Import/Export feature imports .zip files exported from Commerce ManagerOne of several main user interfaces in Optimizely Commerce. This UI area, available from the top menu after logging in, provides screens for managing markets, customers, catalog, orders, and so on. You can manage the information on some Commerce Manager screens in other, newer user interfaces. Where possible, we recommend using the newer ones.. It is a quick way to import catalogs from other websites and start with a base for expanding a catalog.
Importing a catalog
- Go to Commerce Manager > Catalog management page.
- Select Import/Export > Import Catalog.
- Drag and drop the catalog file from the source location. The uploaded files appear in the import list.
- Click Start Import. A progress window shows the status.
- When the import is complete, close the progress window.
Exporting a catalog
- Go to Commerce Manager > Catalog management page.
- All catalog nodes appear. Select the appropriate ones.
- Select Import/Export > Export Catalog. The Export Catalog screen appears.
- Export catalog items in the following ways.
- To export everything in the catalog node, click Start Export. A progress window shows the export status. When the export is complete, close the window.
- Click Download to copy the exported catalog file to your computer.
Importing a catalog using CSV files
You can import and manage catalogCommerce: a top-level container for catalog entries such as categories, products, and variants (SKUs). entries in bulk using an Excel spreadsheet (CSVStands for "comma-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 (such as 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.
- Product
- Variation
- PackageCommerce: a sellable unit that contains variants and/or other packages, with a single price; similar to an SKU because it must be purchased as a whole (such as a computer system).
- BundleCommerce: a collection of packages, products, and variants (SKUs) that let customers purchase two or more items at once. Each item in a bundle is a separate line item in a shopping cart.
- Parent & Child Entry Code (for entry relations only). Specify the relationship between entries (for example, to display product variations). For example, you want to relate a variant to a product. In this case, the parent entry code is the product's code, and the child entry code is the variant's code.
For an example of using this attribute, see CSV File Type 3 — Entry relations file.
You can also use the Category Code attribute to create a hierarchy in your catalog.
- Action. Specify the import action. See also: Managing content versions during import.
- Insert
- Update
- Delete
You must specify a command for each row of the CSV file.
If you enter Insert for data that 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.optimizely.com/blogs/Magnus-Rahl/Dates/2013/12/Replace-SEO-URL-generation-in-EPiServer-Commerce-75/.. A unique URLStands for "Uniform Resource Locator". Also known as a web address such as http://world.optimizely.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.
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, variant/SKUs, and bundlesCommerce: a collection of packages, products, and variants (SKUs) that let customers purchase two or more items at once. Each item in a bundle is a separate line item in a shopping cart.) 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 Variant w/ Inventory Information for the Inventory tab. CSV file type 5 — Pricing/inventory file Sale Price Information for the Pricing 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.
- 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.
Sample CSV files
CSV File type 1 — Category file
A categoryCMS: A built-in Optimizely 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.
CSV File Type 2 — Entry files
Entry files specify data for catalog entries. The Products, Variant/SKUs, and Packages CSV files for this example are shown in Figures 2, 3, and 4.
CSV File Type 3 — Entry relations file
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.
CSV file type 4 — Associations file
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.
CSV file type 5 — Pricing/inventory file
The pricing/inventory file specifies information for each entry's Pricing/Inventory tab.
CSV file type 6 — Sale price file
The sale price file specifies information for the pricing section of the Pricing/Inventory page.
Managing content versions during import
When importing a catalog entry or variant
- If you import via the Service APIStands for "application programming interface". The API specifies how some software components should interact with each other, such as accessing a database or computer hardware, or easing the work of programming graphical user interface components. APIs often are in the form of a library that includes specifications for routines, data structures, object classes, and variables. See also: https://world.optimizely.com/documentation/class-libraries/, you can work with published or draft versions. See Catalog.
- If you import via the XMLStands for "extensible markup language"; an open international standard for structuring and transfering data between systems. or CSVStands for "comma-separated values"; tabular data in a plain text file separated by the comma character. format, use the XML input file's IsActive attribute to control the status (Draft or Published) of the imported item. During the import process, choose either insert or update to begin the process.
- Insert. Control the new version's status via the IsActive field.
- If IsActive=True, the new version's status is Published.
- If IsActive=False, the new version's status is Draft.
- Update. Overwrite the current version with data from the input file. Use the IsActive field to determine the new version's status.
- If the catalog has a published version and IsActive=False, the published version is deleted, and the new version's status is Draft. All other versions are kept as they were before the import.
- If the catalog has a draft version and IsActive=True, a new published version is created. All other versions are kept as they were before the import.
-
For all other cases, the existing published or primary draft version is overwritten by the version in the XML/CSV file, and all other versions are kept as before. In these cases, the value of IsActive determines the status of the imported entries.
- If IsActive=True, the new version's status is Published.
- If IsActive=False, the new version's status is Draft.
Exporting Optimizely Commerce catalog data to Optimizely Campaign
You can set up a periodic transfer of the latest product data from Optimizely Commerce to Optimizely Campaign. (For more information, see Commerce-Campaign integration.)
In Optimizely Campaign, the Optimizely Commerce product data is used in a Content Interface Paragraph. The data can be rendered dynamically based on personal recommendations, or as a static product recommendation rendered for all recipients who get the paragraph in their message. See also: Content interface paragraph.