Powerful on-site search, navigation, personalisation and merchandising, tailored to the specific needs of leading retailers
With the Fredhopper/SAP Hybris Connector, you can leverage the advanced on-site search, navigation, personalisation, and merchandising capabilities of Fredhopper in your hybris-based online marketplace.
- SAP Hybris 6.x
- Configured Fredhopper instance
The machine on which you are running hybris must be able to reach the Fredhopper instance.
To be able to use the Fredhopper/SAP Hyris connector, you need to build and install the extension locally and configure the export and query logic.
Before you can use the Fredhopper/SAP Hybris connector, you need to build the custom extension locally and add it to hybris.
-
Clone the Fredhopper/SAP Hybris Connector repository to your local machine.
-
Copy
fredhoppersearch
andfredhoppertemplate
to the hybris location for user-defined extensions.
Typically:hybris/bin/custom
-
Generate the extension locally.
- On a command prompt, navigate to
hybris/bin/platform
. - Run
ant extgen
and when prompted, setfredhoppertemplate
as the template.
- On a command prompt, navigate to
-
Open
config/localextensions.xml
and registerfredhoppersearch
and the newly generated extension in the list of extensions.<extensions> ... <extension name="fredhoppersearch" /> <extension name="<generated>" /> </extensions>
-
Open
config/local.properties
and configure the following properties.Property Description Sample Value fh.product.catalog.name
The name of the hybris catalogue to use as the source of your data. apparelProductCatalog
fh.product.catalog.version
The version of the hybris catalogue to use. Online
fh.data.directory
The file path where the index files will be generated before upload. file:/opt/hybris
fh.instance.host
The fully qualified domain name of the Fredhopper host instance. my.eu1.fredhopperservices.com
fh.instance.port
The port number of the Fredhopper instance to which to connect. 443
fh.instance.servername
The specific server name of your Fredhopper instance, as used in the path when publishing data. fas:live1
fh.instance.username
The username to authenticate with Fredhopper. username
fh.instance.password
The password to authenticate with Fredhopper. password
fh.instance.query.url
The Fredhopper URL to query against. Not available fh.instance.universe
The Fredhopper universe to use. catalog01
fh.query.maxretries
Number of retries for any request before returning an error. 3
> **TIP:** For the correct format of the key-value pairs and for sample values, see [fredhoppersearch/project.properties](https://github.com/fredhopper/hybris-connector/blob/master/fredhoppersearch/project.properties).
-
Rebuild hybris.
After you have installed the connector locally, you need to export your data from hybris and load it into Fredhopper.
-
Define your index attributes, using
essentialdata_createExportJobConfig.impex
as an example. For each attribute, you need to define the following:Attribute Meta Data Type Description attributeId
string An identifier for the attribute. baseType
string The Fredhopper basetype. For a list of the valid values, see Understand Fredhopper data types (basetypes). name
string The attribute name. You need to specify it for all required languages. provider
string A Spring bean identifier which acts as the value provider for the attribute. NOTE: You can implement additional value providers if you have requirements that are not addressed by the existing providers.
-
Customize or override
DefaultFhCategoryDao
andDefaultFhProductDao
.
These data access objects are responsible for fetching categories and products, respectively. -
To generate and publish your index to Fredhopper, run
ant all
, update the running system, and trigger the cron jobfredhopperIndexExportJob
. -
Connect to Fredhopper and verify your data has been correctly published.
For more information, see Generating and Publishing Data.
TIP: You can also manage key configuration items from the hybris backoffice. For more information, see Backoffice Management.
After you have loaded your data in Fredhopper, you can configure the way hybris queries Fredhoppers.
- Customize or override the
DocumentSearchResultValuePopulator
class.
The class is responsible at service level for populating theDocumentData.values
attribute. - Run
ant all
, access your front-end, and submit a search request. Your results should be coming from Hybris.
For more information, see Front-End Integration.
This software is licensed under the Apache 2.0 license, quoted here.