Documentation Home

Broadleaf Import

This module provides the ability to bulk import data into Broadleaf. This currently supports the following bulk import use cases:

  • Catalog data (Products, Skus, Categories)
  • Assets (.zip file of media items)
  • Import via an API
  • Flexibility to bulk import other non-Broadleaf-specific entities

The Broadleaf import tool is also extensible to support bulk imports for your own custom entities.

Installation

Add the following to the dependency management section of your admin pom.xml:

<dependency>
    <groupId>com.broadleafcommerce</groupId>
    <artifactId>broadleaf-import</artifactId>
</dependency>

Version Compatibility

Import Version Broadleaf Core Version
1.5.0-M1 4.1.3-GA+
2.0.0-M4 5.0.3-GA+
2.1.0-SNAPSHOT 5.1.0-GA+

Add Tables

The following are MySQL table creation scripts in order to hold data about currently running imports:

CREATE TABLE `blc_import_status` (
  `IMPORT_STATUS_ID` bigint(20) NOT NULL,
  `CEILING_CLASS` varchar(255) NOT NULL,
  `CREATE_DATE` datetime DEFAULT NULL,
  `PROCESSED_RECORDS` int(11) DEFAULT NULL,
  `RESOURCE_URL` varchar(255) DEFAULT NULL,
  `SPECIFICATION` varchar(255) DEFAULT NULL,
  `STATUS` varchar(255) DEFAULT NULL,
  `TOTAL_RECORDS` int(11) DEFAULT NULL,
  `UPDATE_DATE` datetime DEFAULT NULL,
  PRIMARY KEY (`IMPORT_STATUS_ID`)
) ENGINE=InnoDB;
CREATE TABLE `blc_import_status_detail` (
  `IMPORT_STATUS_DETAIL_ID` bigint(20) NOT NULL,
  `DESCRIPTION` varchar(255) NOT NULL,
  `DETAIL_TYPE` varchar(255) DEFAULT NULL,
  `RECORD_NUM` int(11) DEFAULT NULL,
  `IMPORT_STATUS_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`IMPORT_STATUS_DETAIL_ID`),
  KEY `FK7D680D6A6ED0A770` (`IMPORT_STATUS_ID`),
  CONSTRAINT `FK7D680D6A6ED0A770` FOREIGN KEY (`IMPORT_STATUS_ID`) REFERENCES `blc_import_status` (`IMPORT_STATUS_ID`)
) ENGINE=InnoDB;

If you are running a Multi-Tenant installation, you will also need the following import to add site-discrimination:

ALTER TABLE `blc_import_status` ADD COLUMN `SITE_DISC` bigint(20) DEFAULT NULL;
ALTER TABLE `blc_import_status_detail` ADD COLUMN `SITE_DISC` bigint(20) DEFAULT NULL;