SFCC Hooks Reference — Salesforce B2C Commerce
Skip to main content

SFCC Hook Reference Lookup

Search B2C Commerce hooks, view parameters, and generate `hooks.json` configuration blocks.

12 hooks

·
dw.ocapi.shop.basket.calculateOCAPI
dw.order.calculateOrder & Checkout
dw.ocapi.shop.basket.after_POSTOCAPI
dw.ocapi.shop.order.before_POSTOCAPI
dw.ocapi.shop.order.after_POSTOCAPI
dw.system.request.onRequestStorefront / System
dw.system.request.onSessionInitStorefront / System
app.payment.processor.defaultOrder & Checkout
app.fraud.detectionOrder & Checkout
dw.ocapi.data.product.after_PUTOCAPI
app.customer.loginStorefront / System
dw.commerce.inventory.inventoryLevelStorefront / System

About the SFCC Hook Reference Tool

The Salesforce B2C Commerce (SFCC) platform relies heavily on Hooks to extend or override standard platform functionality. Memorizing the exact hook names, required parameters, and the JSON syntax for `hooks.json` can be tedious. This tool provides a fast, searchable reference to common SFCC hooks, generating the necessary JSON snippet instantly.

Instant Search

Find hooks by name, category, description, or parameter types. No need to dig through PDF documentation.

One-Click JSON Generation

Select any hook and copy the exact `hooks.json` snippet. Paste it directly into your cartridge root to start extending platform functionality.

Frequently Asked Questions

What is hooks.json in Salesforce B2C Commerce?

The hooks.json file defines extension points within the SFCC platform. It maps standard platform events (like dw.order.calculate or dw.system.request.onRequest) to custom JavaScript files in your cartridge, allowing you to override or extend standard behavior.

Where should hooks.json be located?

The hooks.json file must be placed at the root level of your cartridge. It is read by the platform during cartridge initialization.

Can I have multiple scripts mapped to the same hook?

Yes, in some cases. However, for functions that return a value or status (like dw.order.calculate), usually only one implementation will execute fully or their return values dictate execution flow. Refer to the B2C Commerce documentation for specific hook chaining behavior.

Related Tools