Adding webhooks in Adobe Commerce (formerly Magento 2) using Adobe App Builder involves creating event-driven integrations that trigger actions when specific events occur in the system.
Adobe App Builder enables you to build and deploy custom applications on the Adobe Experience Cloud and integrates with Adobe Commerce through webhooks.
Steps to Add Webhooks in Adobe Commerce using Adobe App Builder:
Set up Adobe App Builder
First, make sure you have access to Adobe App Builder, which is part of the Adobe Developer Console. Follow these steps:
- Log in to Adobe Developer Console.
- Create a new project for Adobe Commerce.
- Add the Adobe I/O Management API to your project. This will allow you to listen to events from Adobe Commerce.
Enable Webhooks in Adobe Commerce
In Adobe Commerce, webhooks can be use to notify external systems of specific events. Here’s how to enable webhooks:
Install and enable required module for Adobe I/O Events
/** install module using composer */ composer require magento/commerce-eventing=^1.0 /** enable modules */ bin/magento module:enable Magento_AdobeCommerceEventsClient Magento_AdobeCommerceEventsGenerator Magento_AdobeIoEventsClient Magento_AdobeCommerceOutOfProcessExtensibility
Generate and install Event Module
bin/magento events:generate:module bin/magento module:enable Magento_AdobeCommerceEvents bin/magento setup:upgrade bin/magento setup:di:compile
Configure Adobe I/O Events in Adobe Commerce
- Go to the Admin Panel of your Adobe Commerce instance.
- Navigate to Stores > Configuration > Services > Adobe I/O Events.
You can get Adobe I/O Workspace Configuration from Adobe App Builder Commerce Project
After download you will get a json file of Adobe I/O Workspace Configuration details which you need to set in configuration field and same configuration.
In the Commerce Events section, you need to set the Merchant ID and Environment ID that you want to use.
Create Event Provider in Adobe Commerce
Run the following command for create an event provider:
bin/magento events:create-event-provider –label “I/O Event Webkul Demo” –description “I/O Event Webkul Demo”
After execute above command you will get following output and get Adobe I/O Event Provider ID
Which you need to set in Adobe I/O Event configuration.
Subscribe Adobe Commerce Event
After register event provider we will subscribe Adobe Commerce events.
For subscribe product save after events will execute following code
bin/magento events:subscribe observer.catalog_product_save_after --fields=sku --fields=stock_data.qty
After execute above command successfully you will get output as following
Follow steps for listen to Adobe Commerce Events
Add Commerce Event In Adobe App Builder Commerce Project
After client next button you will get list of Adobe I/O Event Provider Instance ID. Select your event provider
After client next button you will get list of subscribed events of selected event provider
After click next button you will get authentication service which will use for event
Now you need to add event details
After this you need to add webhooks url where you you get event notification.
As you save configuration details you will get validation url on your webhooks url
Now you need to verify this by open in browser and you will get following response
Now event provider properly configured with Adobe commerce and we will check now.
Make sure cron configured in your Adobe commerce. If you please run following command in Adobe commerce root directory
php bin/magento cron:install
Test the Webhooks Integration
As we subscribed product save after event so when we save product event trigger and event data added in event_data table at same time.
And when you check on Adobe App Builder project event debug tracking section will got following
You will also get notification on your webhooks url
Common Webhooks Use Cases:
- Order Creation: Trigger actions when a new order is place.
- Customer Registration: Notify an external system when a new customer is registere.
- Inventory Updates: Sync inventory levels with external systems.
By following these steps, you can set up and configure webhooks in Adobe Commerce using Adobe App Builder to build event-driven, automated workflows.
For technical assistance, feel free to contact us at [email protected]. Additionally, discover numerous solutions to enhance your online store by visiting the Magento 2 extensions section.
If you need expert advice or want to develop custom functionalities, consider hiring Magento 2 Developers for your project.
Be the first to comment.