Adobe Experience Manager (AEM) provides a framework to build commerce websites, allowing to manage rich content for experience driven websites, as well as taking care of the specific complexities typically related to the commerce business. The combination of experience and commerce support is possible thanks to a framework oriented architecture that allows AEM to integrate with best of breed commerce platforms as well as with home grown systems. AEM provides an API that can be implemented and extended on the specific project requirements as well as towards the ecommerce backend system of choice. This session will cover the primary elements around extensibility and pluggability of the AEM commerce framework, through some code samples explained. A specific part of this session then will be dedicated to the available approaches to support high volumes of data as well as rich content delivery. The ideal audience of this presentation are developers that are involved in commerce related projects or that are planning to design an architecture for a big commerce website.
5. AEM eCommerce Integration Modules
1. The integration framework (API used for eCommerce implementations)
2. AEM native (JCR) implementation
3. hybris implementation
4. A number of out-of-the-box AEM components
5. Search (AEM, eCommerce, 3rd party)
6. Catalog management
7. Promotions management
8. Client context cart store
JCR repo product DB
Experience Manager PIM/ecommerce
6. Architecture of the Commerce Framework
AEM Commerce API
Implementation
AEM Commerce Components
AEM native impl
JCR Repository
hybris impl
hybris DB
other impl
other
24. Product interface
public interface Product extends Adaptable {
public String getPath(); // path to specific variation
public String getPagePath(); // path to presentation page for all variations
public String getSKU(); // unique ID of specific variation
public String getTitle(); // shortcut to getProperty(TITLE)
public String getDescription(); // shortcut to getProperty(DESCRIPTION)
public String getImageUrl(); // shortcut to getProperty(IMAGE_URL)
public String getThumbnailUrl(); // shortcut to getProperty(THUMBNAIL_URL)
public <T> T getProperty(String name, Class<T> type);
public Iterator<String> getVariantAxes();
public boolean axisIsVariant(String axis);
public Iterator<Product> getVariants(VariantFilter filter) throws CommerceException;
}
25. AxisFilter implements VariantFilter
public class AxisFilter implements VariantFilter {
...
public boolean includes(Product product) {
ValueMap values = product.adaptTo(ValueMap.class);
if(values != null) {
String v = values.get(axis, String.class);
return v != null && v == value;
}
return false;
}
}
26. Product Data admin UI
•Double click from Content Finder to open
•Based on Scaffolding
•Create/Change data in /etc/commerce/products
•Can change destination path from Scaffolding page
•Can navigate and change variants (overrides higher level data)
5.6.1
29. Hardening Product Importer
•ROBUSTNESS: product importer more flexible with products/variants
•EXTENSIBILITY: abstracted-out common parts of product importer
•PERFORMANCE: importing 1000s products takes 80% less
•SCALABILITY: support flat hierarchies through bucketing, proxy pages, scalable search
5.6.1
30. Catalog Generation V2
•Regional Catalog support (based on MSM)
•Catalog Design Changes support
•Custom Catalog Pages support
•Blueprint & Catalog converter for 5.6.0 to current
5.6.1
32. Shopping Cart architecture (CommerceSession)
The CommerceSession performs add, remove, etc.
The CommerceSession also performs the various calculations on the cart.
The CommerceSession also applies vouchers and promotions that have fired to the cart.
Pricing modifiers:
- Quantity discounts.
- Different currencies.
- VAT-liable and VAT-free.
34. Shopping Cart architecture (Storage)
In AEM-native carts are stored in the
ClientContext
Personalization should always be driven
through the ClientContext.
CommerceSession.addCartEntry()
36. Checkout architecture (order details)
Order details are not fixed by the API:
updateOrderDetails(Map<String, String> orderDetails);
Shipping options (and prices) depend on weight, delivery address, etc...
The CommerceSession owns shipping pricing; to retrieve and update delivery details:
updateOrder(Map<String, Object> delta)
38. hybris integration: product data flow
hybris:
Omni Commerce
Connect
CQ:
/etc/commerce/products
CQ:
/content/site
hybris importer catalog publishing
39. hybris integration: product data display
JCR repo
CQ
hybris
CQ hybris importer
CQ component volatile data
PIM data
40. hybris integration: user synchronisation
•Lazy import of hybris users into CQ
•Lazy creation of CQ users in hybris
•CQ stores hybris authentication data for later re-use
•Pluggable architecture for custom authentication schemes (SAML, OAuth)
41. hybris integration: customising the product import process
•Need to add PIM attributes? Extend HybrisResponseParser.
•Need to change the imported data hierarchy? Extend ImportHandler.
•Need to customize what services are called when importing data? Extend HybrisImporter.
42. hybris integration: customising the user import process
•ProfileSynchronizer#syncProfile is responsible for sync the user’s CQ profile to the respective
hybris account
43. hybris integration: customising product and price loading
•HybrisFactory#getProduct is responsible for creating Product instances
•HybrisSession#getProductPriceInfo is responsible for getting the correct price for a product for
the current user
44. hybris integration: how to install
AEM 5.6.1
3
cq-hybris-content 5.6.22
cq-hybris-server 5.6.01
cq-geometrixx-hybris-content 5.6.100
install packages
5.6.1
45. hybris with AEM 5.6.1
•Supports hybris 5.0
•hybris 5.0 server embedded by default
•Backward compatible with hybris 4.8.1
•Geometrixx-specific hybris connector
•Extend the default hybris components to a specific implementation;
•Remove internal references in the hybris components to allow for better extensibility
•hybris connector source code included in the content package
5.6.1