/commerce-app-management:commerce-app-webhooksfrom commerce-app-management
Adds or modifies webhook interceptors in an Adobe Commerce app config. Intercepts Commerce operations to validate input, append data, or modify behavior before or after execution.
Ships in commerce-app-management. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Adds or modifies webhook interceptors in an existing app.commerce.config.ts.
Webhooks intercept Commerce operations — you can validate input, append data, or modify behavior before or after an operation executes.
Other extensibility domains (events, business config) are added separately via their own skills.
app.commerce.config.ts present in the project root, andsrc/commerce-extensibility-1/ directory and installed node_modules (the @adobe/aio-commerce-lib-app dependency).app.commerce.config.ts is missing, stop and invoke commerce-app-init first (it writes the config, then runs init).src/commerce-extensibility-1/ or node_modules), run npx @adobe/aio-commerce-lib-app init before continuing. Init is idempotent — it finds the existing config, skips the interactive prompts, installs dependencies, and generates the project files.webpack-config.cjs + root tsconfig.json) that init scaffolds for a TypeScript Commerce config — see commerce-app-init. Otherwise, author actions in JavaScript.Ask the user what they want to intercept and how:
webhook_method (the Commerce operation, e.g., plugin.magento.catalog_product.save) and webhook_type (before or after)runtimeAction: "<package>/<action>") or an explicit external URL (webhook.url) — these are mutually exclusivevalidation (block if invalid), append (add data), or modification (alter data) — used for conflict detectionbatch_name groups related hooks; hook_name uniquely identifies this hook within the batchApply the following validation rules before writing. Surface any issues to the user before proceeding.
| Field | Constraint |
|---|---|
batch_name | [a-zA-Z0-9_]+ only — no hyphens, dots, or spaces |
hook_name | [a-zA-Z0-9_]+ only — no hyphens, dots, or spaces |
category | Optional; must be validation, append, or modification |
runtimeAction | <package>/<action> format; mutually exclusive with webhook.url |
webhook.url | Must be a valid absolute URL (https://...); mutually exclusive with runtimeAction |
label | Required, non-empty |
description | Required, non-empty |
webhook_type | Required; must be before or after |
method | Required; must be POST, PUT, DELETE, or GET |
timeout / soft_timeout | Optional; positive integer (milliseconds) |
priority / batch_order | Optional; positive integer |
app.commerce.config.tsAdd entries to the top-level webhooks array (or create it), preserving all other domains. If the config already has a webhooks key, append to it rather than replacing it.
Minimal examples:
// Runtime action handler (handler lives in this app)
webhooks: [
{
label: "Validate Product Save",
description: "Validates product data before saving.",
category: "validation", // optional
runtimeAction: "my-package/validate-product", // <package>/<action>
webhook: {
webhook_method: "plugin.magento.catalog_product.save",
webhook_type: "before",
batch_name: "my_app", // [a-zA-Z0-9_]+ only
hook_name: "validate_product", // [a-zA-Z0-9_]+ only
method: "POST",
},
},
];
// URL handler (external endpoint)
webhooks: [
{
label: "Fraud Check",
description: "Calls external fraud service before order placement.",
webhook: {
webhook_method: "plugin.magento.sales_order.place",
webhook_type: "before",
batch_name: "my_app",
hook_name: "fraud_check",
method: "POST",
url: "https://fraud.example.com/check", // inside webhook object, not top level
},
},
];
Each entry also accepts an optional env array ("paas" / "saas") to scope it to specific Commerce environments. When omitted, the webhook applies to all environments; when set, it is only subscribed at install time on the listed environments.
See assets/webhooks-config.ts for the full annotated reference.
For webhook entries that use runtimeAction, create the action file under src/actions/ and register it in app.config.yaml.
Add a user-defined package to src/commerce-extensibility-1/ext.config.yaml alongside the existing app-management package. Use any name except app-management (reserved by the framework):
# 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:
validate-product:
function: actions/validate-product/index.js # relative to src/commerce-extensibility-1/
web: "yes"
runtime: nodejs:26
annotations:
require-adobe-auth: true
The <package>/<action> format in runtimeAction maps directly: my-app/validate-product → package my-app, action validate-product.
// src/commerce-extensibility-1/actions/validate-product/index.ts
import {
ok,
successOperation,
exceptionOperation,
addOperation,
replaceOperation,
removeOperation,
} from "@adobe/aio-commerce-lib-webhooks/responses";
export async function main(params: Record<string, unknown>) {
// params contains the Commerce operation payload
// Allow the operation to proceed
return ok(successOperation());
// Block the operation (validation failure)
// return ok(exceptionOperation("Product SKU is required"));
// Append data to the operation result
// return ok(addOperation("result/custom_field", { value: "appended" }));
// Modify a field in the result
// return ok(replaceOperation("result/price", 99.99));
// Remove a field from the result
// return ok(removeOperation("result/unwanted_field"));
}
Operation types:
| Response | Effect |
|---|---|
successOperation() | Allow — operation proceeds unchanged |
exceptionOperation(message) | Block — operation is rejected with this message |
addOperation(path, value) | Append data at path in the result |
replaceOperation(path, value) | Replace the value at path in the result |
removeOperation(path) | Remove the field at path from the result |
installation actionIf webhooks is the first install-requiring domain in the config (the others are eventing.commerce, eventing.external, adminUi, installation.customInstallationSteps), re-run:
npx @adobe/aio-commerce-lib-app init
This is what adds the installation action to ext.config.yaml's app-management package — aio app build/aio app deploy only read the existing file, they never regenerate it. Skip this and Commerce has no endpoint to call, so the webhook builds and deploys fine but never actually gets installed. Safe to re-run even when the action already exists.
Build the project to confirm the updated config is valid:
aio app build
A build failure with a validation error points directly to the offending config field. If this webhook needed Step 4, also check that ext.config.yaml now has actions.installation under app-management.
batch_name or hook_name rejected: Use underscores as separators (my_app, validate_product_save) — hyphens, dots, and spaces are not accepted.runtimeAction and webhook.url set: These are mutually exclusive — use runtimeAction when the handler lives in this app; webhook.url for an external endpoint.url at wrong level: For URL-based entries, url must be inside the nested webhook object, not at the top level alongside label.app-management package name conflict: The framework generates this package in ext.config.yaml on every build. Use any other name for your own actions.src/commerce-extensibility-1/: Do not use src/... or project-root-relative paths. actions/validate-product/index.js resolves correctly; src/commerce-extensibility-1/actions/validate-product/index.js does not.defineConfig not found: Ensure @adobe/aio-commerce-lib-app is installed and defineConfig is imported from @adobe/aio-commerce-lib-app/config.init wasn't re-run after adding the first install-requiring domain (Step 4) — no installation action, no install endpoint.aio app build completes without errorsinstallation action present in ext.config.yaml when this webhook requires itAfter aio app build passes:
commerce-app-business-config to expose configurable settings in Commerce Admincommerce-app-eventing to subscribe to Commerce or external eventscommerce-app-admin-ui to add custom columns, mass actions, order view buttons, or menu entries in Commerce Admincommerce-app-storage to back webhook handlers with queryable DB storageWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub adobe/skills --plugin commerce-app-management7 skills in this plugin
/commerce-app-admin-uiAdd or modify Adobe Commerce Admin UI extensions on the commerce/backend-ui/2 extension point: custom grid columns, mass actions, order, invoice, credit memo, and return view buttons, native UI form replacements, a custom Admin menu entry, and custom ACL resources. Use whenever the user wants to extend the Commerce Admin — add a column to the order, product, customer, invoice, credit memo, shipment, or newsletter grid, add a bulk/mass action to a grid, add a button to the order view page, add a supported native Commerce form with an app page, a custom menu item or page, or declare custom permissions the app checks itself — even when they don't name the extension point.
/commerce-app-api-meshScaffold or update an Adobe API Mesh configuration (mesh.json) in front of a Commerce app: add GraphQL/OpenAPI sources, extend an existing Commerce GraphQL type with a new field, and wire a cross-source resolver for it. Use when the user mentions API Mesh, mesh.json, extending a Commerce GraphQL type (e.g. adding a field to Order/CustomerOrder/Product), or stitching a runtime action's data into the storefront's GraphQL schema.
/commerce-app-business-configManage custom business configuration in an Adobe Commerce app. Use when the user wants to add, modify, or remove merchant-configurable settings (config fields, admin config, store configuration) exposed through Commerce Admin. Creates typed config fields (text, password, email, url, tel, boolean, list) in businessConfig.schema. Requires a base app initialized with commerce-app-init.
/commerce-app-eventingAdd 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.
/commerce-app-initScaffold a new Adobe Commerce app using the aio-commerce-sdk. Creates the base project structure and app.commerce.config file with metadata. Use when the user wants to create a new Commerce app from scratch or initialize a bare Commerce app project. After scaffolding, chains to appbuilder-project-init for Developer Console setup (project, workspace, API subscriptions) when the user wants to deploy. Does not configure extensibility domains — use commerce-app-eventing, commerce-app-webhooks, commerce-app-business-config, commerce-app-admin-ui, or commerce-app-storage for that.
/commerce-app-storageIntegrate App Builder Database Storage (@adobe/aio-lib-db) into an Adobe Commerce app and scaffold a runtime action that reads and writes documents. Use when the user wants persistent, queryable storage backing a Commerce app — either from a web action (HTTP-invokable) or from an event/webhook handler. Requires a base app initialized with commerce-app-init.
Other plugins' skills for the same job