sfcc-hooks-registration
CommunityRegister SFCC hooks across cartridges.
Authortaurgis
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Register SFCC hooks via cartridge package.json and hooks.json. Use when adding hooks or troubleshooting hook registration.
Core Features & Use Cases
- Create a top-level cartridge package.json (cartridges/<cartridge-name>/package.json) and define the hooks path relative to that package.json.
- Map hook names to script files in hooks.json relative to the location of hooks.json.
- Export hook functions as CommonJS exports using the unqualified hook name (e.g., exporting "dw.order.calculate" as "exports.calculate").
- Enable the Salesforce Commerce Cloud API hook execution feature switch in Business Manager for OCAPI/SCAPI hooks.
- Ensure the cartridge is deployed to the site cartridge path and uploaded for use.
- Notes:
- The hooks path is relative to the package.json location.
- The script path in hooks.json is relative to hooks.json itself.
- For Shopper API hooks, returning a value can skip the system implementation; return nothing when you want the default implementation to run.
Quick Start
Create a top-level cartridge package.json, create hooks.json, map hooks to scripts, export the functions, enable the hook execution feature switch in Business Manager, and upload the cartridge.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: sfcc-hooks-registration Download link: https://github.com/taurgis/sfcc-dev-mcp/archive/main.zip#sfcc-hooks-registration Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.