
commerce-app-webhooks
Add or modify webhook interceptors in an Adobe Commerce app. Use when the user wants to intercept Commerce operations to validate input, append data, or modify behavior — before or after execution. Requires a base app initialized with commerce-app-init.
- Installs
- 79
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/adobe/aio-commerce-sdk --skill commerce-app-webhooks- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads commerce-app-webhooks automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Configure Commerce App Webhooks
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.
Prerequisites
- Verify the app is scaffolded and initialized, not merely that the config exists. Require both:
app.commerce.config.tspresent in the project root, and- the project initialized — signalled by the generated
src/commerce-extensibility-1/directory and installednode_modules(the@adobe/aio-commerce-lib-appdependency).
- If
app.commerce.config.tsis missing, stop and invokecommerce-app-initfirst (it writes the config, then runs init). - If the config is present but the project is not initialized (no
src/commerce-extensibility-1/ornode_modules), runnpx @adobe/aio-commerce-lib-app initbefore continuing. Init is idempotent — it finds the existing config, skips the interactive prompts, installs dependencies, and generates the project files. - Actions can be authored in TypeScript only once the project has the TypeScript build setup (
webpack-config.cjs+ roottsconfig.json) thatinitscaffolds for a TypeScript Commerce config — seecommerce-app-init. Otherwise, author actions in JavaScript.
Step 1 — Understand intent
Ask the user what they want to intercept and how:
- What operation: the
webhook_method(the Commerce operation, e.g.,plugin.magento.catalog_product.save) andwebhook_type(beforeorafter) - How the handler is reached: either a runtime action in this app (
runtimeAction: "<package>/<action>") or an explicit external URL (webhook.url) — these are mutually exclusive - Category (optional):
validation(block if invalid),append(add data), ormodification(alter data) — used for conflict detection - Batch and hook identifiers:
batch_namegroups related hooks;hook_nameuniquely identifies this hook within the batch
Step 2 — Derive config values
Apply 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 |
Step 3 — Update app.commerce.config.ts
Add 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.
Creating the handler action
For webhook entries that use runtimeAction, create the action file under src/actions/ and register it in app.config.yaml.
Register the action
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:24
annotations:
require-adobe-auth: true
The <package>/<action> format in runtimeAction maps directly: my-app/validate-product → package my-app, action validate-product.
Handler skeleton
// 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 |
Step 4 — Regenerate the installation action
If 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.
Step 5 — Validate
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.
Common Issues
batch_nameorhook_namerejected: Use underscores as separators (my_app,validate_product_save) — hyphens, dots, and spaces are not accepted.- Both
runtimeActionandwebhook.urlset: These are mutually exclusive — useruntimeActionwhen the handler lives in this app;webhook.urlfor an external endpoint. urlat wrong level: For URL-based entries,urlmust be inside the nestedwebhookobject, not at the top level alongsidelabel.app-managementpackage name conflict: The framework generates this package inext.config.yamlon every build. Use any other name for your own actions.- Function path is relative to
src/commerce-extensibility-1/: Do not usesrc/...or project-root-relative paths.actions/validate-product/index.jsresolves correctly;src/commerce-extensibility-1/actions/validate-product/index.jsdoes not. defineConfignot found: Ensure@adobe/aio-commerce-lib-appis installed anddefineConfigis imported from@adobe/aio-commerce-lib-app/config.- Webhook deployed but Commerce never calls it:
initwasn't re-run after adding the first install-requiring domain (Step 4) — noinstallationaction, no install endpoint.
Quality Bar
aio app buildcompletes without errorsinstallationaction present inext.config.yamlwhen this webhook requires it
Chaining
After aio app build passes:
- Add merchant settings — invoke
commerce-app-business-configto expose configurable settings in Commerce Admin - Add event subscriptions — invoke
commerce-app-eventingto subscribe to Commerce or external events - Extend the Admin UI — invoke
commerce-app-admin-uito add custom columns, mass actions, order view buttons, or menu entries in Commerce Admin - Add persistent storage — invoke
commerce-app-storageto back webhook handlers with queryable DB storage
References
- assets/webhooks-config.ts — Reference config showing both runtime action and URL-based webhook entry shapes
FAQ
What does the commerce-app-webhooks skill do?
Add or modify webhook interceptors in an Adobe Commerce app. Use when the user wants to intercept Commerce operations to validate input, append data, or modify behavior — before or after execution. Requires a base app initialized with commerce-app-init.
How do I install commerce-app-webhooks?
Run npx skills add https://github.com/adobe/aio-commerce-sdk --skill commerce-app-webhooks in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/commerce-app-webhooks/ (personal) or .claude/skills/commerce-app-webhooks/ (project).
Which AI agents can use commerce-app-webhooks?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is commerce-app-webhooks safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains commerce-app-webhooks?
It is published by adobe in adobe/aio-commerce-sdk. It has 79 recorded installs.
More from adobe/aio-commerce-sdk
commerce-app-init
adobe/aio-commerce-sdk
Scaffold 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-eventing
adobe/aio-commerce-sdk
Open the skill to read its SKILL.md instructions.
commerce-app-business-config
adobe/aio-commerce-sdk
Open the skill to read its SKILL.md instructions.
commerce-app-storage
adobe/aio-commerce-sdk
Open the skill to read its SKILL.md instructions.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.