Skip to main content

b2c-hooks

Register and implement B2C Commerce platform hooks -- scripts registered in a cartridge's hooks.json and invoked by HookMgr during OCAPI/SCAPI requests or system events. Applies ONLY to writing or debugging code registered in hooks.json and called by the HookMgr dispatcher. Key identifiers: hooks.json, HookMgr.callHook(), dw.system.Status returns, dw.ocapi.shop.* extension points (beforePOST/afterPOST/modifyResponse), dw.order.calculate, app.payment.processor.*. Covers hook script authoring, registration, Status OK/ERROR/rollback semantics, request.custom inter-hook data passing, and custom extension points. Do NOT trigger for these even if the query mentions hook or order: outbound webhook/notification endpoints on external Node.js/Express services (not hooks.json-registered); SFRA controller routes, middleware, or prepend/append chains; scheduled job step modules (execute/beforeStep/afterStep in steptypes.json, not hooks.json); Git or CI hooks (husky, pre-commit).

跳到安装

来源信息

仓库
SalesforceCommerceCloud/b2c-developer-tooling
最近来源活动
2026年7月31日 14:49
检测到的 SKILL.md 语言
英语
星标
51
分支
16

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。