Unzip Channel

The standard hot folders flow is defined in hot-folder-spring.xml in the acceleratorservices extension. This flow defines the steps required to read a CSV file, convert it into ImpEx and execute that ImpEx. You can influence this flow by defining converters and transformation tasks. The standard hot folder flow scans for and incorporates these custom components when the hybris server starts. The ZIP flow is defined in the hot-folder-zip-mapping.xml in the cloudhotfolder extension.

Cloud Hot Folders define a new flow that is able to process multiple files contained in a ZIP file. This new flow is based on the standard flow. User-defined components are scanned in the same way. The new flow is responsible for unpacking the ZIP file, processing each file in the appropriate order, and cleaning up afterwards.

The Azure Inbound Adapter has a predefined mapping that delivers all ZIP files uploaded to the Blob store to the flow. Using a ZIP archive in this way has several benefits. The ZIP file acts as a 'container' that describes a complete import operation. This allows you to organize your import into a number of files and include supporting files such as media and script. Commerce Cloud can clean up after the import is complete.

The classes and methods that support the Unzip Channel are depicted in the following image.

Import CSV Files

To import CSV files, include them in the root of the ZIP file.

Upload Raw Impex

To import raw Impex, include it in the root of the ZIP file. Relative file references are supported within the ImpEx, as long as you use a suitable folder structure inside the ZIP file.

Import Core and Sample Data

To import core and sample data, add the files to the ZIP archive using the conventions and rules for core and sample data. The ZIP file name must match the pattern <coredata.*> for core data and <sampledata.*> for sample data. Inside the ZIP, the data files should be in a folder called import/coredata for core data and import/sampledata for sample data.

The following properties are available to customize the behaviour of the ZIP flow in <HYBRIS_BIN_DIR>/ext-cloud/cloudhotfolder/project.properties.

Property Default Value Explanation
cloud.hotfolder.default.zip.header.catalog electronicsProductCatalog The catalog to use for CSV imports
cloud.hotfolder.default.zip.header.net false True to set net pricing when importing CSV data; otherwise set to false.
cloud.hotfolder.default.zip.mapping.product.catalog electronics The product catalogs to use for core/sample data imports.
cloud.hotfolder.default.zip.mapping.content.catalogs electronics The content catalogs to use for core/sample data imports.
cloud.hotfolder.default.zip.mapping.store.names electronics The stores to use for core/sample data imports.

Import Media

Standard hot folders come with a number of converters that import media files, such as images, and associate them with a product. The media files are added to an images folder within the hot folder and a media.csv file is uploaded. This file contains the names of the media files and the ID of the associated product. To learn more, see the Media Feed section in Data Importing.

Cloud Hot Folders reuse these converters to support media imports from Azure Blob storage. The difference is that the media files and a media.csv file must be contained within a ZIP archive with the same directory layout as standard hot folders. Cloud hot folders can also use URLs to media hosted in third-party systems. If media files are imported using a ZIP archive, then the system loads the media to its media store. In this case, the system is responsible for serving the media when required. If URLs are used, then the system holds a reference to the remote files and the third-party system is responsible for serving the media.

For instructions on importing media, see Importing Media Files Using Unzip Channels or Importing Media References Using URLs.