The magical world of Adobe App Builder Part II

Author: Florian Sydekum

Herzförmige elektronische Schaltung auf dunklem Hintergrund, symbolisiert den Newsroom der TechDivision.

This article builds on part 1 of the Adobe App Builder blog series. Now it is time to show one of many different use cases of the App Builder step by step.

Part 2: An example of how Adobe Commerce will disappear as a microservice in the cloud

This post builds on Part 1 of the blog series on the Adobe App Builder, in which the explanation and meaning of the App Builder is explained. The aim now is to demonstrate one of the many different use cases of the App Builder step by step. The way there shows how Adobe Commerce can be integrated or integrated as a microservice in a comprehensive system landscape in the long term. Based on the official documentation i show how easily and quickly new functionalities can be built "into" Adobe Commerce without integrating them there in the form of a module.

The system structure

With the latest version of Magento (2.4.6), Adobe Commerce has already integrated modules in the core that enable the simple transfer of any data from the store system to other systems. This is done in the form of events that are sent to Adobe I/O Events, where they are consumed and processed by individual runtime actions of the Adobe I/O Runtime via the App Builder.

(Example I: Overview of the functionality of Adobe I/O Events for Adobe Commerce - Source: Adobe Developer Blog - https://developer.adobe.com/commerce/events/get-started/

The long-term idea is that communication with Adobe Commerce will only take place via the two interfaces REST and/or GraphQL. In addition, the store system independently distributes information to the outside world via events.

Creating an App Builder project

In a new or existing App Builder project, you must first select the corresponding workspace. There, click on Add service > API on the left, then select I/O Management API and then OAuth Server-to-Server. This is the authentication service from Adobe (IMS). This allows external systems to connect to the individual apps/services of the workspaces via OAuth. The workspace configuration must then be downloaded so that it can be configured later in Adobe Commerce. To do this, click the Download all button at workspace level in the top right-hand corner.

(Example II: Workspace view - Source: Adobe App Builder)

Adobe Commerce configuration

In order for the store system to communicate its data to the outside world via events, no adjustments to the code are necessary. As of Magento 2.4.6, the eventing modules are already included in the core; earlier versions can install the latest version of the modules as follows:

composer require magento/commerce-eventing

You can then configure the connection to App Builder in the Store Configuration under Adobe Services > Adobe I/O Events > General Configuration. This should be configured as follows:

  • Adobe I/O Authorization Type: OAuth
  • Adobe I/O Workspace Configuration: The complete content of the workspace JSON file that was downloaded in the App Builder backend must be copied in here
  • Adobe Commerce Instance ID: A descriptive name should be assigned here, which serves as an identifier for this Adobe Commerce instance. The name is later visible in the App Builder as an event provider and it is therefore clear which of the theoretically many event providers it is.

Leave the rest of the configuration empty for the time being and then save it. The store instance must then be registered as an event provider:

bin/magento events:create-event-provider --label "<unique_provider_label>" --description "<provider description>"

Here you assign a descriptive name and a description. The subsequent event provider ID must be saved in the Adobe I/O Event Provider ID field in the Store Configuration. The following must then be configured in the Commerce events group:

  • Enabled: Yes
  • Merchant ID: Name of the shop/customer
  • Environment ID: Identifier for the environment, e.g. dev, stage, prod
Example IV: Adobe Configurator Event Registration - Source: Adobe App Builder)

Finally, select the runtime action you have just created to which the event is to be forwarded. From now on, App Builder receives the configured events. You can also view incoming events in a kind of journal and see their status or feedback from the runtime action. Logs of the runtime action can also be viewed via aio rt logs --watch.

Example V: New Order Magento Local - Source: Adobe App Builder)

Conclusion

The sheer volume of events and data that Adobe Commerce is able to send to other systems offers an enormous advantage on the way to a microservice architecture. The ability to do this via code generation and configuration also makes it incredibly easy. Along the way, Adobe Commerce will increasingly disappear untouched into the cloud and coexist alongside many other services. In the beginning, there may only be a few functions that can be outsourced to App Builder. As soon as the full potential becomes clearer, there may be more and more functions. These can be developed and deployed individually and specifically in the cloud, so that the actual software development of the desired features becomes even more targeted without having to deal with long-lasting Adobe Commerce updates.

Do you have any questions?

Simply fill in the form opposite or send us an e-mail to anfragen (at) techdivision.com or call us on +49 8031 22105-0.

Vereinbaren Sie einen unverbindlichen Beratungstermin zu unseren Leistungen mit uns.