Tuesday, 2 April 2013

AEM and Hybris Integration Example

Hybris Integration:

To have the e-commerce capabilities, you need to install the Adobe Experience Manager and Install the following packages using package manager (These packages are available on Adobe Package Share). AEM  has an e-commerce framework available in it, which is installed when you install the AEM.

  • cq-hybris content ( It has hybris API's implementation)
  • cq-hybris server ( in case you do not have a hybris server)
Hybris Example with AEM :- 

To implement an e-commerce example. Follow the below steps:- 

1. When CQ and Hybris servers are up and running

2. Open siteadmin

3. Open English (US) Geometrixx Outdoors page in Siteadmin      (http://localhost:4502/siteadmin#/content/geometrixx-outdoors/en_US)

4. Open the Men's category page (http://localhost:4502/cf#/content/geometrixx-outdoors/en_US/men.html)

5. Open Jola Summer page (http://localhost:4502/cf#/content/geometrixx-outdoors/en_US/men/shorts/48576.html)

  •  Switch colors (variants)
  • See product name changing
  • See available sizes changing

6. Open the Ashanti Nomad page (http://localhost:4502/cf#/content/geometrixx-outdoors/en_US/men/shirts/3209.html )

7. Switch to the Hybris interface https://localhost:9001/hmc/hybris

  • Login: admin/admin
  • Click Home
  • Login again (same credentials)
  • Click on any link; login again if required
  • Switch to the English interface (top-right)
  • Click Catalog/Catalogs
  • Expand outdoors -> outdoors - Staged -> men -> shirts -> 3209
  • Click on 320984-L
  • Show that it refers to the L variant
  • Click price (top bar), change price (e.g. from $29.50 to $22.00), save (top left)

8. Back to CQ

9. Show Ashanti Nomad again http://localhost:4502/content/geometrixx-outdoors/en_US/men/shirts/3209.html, select L variant with new price

  • Select size variant, click add to cart
  • Click Cart (#) http://localhost:4502/cf#/content/geometrixx-outdoors/en_US/user/cart.html, show cart
  • Click one product link
  • Update a quantity from the cart
  • Delete an item line from the cart

10. Back to Hybris

  • Browse through Marketing -> Order statistics -> Carts
  • In main page, click search
  • In Results section, click Date column header to order by date, check that the latest cart is from the current date
  • Double click the latest cart
  • Show that cart items (and prices) are the same as in CQ cart
  • Change the quantity of an item and save

11. Back to CQ
  • Show new quantity in CQ Cart
  • Checkout
This is an example of implementing cart and a checkout. In a similar manner, a simple cart system can be implemented.

For more information, find http://dev.day.com/docs/en/cq/current/ecommerce/eCommerce-framework.html


  1. hello kanika;
    I really find your blog so interesting;
    I wanna know if did you try to import an other catalog (than outdoors) from hybris beacause I did it with electronicsCatalog; and it import just the product id
    and it doesn't import variant product and prices,
    thanks for your help;

    1. What is the error you are facing?

  2. Yes, I tried and it works fine. Which CQ version are you using and the steps you follow.

    Generally, Product data (prices, descriptions, variations, sizes, etc.) is stored in /etc/commerce/products.

    Catalog structure (section hierarchy, what templates to use, product tags/searches, etc.) is stored in /content/catalogs.

    When a catalog is generated, pages are generated in /content for each section and for each product found in /etc/commerce/products which matches the catalog section tags and/or search.

    This way you can have multiple catalogs (whether base + sale catalogs, regional catalogs, whatever) for the same product set.

    The Procedure :-

    First, in hybris (http://localhost:9001/hmc/hybris/), you have to define a new base store by going to Base Commerce -> Base Store. Then, you have to create a new website associated with this base store by going to WCMS -> Websites. In the base store you configure what catalog to use for products, here you select your catalog. For more info see the wiki page[0] where we describe how we import the geometrixx-outdoors catalog in hybris.

    . After that, you can use the importer again with the new base store & catalog. It will import the product data to /etc/commerce/products// and the images to /content/dam/geometrixx-outdoors/products/import (this can be configured in the OSGi console for the DefaultImportHandler component).

    Then, you have to create a new catalog similar to the hybris-base-catalog but that pulls product info from the new path and roll it out to a new site.

    This should work.

    1. Hi Kanika,

      Thanks for this post. We could integrate CQ with Hybris.
      In the last line, you mention about Rollling out Catalog to new site. Can you please elaborate on this process. I am facing difficulty in rolling out catalog to new site.
      At, /content location, I created a new live copy "New--> New Live Copy " & gave Hybris-base-catalog (/content/catalogs/geometrixx-outdoors/hybris-base-catalog) in "Live Copy From" attribute & en_UK in ''Name' attribute.
      It created a site with name "en_UK" with subnodes, but the template Type for the newly created site is "Catalog BluePrint". Template type for "en" & en_US is "Homepage". also when i double click on the newly created page, I don't see site as expected. I expected new site to be similar to "en_US" or "en" site.
      Am I missing any step? What is the correct step to roll out Catalog to New site?

  3. first of all; thanks for trying this; and for your time;
    I use cq5.5; and hybris4.8.2; that's a link for my screenshots for my tests;

    so I create base store mybasestore then a website mywebsite; then I go to http://localhost:4502/etc/importers/hybris.html
    : and I fill the form it gives me base site(myBaseStore) not found
    so I tried with electronics and it imported but without price and prduct variant;and when I need a price I get it via web service to have it from hybris; but I have some problems in that;
    so I wanna stock prices in cq;

    I dont know why it doesn't work with mybaseStore;
    and did you make a configuration for an hierarchy import; to import the catalog?
    and I didn't understand your last note "you have to create a new catalog similar to the hybris-base-catalog but that pulls product info from the new path and roll it out to a new site."
    thanks for you helps;

  4. hello;
    how do you choose a price if there is multiple prices in a product.

    1. Multiple Prices for a particular product you mean?

    2. yes; but cause when I give multiple price to a product it gives me an error;
      "invalid uri:...."

  5. Hello Marouane,

    I tried to import electronicsProductCatalog from an extern hybris instance. I failed and I wanted to ask you to upload Screenshots from "Day CQ Commerce Hybris Default Import Handler"- and "Day CQ Commerce Hybris Default Response Parser"-Dialog, because I think I made a mistake there. If you did some other changes please post Screenshots too.

    regards Joerg

  6. @Marounae:- I couldn't see the screenshots on that link. Sorry for late reply !

    1. the link gives u the file screenShots.rar to download which contain the screenshots;

  7. Hi,

    Can you please upload the screen shots from OSGi console for hybris package

  8. @ george & galiwala there is no special config to do in osgi to import product just install packages : hybris server.zip, hybris content.zip, and cq commerce content from package share; ok
    give us a screen shot of ur problem; ok

    1. Right, We do not make any configuration changes

  9. Hi again,

    I solved my problem there might be a problem with AEM, adobe support ticket already created. If I get a response that is helpful I will post again.

  10. hi, great post!, but do you know how to do this from scratch?

    i mean, create the hybris catalog, import it in CQ5 and use it with some components

    i cant find any example or guide

    thank you!

  11. Hi,
    Interesting blog. It would be great if you can provide more details about it... Adobe Technical Support please visit the link.

    1. You can raise tickets here: https://helpx.adobe.com/marketing-cloud/contact-support.html

  12. Hi Kanika,

    Thanks for the wonderful post.
    We tried these steps & could successfully import outdoors catalog from CQ out of box hybis server to cq5.
    But when we try to import default "electronicsProductCatalog" catalog from standalone hybris server, we get this error message
    "E Skipping Product due to missing base product Information (code/path) : null"

    We are using cq-hybris-content-5.6.2.zip package from adobe.


  13. Very usefull and synchronized i owe to you.


  14. Thank you good information.EDUWIZZ provides an excellent job opportunity in Hybris Trainingfor JAVA professionals who are seeking for job or looking to change to latest and advanced technologies.

  15. Thank you for your article it's looks good and providing some valuable information by Hybris Training

  16. Thanks grate information.Hybris Training I’ve been surfing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me.

  17. It's looking good article and providing some valuable information.We are providing Hybris Training In Visualpath Technology

  18. Thank you,so thank of this tutorial! Hope you have more the lession like this!AWS Training
    Thank agains!

  19. Thank you,so thank of this tutorial! Hope you have more the lession like this!AWS Training
    Thank agains!

  20. Your blog is so comprehensive...Almost everything at one place...You have that real PASSION...!
    Thanks a ton..!!! DevOps Training


  21. Your posts is really helpful for me.Thanks for your wonderful post. I am very happy to read your post. It is really very helpful for us and I have gathered some important information from this blog. adobe cq5 training in hyderabad

  22. we are offering best hybris online training with job support and high quality training facilities and well experienced faculty . to Register you free demo please visit
    hybris training in hyderabad

  23. I have tried to integrate AEM 6.1 and hybris 6.1 and installed packages from package share. When I try to use importer, am getting error oauth handler 2xx authentication failed. I have provided login details in OSGi.
    Is there any new config to be done???

  24. Kishore- I also have the exact same error 23.02.2017 15:41:48.818 *ERROR* [sling-default-300-default.3247] com.adobe.cq.commerce.hybris.impl.OAuthHandler Server did not respond with 2xx -> authentication failed.

    How did you solve it?

  25. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Adobe Experience Manager
    , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Adobe Experience Manager . We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com

  26. Very useful post, You can learn AEM / Adobe CQ5 by watching videos in below youtube channel Shrinivas AEM Online Training. For Live AEM/Adobe CQ5 Online Training contact us at ibmitsolutions@gmail.com, India : +91-9642373173, USA : +1-845-915-8712

  27. I really appreciate information shared above. It’s of great help. I am very happy to read your post. It is really very helpful for us and I have gathered some important information from this blog.