adaptto() 2019 - cif the modern way to integrate commerce ... · apache sling & friends tech...

29
APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe Experience Cloud Carlos Duque & Francisco Madeira, diconium

Upload: others

Post on 28-May-2020

42 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

APACHE SLING & FRIENDS TECH MEETUP2 - 4 SEPTEMBER 2019

CIF the modern way to integrate commerce engines with Adobe Experience Cloud

Carlos Duque & Francisco Madeira, diconium

Page 2: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

2

Carlos Duque Francisco Madeira

Page 3: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

3

FOUNDED

1995EMPLOYEES

900Locations: Stuttgart | Berlin | Hamburg | Karlsruhe | Bangalore | Detroit | Lisbon | L ondon | Beijing | San Jose | U

Page 4: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

Adobe Experience Cloud

4

▪ Deliver a common API across all Experience Cloud ▪ Easily present commerce

information using Adobe Experience Manager

▪ Currently Available for SAP CX Commerce, Magento and Commerce Tools

I/O Runtime

PIM, OMS, etc.

CRM 3rd PartyAdobe

Platform Services

Adobe Experience Cloud

HEADLESSHYBRIDFULL EXPERIENCE

AEM

Page 5: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

CIF – Commerce Integration Framework

5

“The CIF REST API is the heart of all programmatic interactions with Adobe's commerce integrations.“

▪ Open source ▪ Easily extendable ▪ CIF REST API can:

▪ Retrieve product information ▪ Search and filter products▪ Create omni channel checkout experiences

Page 6: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

Adobe I/O Runtime

6

▪ Serverless▪ Apache OpenWhisk▪ Microservices▪ Auto Scale

Page 7: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

Adobe I/O Runtime

7

▪ Cluster deployed in both the US and Europe for fast performance everywhere

▪ Theoretical infinity number of resources since it’s a serverless platform

▪ Limitations will be present in the commerce platform▪ It provides a caching mechanism for better

performance

Page 8: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

Adobe I/O Runtime - Development

8

▪ Development is done using node.js (other programming languages supported by openwhisk will soon be available)

▪ Developers are focused on the code and not the infrastructure

Page 9: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

Adobe I/O Runtime - Development

9

▪ No local environment▪ Needs a very good unit testing suite – only way to test

before deployment▪ Very good de CI/CD process for easy and fast

deployment

Page 10: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

10

DEMO

Page 11: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

SAP CX Commerce

11

▪ Formerly known as SAP Hybris▪ Commerce Engine▪ Provides out of the box REST interface▪ Categories, Products, Carts, Orders, Users

Page 12: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

diconium/commerce-cif-hybris

12

https://github.com/diconium/commerce-cif-hybris

Page 13: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

diconium/commerce-cif-hybris

13

▪ Available on GitHub▪ Developed in TypeScript▪ Lerna for monorepo, one package for each commerce

entity▪ Build with yarn, webpack and serverless framework▪ Mocha and Chai for building a solid test suit▪ Deployed with circle ci

Page 14: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

diconium/commerce-cif-hybris

14

▪ The first project using the connector is close to production

▪ We’ve found it easier to implement since it was possible to start with the OOB features and extend it from there

▪ A second one it’s on the way

Page 15: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

diconium/commerce-cif-hybris

15

▪ Each endpoint is a sequence of actions:▪ Validation▪ Service Call(s)▪ Web Action Transform

Page 16: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

diconium/commerce-cif-hybris

16

▪ Get Product Serverless declaration:

getProductById:

name: ${self:custom.customer-package}/getProductById

sequence:

- ${self:custom.productsactions}/validateGetProductService

- ${self:custom.products-actions}/getProductService

- ${self:custom.common-actions}/webActionTransformer

annotations:

web-export: true

Page 17: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

diconium/commerce-cif-hybris

17

▪ Get Product action:

function getProductById(input: Input): Promise<Output<Product>> {

return new SimpleAction<Product>(input)

.setMapper(ProductMapper)

.setClient(GetProductByIdClient)

.setErrorType(ERROR_TYPE)

.activate();

}

Page 18: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

18

DEMO

Page 19: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

AEM Advantages

19

▪ Faster time to market▪ Reuse pre built frontend components▪ OOTB product catalog configuration ▪ Less development times▪ Focus on end user experience▪ Works with MPA and SPA

Page 20: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

20

DEMO

Page 21: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

AEM Development

21

▪ Use modern presentation tools like:▪ Web Components▪ React▪ Angular

Page 22: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

AEM Development

22

▪ HTL:<sly data-sly-test="${!properties.productId}">

Choose a product from dialog.

</sly>

<sly data-sly-test="${properties.productId}">

<product-picker-component

data-sly-attribute.data-product-id="${properties.productId}”>

</product-picker-component>

</sly>

Page 23: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

AEM Development

23

▪ Web Component:class ProductModel extends DOMModel {

@byAttrVal('data-product-id') productId;

}

const ProductPickerWebComponent = createCustomElement(

ProductPickerComponent,

ProductModel,

'element',

);

if (!window.customElements.get(ProductPickerWebComponent.elementName)) {

window.customElements.define('product-picker-component',

ProductPickerWebComponent,

);

}

Page 24: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

AEM Development

24

▪ React Component:export const ProductPicker = ({ productId }) => {

const product = useProductGet(productId);

return (

. . .

);

};

Page 25: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

25

DEMO

Page 26: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

Next Steps

26

▪ Open sourcing of a sample project▪ Add support for GraphQL

Page 27: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

27

QUESTIONS?

Page 28: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

Thank You ☺

28

Page 29: adaptTo() 2019 - CIF the modern way to integrate commerce ... · APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 CIF the modern way to integrate commerce engines with Adobe

References

29

▪ https://github.com/diconium/commerce-cif-hybris▪ https://www.adobe.io/apis/experienceplatform/runtime.html▪ https://www.adobe.io/apis/experiencecloud/commerce-integration-framework.html▪ https://medium.com/adobetech/introducing-adobe-i-o-runtime-how-serverless-at-adobe-

will-shape-the-future-of-digital-marketing-56ad60852477▪ https://diconium.com/en/news/adobe-io-hybris▪ https://opensource.adobe.com/commerce-cif-

api/?urls.primaryName=CIF%20Cloud%20API%201.1.2#/▪ https://github.com/adobe/commerce-cif-api▪ http://openwhisk.apache.org/▪ https://www.webcomponents.org/▪ https://github.com/adobe/react-webcomponent