AEM (CQ) eCommerce Framework

Paolo Mottadelli
Paolo MottadelliTechnical Product Marketing at Adobe
Paolo Mottadelli
Adobe Technical Marketing      eCommerce
                               Integration Framework
CQ Gems




   Adobe® Experience Manager

   Adobe® Marketing Cloud
Commerce Integrated Platform

                                       dynamic PIM
                surfer

            1                      4                                      2

            Experience Manager                       PIM/ecommerce

                   JCR repo                          3   product DB


                  content editor                             PIM editor
                                         PIM synch
Commerce Integrated Platform


               surfer


            1. Product display component   1. Product information integrity
            2. Shopping cart               2. Pricing
            3. Promotions and vouchers     3. Stock-keeping inventory
            4. Catalog blueprints          4. Variations on shopping cart
            5. Check-out
            6. Search




                  content editor                          PIM editor
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                              Experience Manager   PIM/ecommerce
8. Client context cart store
                                                           JCR repo          product DB
Architecture of the Commerce Framework



                       AEM Commerce Components


                              AEM Commerce API


                               Implementation
           AEM native impl         hybris impl   other impl

             JCR Repository         hybris DB      other
eCommerce Engine Selection

                Site                                        Component
                                                     CommerceService commerceService =
                                       2           resource.adaptTo(CommerceService.class);

                                                     CommerceSession session =
                                            commerceService.login(slingRequest, slingResponse);

                                           Product baseProduct = resource.adaptTo(Product.class);
                                             3



                                                           OSGi container
                                                  bundle                            bundle
        1
                                                 GeoImpl           bundle         otherImpl
    cq:commerceProvider = geometrixx         (geometrixx)       hybrisImpl           (xyz)
                                                                  (hybris)
CommerceSession


   • addCartEntry(Product product, int quantity);
   • modifyCartEntry(int entryNumber, int quantity);        cart content
   • deleteCartEntry(int entryNumber);



   •updateOrderDetails(Map<String, String> orderDetails);
   •getOrderDetails();                                         pricing
   •submitOrder();



   •updateOrderDetails(Map<String, String> orderDetails);
   •getOrderDetails();                                      order details
   •submitOrder();
CommerceSession is RESTful style (1)
CommerceSession is RESTful style (2)

          Name: CommercePersistence, Host: geometrixx.com, Path: /
          ORDER%3a%3dorderId%253d9c1346bf-3813-4205-80ec-2fdfd1644143%7cCART%3a
       %3dquantity3%253d1%252cquantity0%253d1%252cquantity1%253d1%252cpromotionCoun
         t%253d2%252cquantity2%253d1%252cvoucherCount%253d0%252cpromotion1%253d
           %252fcontent%252fcampaigns%252fgeometrixx-outdoors%252fcosy-up-to-winter
           %252fwinter-female%252fcosy-companions%252cpromotion0%253d%252fcontent
                    %252fcampaigns%252fgeometrixx-outdoors%252fbig-spender
            %252fordervalueover100%252ffree-shipping%252cproduct3%253d%252fcontent
          %252fgeometrixx-outdoors%252fen%252fequipment%252fskiing%252fhalifax-winter
           %252fjcr%253acontent%252fpar%252fproduct%252cproduct0%253d%252fcontent
        %252fgeometrixx-outdoors%252fen%252fwomen%252fcoats%252fcalgary-winter%252fjcr
        %253acontent%252fpar%252fproduct%252f397122-s%252cproduct2%253d%252fcontent
            %252fgeometrixx-outdoors%252fen%252fseasonal%252fwinter%252fequipment
                  %252fkamloops-snow%252fjcr%253acontent%252fpar%252fproduct
            %252f37924450-7%252centryCount%253d4%252cproduct1%253d%252fcontent
          %252fgeometrixx-outdoors%252fen%252fequipment%252fskiing%252fkelowna-snow
                         %252fjcr%253acontent%252fpar%252fproduct%7c
CommerceSession is RESTful style (3)




public class AbstractJcrCommerceSession implements CommerceSession {
    ...
    cartStore = ContextSessionPersistence.getStore(request, "CART", CommerceConstants.COMMERCE_COOKIE_NAME);
    ...
}
Products and Variants architecture:

     1
                                 1                      1           1
         - type: product              - variant         - variant   - variant
         - axes: color, size          - color: purple   - size: S   - size: M
         - id: 397122                 - id: 397122.1
         - title: Saskatoon                             1           1
         - price: 299                                   - variant   - variant
                                                        - size: L   - size: XL

                                 1                      1           1
                                      - variant         - variant   - variant
                                      - color: purple   - size: S   - size: M
                                      -id: 397122.2     1           1
                                      - price: 199
                                                        - variant   - variant
                                                        - size: L   - size: XL
PIM Data & Product References



   1    /etc/commerce/products   2   /content
                   1      1
    1
               1

                   1      1



                   1      1
               1

                   1      1
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;
}
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;
    }
}
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.
session.calcCart()


 protected void calcCart() { ...
     for (int i = 0; i < cart.size(); i++) { ...
       for (Promotion p : promotions) {
          try {
             PromotionHandler ph = p.adaptTo(PromotionHandler.class);
             PriceInfo discount = ph.applyCartEntryPromotion(this, p, entry);
             if (discount != null && discount.getAmount().compareTo(BigDecimal.ZERO) > 0) {
                 ... entry.calcPrices(); ...
             } ...
           cartTotalPrice = cartTotalPrice.add(entry.getPriceInfo(new PriceFilter("POST_TAX", currencyCode)).get(0).getAmount());
         }
         setPrice(new PriceInfo(cartPreTaxPrice, currency), "CART", "PRE_TAX");
         setPrice(new PriceInfo(cartTax, currency), "CART", "TAX");
         setPrice(new PriceInfo(cartTotalPrice, currency), "CART", "POST_TAX");
 ... }
Shopping Cart architecture (Storage)




In AEM-native carts are stored in the
ClientContext

Personalization should always be driven
through the ClientContext.
CommerceSession.addCartEntry()
Checkout architecture
Cart and Order Data

The CommerceSession owns the three elements:

  Cart contents
  Pricing
  The order details

  Cart contents

  The cart contents schema is fixed by the API:

  public void addCartEntry(Product product, int quantity);
  public void modifyCartEntry(int entryNumber, int quantity);
  public void deleteCartEntry(int entryNumber);

  Pricing

  The pricing schema is also fixed by the API:

  public String getCartPreTaxPrice();
  public String getCartTax();
  public String getCartTotalPrice();
  public String getOrderShipping();
  public String getOrderTotalTax();
  public String getOrderTotalPrice();
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)
Hands on
Defining the scope




1. Build a new Commerce Implementation: “training”

2. Apply the new implementation to Geometrixx Outdoors

3. Store the cart data in the repository (/home/users/a/admin/commerce/cart)
adobe.com/go/gems
     @CQDev
1 of 22

Recommended

Evolve13 cq-commerce-framework by
Evolve13 cq-commerce-frameworkEvolve13 cq-commerce-framework
Evolve13 cq-commerce-frameworkPaolo Mottadelli
3.8K views47 slides
Aso115ig by
Aso115igAso115ig
Aso115igMaanasaslide
322 views10 slides
Retail operations solution_ax2012_r2_retailtraining slides _day 4_sme by
Retail operations solution_ax2012_r2_retailtraining slides _day 4_smeRetail operations solution_ax2012_r2_retailtraining slides _day 4_sme
Retail operations solution_ax2012_r2_retailtraining slides _day 4_smePranav Gupta
3K views175 slides
Dual Units Of Measure, Use, Benefits and Impact in Oracle application by
Dual Units Of Measure, Use, Benefits and Impact in Oracle applicationDual Units Of Measure, Use, Benefits and Impact in Oracle application
Dual Units Of Measure, Use, Benefits and Impact in Oracle applicationiWare Logic Technologies Pvt. Ltd.
8.9K views40 slides
Database concepts by
Database conceptsDatabase concepts
Database conceptsFraboni Ec
1K views46 slides
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli by
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo MottadelliEVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo MottadelliEvolve The Adobe Digital Marketing Community
1.1K views47 slides

More Related Content

Similar to AEM (CQ) eCommerce Framework

Real-Time Personalized Customer Experiences at Bonobos (RET203) - AWS re:Inve... by
Real-Time Personalized Customer Experiences at Bonobos (RET203) - AWS re:Inve...Real-Time Personalized Customer Experiences at Bonobos (RET203) - AWS re:Inve...
Real-Time Personalized Customer Experiences at Bonobos (RET203) - AWS re:Inve...Amazon Web Services
899 views35 slides
Data warehousing by
Data warehousingData warehousing
Data warehousingShifali Goyal
950 views43 slides
APIs for catalogs by
APIs for catalogsAPIs for catalogs
APIs for catalogsX.commerce
845 views38 slides
Relevance trilogy may dream be with you! (dec17) by
Relevance trilogy  may dream be with you! (dec17)Relevance trilogy  may dream be with you! (dec17)
Relevance trilogy may dream be with you! (dec17)Woonsan Ko
1.2K views42 slides
Decoupled Days 2019: Delivering Headless Commerce by
Decoupled Days 2019: Delivering Headless CommerceDecoupled Days 2019: Delivering Headless Commerce
Decoupled Days 2019: Delivering Headless CommerceMatt Glaman
2.3K views80 slides
Developing enterprise ecommerce solutions using hybris by Drazen Nikolic - Be... by
Developing enterprise ecommerce solutions using hybris by Drazen Nikolic - Be...Developing enterprise ecommerce solutions using hybris by Drazen Nikolic - Be...
Developing enterprise ecommerce solutions using hybris by Drazen Nikolic - Be...youngculture
21.2K views47 slides

Similar to AEM (CQ) eCommerce Framework(20)

Real-Time Personalized Customer Experiences at Bonobos (RET203) - AWS re:Inve... by Amazon Web Services
Real-Time Personalized Customer Experiences at Bonobos (RET203) - AWS re:Inve...Real-Time Personalized Customer Experiences at Bonobos (RET203) - AWS re:Inve...
Real-Time Personalized Customer Experiences at Bonobos (RET203) - AWS re:Inve...
APIs for catalogs by X.commerce
APIs for catalogsAPIs for catalogs
APIs for catalogs
X.commerce845 views
Relevance trilogy may dream be with you! (dec17) by Woonsan Ko
Relevance trilogy  may dream be with you! (dec17)Relevance trilogy  may dream be with you! (dec17)
Relevance trilogy may dream be with you! (dec17)
Woonsan Ko1.2K views
Decoupled Days 2019: Delivering Headless Commerce by Matt Glaman
Decoupled Days 2019: Delivering Headless CommerceDecoupled Days 2019: Delivering Headless Commerce
Decoupled Days 2019: Delivering Headless Commerce
Matt Glaman2.3K views
Developing enterprise ecommerce solutions using hybris by Drazen Nikolic - Be... by youngculture
Developing enterprise ecommerce solutions using hybris by Drazen Nikolic - Be...Developing enterprise ecommerce solutions using hybris by Drazen Nikolic - Be...
Developing enterprise ecommerce solutions using hybris by Drazen Nikolic - Be...
youngculture21.2K views
Hexagonal at Scale, with DDD and microservices! - Voxxed Days microservices 2... by Cyrille Martraire
Hexagonal at Scale, with DDD and microservices! - Voxxed Days microservices 2...Hexagonal at Scale, with DDD and microservices! - Voxxed Days microservices 2...
Hexagonal at Scale, with DDD and microservices! - Voxxed Days microservices 2...
Cyrille Martraire488 views
Holiday Extras journey to the cloud by Nilan Peiris
Holiday Extras journey to the cloudHoliday Extras journey to the cloud
Holiday Extras journey to the cloud
Nilan Peiris1.2K views
Object Oriented Programming 2 (C#) by Tanveer Ahmed
Object Oriented Programming 2 (C#) Object Oriented Programming 2 (C#)
Object Oriented Programming 2 (C#)
Tanveer Ahmed448 views
Personalized Search on the Largest Flash Sale Site in America by Adrian Trenaman
Personalized Search on the Largest Flash Sale Site in AmericaPersonalized Search on the Largest Flash Sale Site in America
Personalized Search on the Largest Flash Sale Site in America
Adrian Trenaman5.1K views
Google App Engine in 40 minutes (the absolute essentials) by Python Ireland
Google App Engine in 40 minutes (the absolute essentials)Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)
Python Ireland567 views
AmiBroker AFL to DLL Conversion by afl2dll
AmiBroker  AFL to DLL ConversionAmiBroker  AFL to DLL Conversion
AmiBroker AFL to DLL Conversion
afl2dll5.4K views
Presentation bsm wms product control 2014 en by Binh Nguyen
Presentation  bsm wms  product control  2014 enPresentation  bsm wms  product control  2014 en
Presentation bsm wms product control 2014 en
Binh Nguyen1.1K views
Developing enterprise ecommerce solutions using hybris by Drazen Nikolic by youngculture
Developing enterprise ecommerce solutions using hybris by Drazen NikolicDeveloping enterprise ecommerce solutions using hybris by Drazen Nikolic
Developing enterprise ecommerce solutions using hybris by Drazen Nikolic
youngculture12K views
DSL - expressive syntax on top of a clean semantic model by Debasish Ghosh
DSL - expressive syntax on top of a clean semantic modelDSL - expressive syntax on top of a clean semantic model
DSL - expressive syntax on top of a clean semantic model
Debasish Ghosh3.4K views
Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor... by MagentoImagine
Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...
Magento's Imagine eCommerce Conference 2011 - Mash-up of Magento and Salesfor...
MagentoImagine1.4K views
Retail referencearchitecture productcatalog by MongoDB
Retail referencearchitecture productcatalogRetail referencearchitecture productcatalog
Retail referencearchitecture productcatalog
MongoDB3.6K views
Magento's Imagine eCommerce Conference 2011 - Import Export in a Flash with t... by MagentoImagine
Magento's Imagine eCommerce Conference 2011 - Import Export in a Flash with t...Magento's Imagine eCommerce Conference 2011 - Import Export in a Flash with t...
Magento's Imagine eCommerce Conference 2011 - Import Export in a Flash with t...
MagentoImagine1.5K views
Magento Imagine eCommerce Conference 2011: Using Magento's Import Module by varien
Magento Imagine eCommerce Conference 2011: Using Magento's Import ModuleMagento Imagine eCommerce Conference 2011: Using Magento's Import Module
Magento Imagine eCommerce Conference 2011: Using Magento's Import Module
varien826 views
Company segmentation - an approach with R by Casper Crause
Company segmentation - an approach with RCompany segmentation - an approach with R
Company segmentation - an approach with R
Casper Crause28 views

More from Paolo Mottadelli

Open Architecture in the Adobe Marketing Cloud - Summit 2014 by
Open Architecture in the Adobe Marketing Cloud - Summit 2014Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Paolo Mottadelli
6.8K views48 slides
Integrating with Adobe Marketing Cloud - Summit 2014 by
Integrating with Adobe Marketing Cloud - Summit 2014Integrating with Adobe Marketing Cloud - Summit 2014
Integrating with Adobe Marketing Cloud - Summit 2014Paolo Mottadelli
6.4K views40 slides
Adobe AEM Commerce with hybris by
Adobe AEM Commerce with hybrisAdobe AEM Commerce with hybris
Adobe AEM Commerce with hybrisPaolo Mottadelli
8.1K views9 slides
Java standards in WCM by
Java standards in WCMJava standards in WCM
Java standards in WCMPaolo Mottadelli
1.3K views33 slides
JCR and Sling Quick Dive by
JCR and Sling Quick DiveJCR and Sling Quick Dive
JCR and Sling Quick DivePaolo Mottadelli
3.4K views21 slides
Open Development by
Open DevelopmentOpen Development
Open DevelopmentPaolo Mottadelli
949 views43 slides

More from Paolo Mottadelli(11)

Open Architecture in the Adobe Marketing Cloud - Summit 2014 by Paolo Mottadelli
Open Architecture in the Adobe Marketing Cloud - Summit 2014Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014
Paolo Mottadelli6.8K views
Integrating with Adobe Marketing Cloud - Summit 2014 by Paolo Mottadelli
Integrating with Adobe Marketing Cloud - Summit 2014Integrating with Adobe Marketing Cloud - Summit 2014
Integrating with Adobe Marketing Cloud - Summit 2014
Paolo Mottadelli6.4K views
Jira as a Project Management Tool by Paolo Mottadelli
Jira as a Project Management ToolJira as a Project Management Tool
Jira as a Project Management Tool
Paolo Mottadelli71.6K views
Interoperability at Apache Software Foundation by Paolo Mottadelli
Interoperability at Apache Software FoundationInteroperability at Apache Software Foundation
Interoperability at Apache Software Foundation
Paolo Mottadelli2.5K views
Content Analysis with Apache Tika by Paolo Mottadelli
Content Analysis with Apache TikaContent Analysis with Apache Tika
Content Analysis with Apache Tika
Paolo Mottadelli7.7K views
Content analysis for ECM with Apache Tika by Paolo Mottadelli
Content analysis for ECM with Apache TikaContent analysis for ECM with Apache Tika
Content analysis for ECM with Apache Tika
Paolo Mottadelli8.7K views

Recently uploaded

Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueShapeBlue
224 views7 slides
"Node.js Development in 2024: trends and tools", Nikita Galkin by
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin Fwdays
33 views38 slides
NTGapps NTG LowCode Platform by
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform Mustafa Kuğu
437 views30 slides
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...Jasper Oosterveld
35 views49 slides
Optimizing Communication to Optimize Human Behavior - LCBM by
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBMYaman Kumar
38 views49 slides
"Package management in monorepos", Zoltan Kochan by
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan KochanFwdays
34 views18 slides

Recently uploaded(20)

Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue224 views
"Node.js Development in 2024: trends and tools", Nikita Galkin by Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays33 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu437 views
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
Optimizing Communication to Optimize Human Behavior - LCBM by Yaman Kumar
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBM
Yaman Kumar38 views
"Package management in monorepos", Zoltan Kochan by Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays34 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10146 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash162 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue207 views
The Power of Generative AI in Accelerating No Code Adoption.pdf by Saeed Al Dhaheri
The Power of Generative AI in Accelerating No Code Adoption.pdfThe Power of Generative AI in Accelerating No Code Adoption.pdf
The Power of Generative AI in Accelerating No Code Adoption.pdf
Saeed Al Dhaheri39 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty65 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue139 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue196 views
LLMs in Production: Tooling, Process, and Team Structure by Aggregage
LLMs in Production: Tooling, Process, and Team StructureLLMs in Production: Tooling, Process, and Team Structure
LLMs in Production: Tooling, Process, and Team Structure
Aggregage57 views
"Running students' code in isolation. The hard way", Yurii Holiuk by Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays36 views

AEM (CQ) eCommerce Framework

  • 1. Paolo Mottadelli Adobe Technical Marketing eCommerce Integration Framework CQ Gems Adobe® Experience Manager Adobe® Marketing Cloud
  • 2. Commerce Integrated Platform dynamic PIM surfer 1 4 2 Experience Manager PIM/ecommerce JCR repo 3 product DB content editor PIM editor PIM synch
  • 3. Commerce Integrated Platform surfer 1. Product display component 1. Product information integrity 2. Shopping cart 2. Pricing 3. Promotions and vouchers 3. Stock-keeping inventory 4. Catalog blueprints 4. Variations on shopping cart 5. Check-out 6. Search content editor PIM editor
  • 4. 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 Experience Manager PIM/ecommerce 8. Client context cart store JCR repo product DB
  • 5. Architecture of the Commerce Framework AEM Commerce Components AEM Commerce API Implementation AEM native impl hybris impl other impl JCR Repository hybris DB other
  • 6. eCommerce Engine Selection Site Component CommerceService commerceService = 2 resource.adaptTo(CommerceService.class); CommerceSession session = commerceService.login(slingRequest, slingResponse); Product baseProduct = resource.adaptTo(Product.class); 3 OSGi container bundle bundle 1 GeoImpl bundle otherImpl cq:commerceProvider = geometrixx (geometrixx) hybrisImpl (xyz) (hybris)
  • 7. CommerceSession • addCartEntry(Product product, int quantity); • modifyCartEntry(int entryNumber, int quantity); cart content • deleteCartEntry(int entryNumber); •updateOrderDetails(Map<String, String> orderDetails); •getOrderDetails(); pricing •submitOrder(); •updateOrderDetails(Map<String, String> orderDetails); •getOrderDetails(); order details •submitOrder();
  • 9. CommerceSession is RESTful style (2) Name: CommercePersistence, Host: geometrixx.com, Path: / ORDER%3a%3dorderId%253d9c1346bf-3813-4205-80ec-2fdfd1644143%7cCART%3a %3dquantity3%253d1%252cquantity0%253d1%252cquantity1%253d1%252cpromotionCoun t%253d2%252cquantity2%253d1%252cvoucherCount%253d0%252cpromotion1%253d %252fcontent%252fcampaigns%252fgeometrixx-outdoors%252fcosy-up-to-winter %252fwinter-female%252fcosy-companions%252cpromotion0%253d%252fcontent %252fcampaigns%252fgeometrixx-outdoors%252fbig-spender %252fordervalueover100%252ffree-shipping%252cproduct3%253d%252fcontent %252fgeometrixx-outdoors%252fen%252fequipment%252fskiing%252fhalifax-winter %252fjcr%253acontent%252fpar%252fproduct%252cproduct0%253d%252fcontent %252fgeometrixx-outdoors%252fen%252fwomen%252fcoats%252fcalgary-winter%252fjcr %253acontent%252fpar%252fproduct%252f397122-s%252cproduct2%253d%252fcontent %252fgeometrixx-outdoors%252fen%252fseasonal%252fwinter%252fequipment %252fkamloops-snow%252fjcr%253acontent%252fpar%252fproduct %252f37924450-7%252centryCount%253d4%252cproduct1%253d%252fcontent %252fgeometrixx-outdoors%252fen%252fequipment%252fskiing%252fkelowna-snow %252fjcr%253acontent%252fpar%252fproduct%7c
  • 10. CommerceSession is RESTful style (3) public class AbstractJcrCommerceSession implements CommerceSession { ... cartStore = ContextSessionPersistence.getStore(request, "CART", CommerceConstants.COMMERCE_COOKIE_NAME); ... }
  • 11. Products and Variants architecture: 1 1 1 1 - type: product - variant - variant - variant - axes: color, size - color: purple - size: S - size: M - id: 397122 - id: 397122.1 - title: Saskatoon 1 1 - price: 299 - variant - variant - size: L - size: XL 1 1 1 - variant - variant - variant - color: purple - size: S - size: M -id: 397122.2 1 1 - price: 199 - variant - variant - size: L - size: XL
  • 12. PIM Data & Product References 1 /etc/commerce/products 2 /content 1 1 1 1 1 1 1 1 1 1 1
  • 13. 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; }
  • 14. 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; } }
  • 15. 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.
  • 16. session.calcCart() protected void calcCart() { ... for (int i = 0; i < cart.size(); i++) { ... for (Promotion p : promotions) { try { PromotionHandler ph = p.adaptTo(PromotionHandler.class); PriceInfo discount = ph.applyCartEntryPromotion(this, p, entry); if (discount != null && discount.getAmount().compareTo(BigDecimal.ZERO) > 0) { ... entry.calcPrices(); ... } ... cartTotalPrice = cartTotalPrice.add(entry.getPriceInfo(new PriceFilter("POST_TAX", currencyCode)).get(0).getAmount()); } setPrice(new PriceInfo(cartPreTaxPrice, currency), "CART", "PRE_TAX"); setPrice(new PriceInfo(cartTax, currency), "CART", "TAX"); setPrice(new PriceInfo(cartTotalPrice, currency), "CART", "POST_TAX"); ... }
  • 17. Shopping Cart architecture (Storage) In AEM-native carts are stored in the ClientContext Personalization should always be driven through the ClientContext. CommerceSession.addCartEntry()
  • 18. Checkout architecture Cart and Order Data The CommerceSession owns the three elements: Cart contents Pricing The order details Cart contents The cart contents schema is fixed by the API: public void addCartEntry(Product product, int quantity); public void modifyCartEntry(int entryNumber, int quantity); public void deleteCartEntry(int entryNumber); Pricing The pricing schema is also fixed by the API: public String getCartPreTaxPrice(); public String getCartTax(); public String getCartTotalPrice(); public String getOrderShipping(); public String getOrderTotalTax(); public String getOrderTotalPrice();
  • 19. 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)
  • 21. Defining the scope 1. Build a new Commerce Implementation: “training” 2. Apply the new implementation to Geometrixx Outdoors 3. Store the cart data in the repository (/home/users/a/admin/commerce/cart)