Implementing the Plugin
You can implement the Bloomreach Feed plugin, which works with Elastic Path Catalog Syndication, to send your catalog in the Bloomreach (TSV) Tab Separated Value format.
Before You Begin
Ensure that you are an Elastic Path Catalog Syndication consumer. For more information about catalog syndication, see Catalog Syndication Overview.
Adding the Dependency for the Bloomreach Feed Plugin
In the
ep-commerce/extensions/batch/ext-batch/pom.xml
file, add the following dependency:<dependency> <groupId>com.elasticpath.plugins</groupId> <artifactId>bloomreach-feed</artifactId> <version>1.0.0</version> </dependency> <dependency> <groupId>com.elasticpath</groupId> <artifactId>ep-messaging-camel</artifactId> <version>${dce.version}</version> </dependency> <dependency> <groupId>com.elasticpath</groupId> <artifactId>ep-catalog-projection-spring-data</artifactId> <version>${dce.version}</version> </dependency> <dependency> <groupId>com.elasticpath</groupId> <artifactId>ep-catalog-batch</artifactId> <version>${dce.version}</version> </dependency> ```
In the
ep-commerce/extensions/batch/ext-batch-webapp/src/main/filtered-resources
folder, add a property file with the namebloomreachFeedUploader.properties
.In the
bloomreachFeedUploader.properties
file, add the following properties:outputDirectory
outputFileName
storeLanguage
currency
storeCode
ftp.host
ftp.username
ftp.password
readerPageSize
Note: For more information about the properties, see the Bloomreach Feed Plugin Properties File section.
Edit the
ep-commerce/extensions/batch/ext-batch-webapp/src/main/webapp/WEB-INF/elastic-path-servlet.xml
file, in thecontext
element, add the location of thebloomreachFeedUploader.properties
file to thelocation
attribute. The following example shows an updatedcontext
element:<context:property-placeholder ignore-resource-not-found="true" system-properties-mode="OVERRIDE" location=" classpath*:META-INF/elasticpath/conf/spring/plugin.properties, classpath:module.properties, classpath:bloomreachFeedUploader.properties, file:/etc/ep/ep.properties, file:/ep/conf/ep.properties, file:/ep/conf/ep.batch.properties, file:${user.home}/ep/ep.properties, file:${user.home}/ep/conf/ep.properties, file:${user.home}/ep/conf/ep.batch.properties"/>
Run
mvn clean install
to rebuild the extensions and batch files.Restart the batch service
TSETTINGS
Properties
Defining You can configure the Bloomreach Feed plugin through Commerce Manager using the TSETTINGS
database table.
note
Properties set through TSETTINGS
are taken as priority over any property settings set through the bloomreachFeedUploader.properties
file. If the settings are not set in the TSETTINGS
database or the bloomreachFeedUploader.properties
file, the application with the plugin will fail to start.
Go to the
/ep-commerce/extensions/database/ext-data/src/main/resources/data/rel-1.0-data/importexport/system_configuration.xml
file.Add a new
configuration_setting
entry for each property, such asoutputFileName
.For example:
<configuration_setting> <name_space>COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/outputFileName</name_space> <description>(Optional) The name of the report. The default value is OfferCatalog.</description> <default_value type="String">${ep.bloomreach.outputFileName}</default_value> <max_overrides>1</max_overrides> <setting_metadata> <value key="environmentSpecific">false</value> <value key="apiRefreshStrategy">application</value> </setting_metadata> </configuration_setting>
Go to the
/ep-commerce/extensions/database/ext-data/src/main/resources/environments
folder.For example, if you are working in your local environment, go to
/ep-commerce/extensions/database/ext-data/src/main/resources/environments/local
.Go to the
filtering.properties
file.In the
filtering.properties
file, add a new property key for each setting that you added in thesystem_configuration.xml
file.For example:
ep.bloomreach.outputDirectory=directory_value
Restart Commerce Manager for the new settings to take effect
TSETTINGS
Properties
The following is a list of the available properties that you can update in the TSETTINGS
database.
outputDirectory
The Bloomreach Feed plugin file is placed in this directory before it is sent to the File Transfer Protocol (FTP) server.
TSETTING
path: COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/outputDirectory
outputFileName
(Optional) The name of the report. The default value is OfferCatalog
.
TSETTING
path: COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/outputFileName
storeLanguage
The language of the store.
TSETTING
path: COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/storeLanguage
storeCode
The code of the store.
TSETTING
path: COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/storeCode
currency
The currency of the store.
TSETTING
path: COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/currency
ftp.host
The FTP server host name.
TSETTING
path: COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/ftpHost
ftp.username
The FTP server username.
TSETTING
path: COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/ftpUsername
ftp.password
The FTP server password.
TSETTING
path: COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/ftpPassword
ftp.camel.options
The FTP client configuration options.
TSETTING
path: COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/ftpCamelOptions
outputDirectory.camel.options
The FTP output directory configuration options.
TSETTING
path: COMMERCE/SYSTEM/PLUGIN/BLOOMREACH/outputDirectoryCamelOptions
Bloomreach Feed Plugin Properties File
You can also set the Bloomreach Feed Plugin properties in the bloomreachFeedUploader.properties
.
The bloomreachFeedUploader.properties
file contains the following properties:
outputDirectory
outputFileName
storeLanguage
currency
storeCode
ftp.host
ftp.username
ftp.password
ftp.camel.options
outputDirectory.camel.options
readerPageSize
: (Optional) The number of rows to retrieve at a time. The default value is1000