Extensibility in Adobe Commerce

Adobe Commerce is known for its flexibility and extensibility, allowing businesses to adapt their e-commerce platforms to their unique needs. With the evolving demands of e-commerce, Adobe Commerce offers various methods for extending its capabilities. These methods can be broadly categorized into in-process, out-of-process, and hybrid extensibility. Adobe recommends using the out-of-process extensibility method where possible due to its ease of maintenance.

In-process extensibility

In-process extensibility refers to the method where custom code or extensions run within the same process as the core Adobe Commerce application. This is the traditional and most commonly used approach for extending Adobe Commerce functionalities.

The advantages of this approach include:

The in-process model has some considerations that you must account for:

In addition, Adobe Commerce has some functionality that you should not extend or build out-of-process:

Use cases

Developers have long used in-process extensibility solutions to provide additional functionality, such as the following:

Out-of-process extensibility

With out-of-process extensibility, custom code and extensions run in separate processes, often on different servers or services. This approach is increasingly popular with the rise of microservices and serverless architectures.

The advantages of this approach include:

When choosing out-of-process extensibility, Adobe provides developers with serverless runtime to host their apps, which reduces overhead for developers.

Use cases

The following use cases illustrate ideal candidates for out-of-process extensibility:

Example

A typical task for most e-commerce projects is to export orders from Adobe Commerce system to an external Order Management Systems. With Adobe App Builder, you can build an out-of-process microservice to seamlessly transfer this data. (We will name this service Order Export Service (OES).) This service operates independently of the core Commerce application, ensuring efficient data synchronization and reducing the load on the backend. It can leverage APIs and webhooks to facilitate real-time and batch data export, providing a robust solution for keeping the OMS system up to date with the latest order information.

The following diagram illustrates an out-of-process implementation using this service.

Out of process example

Configure Commerce to trigger webhooks whenever a customer places an order. These webhooks send order data to the OES. You can achieve this with Adobe I/O Events for Adobe Commerce.

The OES running on App Builder has the following characteristics:

The service communicates with the OMS system via its API. It transmits order data to the OMS in real-time, depending on the configuration. The service handles API rate limits and retries in case of network or service disruptions.

Hybrid Extensibility

Hybrid extensibility combines elements of both in-process and out-of-process approaches, leveraging the strengths of each. This method allows for more flexible and resilient extensions while maintaining the performance benefits of in-process code where necessary.

Advantages of this approach include:

Alternatively, management can be more difficult:

Use Cases

The following use cases describe ideal candidates for hybrid extensibility:

Example

Recall the out-of-process extensibility example, where the following processes are carried out.

  1. A webhook sends order information to the App Builder instance.
  2. App Builder transforms the data to meet the OMS requirements.
  3. App Builder sends the data to OMS.

But what if you need to request additional information from Adobe Commerce to complete the order export? For example, you are exporting an order, but the OMS also requires the customer object to be imported before it can accept the order information. In this case, your App Builder application must make an additional call to Commerce to retrieve the customer data. Perhaps the customer object has some custom metadata that is not available via the default GraphQL or REST APIs?

For this use case, you must develop an extension on the Adobe Commerce side that modifies the GraphQL response, performs some custom logic on the Adobe Commerce instance, and delivers the expected results back.

Hybrid example

Conclusion

Adobe Commerce's extensibility options provide robust mechanisms for customizing and enhancing e-commerce platforms. In-process extensibility offers simplicity and performance, making it ideal for direct customizations. Out-of-process extensibility provides isolation and scalability, suitable for complex integrations and intensive tasks. Hybrid extensibility offers the best of both worlds, combining flexibility and resilience.

Choosing the right extensibility method depends on the specific needs of the business, the complexity of the required customizations, and the desired performance and scalability outcomes. By leveraging these extensibility approaches, businesses can create a highly customized and efficient e-commerce platform tailored to their unique requirements.