Loading...
Loading...
Add or modify Commerce and external event subscriptions, configure event field extraction and filter rules in an Adobe Commerce app. Use when the user wants to set up event-driven workflows triggered by Commerce operations (such as order placement or catalog changes) or third-party systems. Requires a base app initialized with commerce-app-init.
npx skill4agent add adobe/skills commerce-app-eventingapp.commerce.config.tsapp.commerce.config.tssrc/commerce-extensibility-1/node_modules@adobe/aio-commerce-lib-appapp.commerce.config.tscommerce-app-initsrc/commerce-extensibility-1/node_modulesnpx @adobe/aio-commerce-lib-app initwebpack-config.cjstsconfig.jsoninitcommerce-app-initCloudIntegrationSDKcommerceeventingaio console workspace api list --projectName <project> --workspaceName <workspace> --jsonaio console workspace api addaio console workspace api add \
--projectName <project> \
--workspaceName <workspace> \
--service-code <existing-codes>,CloudIntegrationSDK,commerceeventing \
--jsoncommerceeventing--license-config commerceeventing=<profile>eventing.commerceplugin.<segments>observer.<segments>eventing.external[\w\-_.]+<package>/<action>env| Field | Constraint |
|---|---|
| Commerce event name | Starts with |
| External event name | |
| Provider label | Max 100 chars |
| Provider description | Max 255 chars |
| Provider key | Optional; alphanumeric + hyphens only; max 50 chars |
| Event label | Max 100 chars |
| Event description | Max 255 chars |
| Field name | |
| Rule operator | |
| Runtime action | |
| Event env (optional) | Non-empty array of |
app.commerce.config.tseventing.commerceeventing.externaleventingeventing: {
commerce: [{
provider: { label: "Commerce Events Provider", description: "..." },
events: [{
name: "plugin.order_placed", // plugin.<segments> or observer.<segments>
label: "Order Placed",
description: "Triggered when a customer places an order.",
fields: [{ name: "order_id" }], // empty array = full payload; Commerce events only
runtimeActions: ["my-package/handle-order-placed"], // <package>/<action>
}],
}],
}runtimeActionssrc/actions/app.config.yamlsrc/commerce-extensibility-1/ext.config.yamlapp-managementapp-management# src/commerce-extensibility-1/ext.config.yaml
# (add below the auto-generated app-management package)
runtimeManifest:
packages:
app-management:
# ... auto-generated — do not edit
my-app: # your package name — any name except "app-management"
actions:
handle-order-placed:
function: actions/handle-order-placed/index.js # relative to src/commerce-extensibility-1/
web: "no"
runtime: nodejs:24
annotations:
require-adobe-auth: false<package>/<action>runtimeActionsmy-app/handle-order-placedmy-apphandle-order-placedparams.data// src/commerce-extensibility-1/actions/handle-order-placed/index.ts
export async function main(params: Record<string, unknown>) {
const data = params.data as Record<string, unknown>;
// data contains the fields declared in the event's `fields` array
// (or the full payload if fields is empty)
const orderId = data["order_id"];
// process the event ...
return { statusCode: 200, body: { processed: true } };
}aio app buildfieldsfieldsruntimeActions<package>/<action>app-managementext.config.yamlsrc/commerce-extensibility-1/src/...actions/handle-order-placed/index.jssrc/commerce-extensibility-1/actions/handle-order-placed/index.jsdefineConfig@adobe/aio-commerce-lib-appdefineConfig@adobe/aio-commerce-lib-app/configruntimeActionssrc/commerce-extensibility-1/actions/aio app buildaio app buildcommerce-app-webhookscommerce-app-business-configcommerce-app-admin-uicommerce-app-storage