Integrating with Adobe Experience Manager

SAP Commerce Cloud can easily integrate with Adobe Experience Manager (AEM). This allows you to connect the SAP Commerce Cloud solution responsible for controlling product data, shopping carts, checkout and order fulfillment, while AEM controls the data display and marketing campaigns.

The implementation provided out-of-the-box can be extended to include the search functionality.

Installation Overview

You need to install both SAP Commerce Cloud and Adobe Experience Manager before you proceed with integration.

Installing SAP Commerce Cloud

  1. First extract the latest artifact into your destination directory. For the purpose of this example, name it <DIR>.
  2. Next, set your working directory to the <DIR> /hybris/bin/platform and run the following commands.
    . ./setantenv.sh
    ant clean
  3. At this point, all config files should be generated and present in the <DIR> /hybris/config directory.
  4. The sample below shows the minimal extension set required for our integration. However, the real set will depend on the specific needs of customers using this integration in their environments.
    <hybrisconfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="resources/schemas/extensions.xsd">
    	<extensions>
    		<!-- 
    				All extensions located in ${HYBRIS_BIN_DIR}/platform/ext are automatically loaded. 
    				More information about how to configure available extensions can be found here: https://help.sap.com/viewer/DRAFT/b490bb4e85bc42a7aa09d513d0bcb18e/1905/en-US/8bbf0b9d866910149688b8d696c8d47e.html
    		-->
    				
    		<path dir="${HYBRIS_BIN_DIR}" />
    										
    		<!-- ext-platform -->
    		<extension name="productcockpit" />
    		<extension name="yacceleratorstorefront" />
    		<extension name="yacceleratorinitialdata" />
    		<extension name="electronicsstore" />
    		<extension name="sampledata" />
    		<extension name="ycommercewebservices" />
    	</extensions>
    </hybrisconfig>
  5. Now, save this content to the localextensions.xml in the <DIR> /hybris/config directory.
  6. By default, the platform uses HSQL for storing the data. In order to have better performance, especially on large catalogs, the MySQL database on the development server is recommended. To use mySQL, you have to provide MySQL server configuration in the local.properties file in the DIR /hybris/config directory.
    db.url=jdbc:mysql://localhost/<database_name>?useConfigs=maxPerformance&characterEncoding=utf8
    db.driver=com.mysql.jdbc.Driver
    
    # DB PASSWORD SHOULD BE CHANGED TO MATCH YOUR MYSQL INSTALLATION
    db.username=<username>
    db.password=<password>
    db.tableprefix=
    mysql.optional.tabledefs=CHARSET=utf8 COLLATE=utf8_bin
    mysql.tabletype=InnoDB
  7. In order to enable Express Update functionality you have to declare for which catalog version it should be available. In case of the example below, only products from the Online catalog version can be added to the Express Update queue.
    expressUpdateCatalogVersion=Online
  8. When the configuration is ready, you can build and initialize the platform.
    ant all initialize

Boosting Performance

If your development server has more that one core, you can set extra options to speed up the initialization process, as well as importing and synchronizing catalogs later on.

# OPTIMIZATION
# WARNING! - number of impex.import and catalog.sync workers could have maximum value equal number of cores
impex.import.workers=8
catalog.sync.workers=8
build.parallel=true

You can also customize cache settings with help of the following options.

cache.main=120000
regioncache.entityregion.size=120000

Adobe AEM

  1. Download the latest build of CQ5, for example cq-quickstart-5.6.1.jar
  2. Rename the file to cq5-author-p4502.jar and run it with custom parameters:
    java -XX:MaxPermSize=280M -Xmx1100M -jar cq5-author-p4502.jar
  3. During the first run all packages should be installed, the process can take a few minutes. When the server is ready, you can access it in your browser: http://localhost:4502. You can use default credentials:
    • login: admin

    • password: use the password you defined for your account.

  4. Use Adobe's Package Share to install the latest SAP Commerce Cloud-package builds. The packages you want to install are:
    • cq-hybris-server
    • cq-hybris-content
    • cq-geometrixx-hybris-content

Embedded SAP Commerce Cloud

If you have cq-hybris-server package installed, Platform will start automatically along with AEM. You do not have to do anything more as it is already pre-configured and works out of the box. Keep in mind that embedded solution includes HSQL database which has performance impact.

Standalone SAP Commerce Cloud

If you want to integrate AEM with the standalone SAP Commerce Cloud installation you have to configure URL to the right instance:

  1. Go to http://localhost:4502/system/console/configMgr.
  2. Search for Day CQ Commerce Hybris Connection Handler and click on it.
  3. Now, change Base URL variable in the popup.
  4. You can also change other values if required.
  5. Test integration by importing the catalog from the Platform: http://localhost:4502/etc/importers/hybris.html.