Home / 

Many companies prefer managing their AEM and third-party e-commerce platform separately, but there may be situations they may require to integrate AEM with a third-party e-commerce platform. One such case may arise when a brand creates an online store using AEM and wants to use their third-party e-commerce system to display a product catalog on their website. In that case, they can retrieve catalog data from a product information management (PIM) system using the flexibility offered by the Commerce Integration Framework (CIF) integration layer in AEM.     

Before examining third-party e-commerce integration with AEM, we must first take a closer look at CIF. 

AEM Commerce Integration Framework 

CIF is a powerful AEM extension that allows seamless integration with e-commerce platforms. It ensures that customers are always offered correct product information at every stage of their journey on the website or other touchpoints.

AEM CIF Integration

CIF enables direct integration with AEM and Adobe Commerce and provides an integration layer for third-party and in-house commerce systems - without needing an extra integration layer or software. This is where Adobe Developer App Builder (Adobe I/O Runtime), or other integration platforms, come into play. Learn more about Adobe I/O Runtime in the next section.  

For all commerce-related data, AEM CIF has adopted Adobe Commerce's GraphQL APIs. You can use these APIs to integrate a third-party commerce platform with the CIF-GraphQL connector and AEM CIF Core Components. However, most third-party commerce or PIM solutions have proprietary APIs and data models. For the integration to succeed, you must map the GraphQL API data to the third-party commerce system.   

The GraphQL mapping layer transforms GraphQL queries into backend requests made to the interconnected commerce system. It maps the backend commerce engine's response data into the commerce GraphQL Schema and returns control to the component making the request. This is completely transparent for the CIF Core Components because the common interface is the GraphQL schema. Currently, most third-party integrations map GraphQL requests to REST API calls. 

Integrating CIF with Third-Party E-commerce Solutions 

You can use three specific approaches to integrate CIF with third-party e-commerce platforms. One strategy that our Adobe experts have found to be extremely useful for many of our clients is to use Adobe I/O Runtime. In other implementations, however, another approach may be necessary, using a customer-supplied interface for the middle layer. The third approach works best if your third-party e-commerce platform allows for custom code.  

Let's look at all three approaches in detail below. 

Approach 1 - Using Adobe I/O Runtime 

AEM CIF, in collaboration with Adobe I/O Runtime, offers tools for developing a GraphQL API mapping layer. In this approach, you use Adobe I/O to construct the API translation layer between the e-commerce backend APIs and the Commerce GraphQL schema.

AEM CIF Integration

GraphQL introspection, which is carried out to the final schema, is constructed in its entirety. The dispatcher action, via so-called local resolvers, provides catalog-related sections of the schema, whereas the cartResolver action (remote resolver) contributes cart-related functionality. The entire schema is combined with the dispatcher action code and delivered to the client. While not displayed, the dispatcher action can store the created GraphQL schema so that it does not have to regenerate for each introspection request.

AEM CIF Integration

The GraphQL reference's next implementation graphic shows how GraphQL query execution works. Again, the cart component of the query is delegated to the cartResolver, while the catalogs-related parts of the query are managed by the dispatcher action's local resolvers. Both local and remote resolvers make backend calls to e-commerce systems and map the responses back into the Commerce GraphQL schema. The dispatcher action combines all JSON replies to create the entire response.

AEM CIF Integration

Approach 2 - Using a Custom Interface in the Middle layer 

You may also use your own infrastructure or a cloud provider to connect your e-commerce platform with CIF. GraphQL and the Commerce GraphQL schema are among some of the most popular ways to move data between AEM/CIF and the third-party e-commerce platform.

AEM CIF Integration

The solution detailed above is quite similar to the one involving Adobe I/O Runtime.The only difference in this approach is that I/O Runtime is replaced with another integration layer, such as ‘MuleSoft’ or ‘Boomi.’ We have used this strategy for some of our clients who were already using one of these or a comparable integration platform. 

Approach 3 - Using Custom Code in Commerce solutions 

When you have proprietary in-house e-commerce solutions or third-party solutions that allow you to execute custom code, the GraphQL API may be used directly by any tools and programming languages.

AEM CIF Integration

This approach is easy to employ as it doesn't require any middle-layer support, which reduces the cost and effort required for middle-layer maintenance. The downside to this approach is that you have to maintain the developed custom code. 

Conclusion  

Although Adobe would prefer that its customers use Adobe Commerce for their product sales needs, it's not always possible. AEM provides CIF specifically to allow integration between AEM and third-party e-commerce platforms. CIF supports GraphQL as its primary way of communicating with external systems. The main drawback of this arrangement is that your integration must map external queries to GraphQL to successfully communicate with AEM via CIF.  

There are multiple ways to implement the GraphQL mapping layer for CIF to integrate AEM with third-party commerce solutions. In our own experience, we usually employ the Adobe I/O approach to integrate third-party e-commerce platforms with AEM. We use Adobe I/O runtime in CIF projects because it's not only the most popular way to integrate third-party e-commerce platforms but is also the most widely supported. Another good reason is that it is available to all AEM clients. CIF with Adobe I/O provides a complete framework for developing and delivering customized apps on Adobe's serverless Adobe I/O Runtime platform, and so far, it has never let us down.