I followed this guide: https://developer.adobe.com/commerce/extensibility/events/
Events are visible in the event_data table in the Adobe Commerce MySQL database. However, they do not show up in the Developer Console in Debug Tracing or Event Browser (Journaling).
Is there anybody that can help me?
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
how are the events received? if you are receiving into a runtime action and if action is undeployed, not active; then events wont show even at browser.
Correct way to confirm, is just print event into log. Create a simple runtime action with just log statement like this
import { Core } from "@adobe/aio-sdk";
const logger = Core.Logger("main");
// main function that will be executed by Adobe I/O Runtime
function main(params) {
logger.info("Developer is receiving commerce actions");
logger.debug(JSON.stringify(params.data));
}
const _main = main;
export { _main as main };
Deploy this action into your workspace using `aio app deploy`. Configure logger. I linked AIO to my Enterprise Splunk, so can read log statements from my splunk.
Once event is fired at commerce, should show on splunk, and will show on event browser as well.
Views
Replies
Total Likes
Hi sarav_prakash, thank you for your answer.
The event is indeed configured to receive in a runtime action, however the action is not activated. When I invoke the action manually via the CLI, I can see the logs. However when I trigger the event using Adobe Commerce, I don't see any logs at all. So it seems that the event is somehow not received.
Views
Replies
Total Likes
Oh I see. Not sure , coz this is very normal. I am listening to a number of AEM events and havn't seen such problem of event published, but action not listening. worth to raise adobe ticket asking to check the journal queues.
Views
Replies
Total Likes
Thanks. I cannot raise a ticket because this is a sandbox environment. I have sent a mail to our Adobe contact person to find out how to resolve this.
Views
Replies
Total Likes
Hi @JeroenNo,
Could you try the steps described in the Events troubleshooting documentation to troubleshoot the issue you are having?
Let us know if you were able to find and fix the root cause or if you needed further assistance / guidance
Thanks!
Views
Replies
Total Likes
I rojoangel, thanks for your response.
I followed the steps described on the Events troubleshooting documentation:
For the sake of completeness, my app.config.yaml and function actions/notify-add-to-cart/index.js:
application:
runtimeManifest:
packages:
app-builder-sig-presentation:
license: Apache-2.0
actions:
notify-add-to-cart:
function: actions/notify-add-to-cart/index.js
web: 'no'
runtime: nodejs:18
inputs:
LOG_LEVEL: debug
annotations:
require-adobe-auth: false
final: true
events:
registrations:
Commerce Events:
description: Commerce Events Registration
events_of_interest:
- provider_metadata: dx_commerce_events
event_codes:
- com.adobe.commerce.observer.checkout_cart_product_add_after
runtime_action: app-builder-sig-presentation/notify-add-to-cart
/*
* <license header>
*/
/**
* This is a sample action showcasing how to access an external API
*
* Note:
* You might want to disable authentication and authorization checks against Adobe Identity Management System for a generic action. In that case:
* - Remove the require-adobe-auth annotation for this action in the manifest.yml of your application
* - Remove the Authorization header from the array passed in checkMissingRequestInputs
* - The two steps above imply that every client knowing the URL to this deployed action will be able to invoke it without any authentication and authorization checks against Adobe Identity Management System
* - Make sure to validate these changes against your security requirements before deploying the action
*/
const { Core } = require('@adobe/aio-sdk')
// main function that will be executed by Adobe I/O Runtime
const main = async params => {
const logger = Core.Logger('main', { level: params.LOG_LEVEL || 'info' })
logger.info(params)
};
exports.main = main
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies