Connect SFCC hooks, typed SFRA routes, exported functions, templates, resources, job steps, and custom API operations across your cartridges
SFCC connects many features through strings and configuration files. Intellij SFCC indexes those relationships so completion can suggest valid names and navigation can take you from a caller or registration to the implementation
Hook intelligence starts with a recognized hooks.json registration and its script. Known system hooks are typed automatically: their parameters and return value get SFCC types without any JSDoc
A system hook's function shows the hook it implements, and every function of a custom hook shows hook → function. Click a lens to open its registration in hooks.json
Keep your cartridge's normal hook-file registration in place so SFCC can load it at runtime. Local indexing does not deploy or enable a hook on the sandbox
cartridge/scripts/hooks/calculate.js
var Status = require('dw/system/Status');exports.calculate = function (basket) { // Demonstrates typing only; real basket calculation belongs here. var currency = basket.currencyCode; return new Status(Status.OK);};
For this known hook, basket is typed as dw.order.Basket and the function must return a dw.system.Status. Typed Hooks lists every typed hook
The hook-name argument completes from indexed hooks; the function argument can complete from the selected hook. Use Go to Definition to inspect its implementation
For custom hooks, registered names and indexed exports remain navigable. Write JSDoc or TypeScript annotations for your own contract where the server has no known system signature; it cannot infer a domain model from the hook's name alone
Hook CodeLens provides the reverse path from the implementation to its registration
Route intelligence recognizes SFRA controller declarations, SiteGenesis endpoints, and pipeline entry points. Completion details identify the kind of route and its cartridge context
storefront
accountLinks.js
app_customcartridgescriptshelpersaccountLinks.js
1varURLUtils=require('dw/web/URLUtils');
2varhref=URLUtils.url('Account-S');
◈Account-SaveNewPassword
◈Account-SavePassword
◈Account-SaveProfile
◈Account-SetNewPassword
◈Account-Show
◈Account-StartRegister
◈Account-SubmitRegistration
Pipeline | SFRA Controller | Site Genesis Controller
main00Ln 2, Col 35UTF-8SFCC JavaScript
Inside URLUtils.url('') the indexed routes complete by name; the detail tells whether a route is backed by a pipeline, an SFRA controller or a SiteGenesis controller
var URLUtils = require('dw/web/URLUtils');var productUrl = URLUtils.url('Product-Show', 'pid', 'demo-product');
Place the caret inside 'Product-Show' and invoke completion, or use Go to Definition on it. Find All References and the route's usage lens help locate indexed callers. For SFRA, append, prepend, and replace relationships are available through route CodeLens
Route callbacks need no annotations. In server.get, post, use, append, prepend, and replace, the req, res, and next parameters are typed as sfra.Request, sfra.Response, and sfra.Next, so request members and response methods complete with their docs
storefront
Explorer
storefront
cartridges
app_custom
cartridge
controllers
Product.js
templates
package.json
app_storefront_base
Product.js
app_customcartridgecontrollersProduct.js
1'use strict';
2
3varserver=require('server');
4
Open Endpoint | Copy Endpoint URL | 2 usages
5server.get('Show',function(req,res,next){
6varpid=req.querystring.pid;
7
8res.render('product/productDetails',{pid:pid});
9next();
10});
11
12module.exports=server.exports();
parameter
declareconstreq: sfra.Request;
▫body
▫currentCustomer
▫form
▫geolocation
▫host
▫httpHeaders
▫httpMethod
▫httpParameterMap
▫https
◇redirect
▫redirectStatus
▫redirectUrl
◇render
▫renderings
◇setRedirectStatus
main00Ln 5, Col 31UTF-8SFCC JavaScript
SFRA route callbacks need no annotations: req, res and next are typed, so request members and response methods complete with their documentation
In SiteGenesis controllers, exported route functions can expose a .public flag. The engine models that member and checks boolean-compatible assignments. This is separate from an SFRA server.get declaration or a public pipeline start node
In steptypes.json, module fields complete to cartridge scripts, and function fields can complete to the module's exports. Definition navigation connects those configuration values to code
Each job step function shows the step type and the steptypes.json property that calls it. Click the lens to open that property
The relationship includes task-oriented steps and chunk-oriented lifecycle functions. Step CodeLens connects a script export back to the registered step type and its role. Keep names consistent across the JSON and script; renaming a function manually does not automatically rewrite every registration
Custom API support indexes api.json, the associated OpenAPI YAML, and implementation scripts. It connects endpoint identifiers, operation declarations, and exported handlers
api.json shows the method and the path of each endpoint, while the script and the schema link to the other two files. Each lens opens its target at the matching operation
Where you work
Use the connection to…
api.json
Complete relevant endpoint wiring and navigate to the indexed implementation or schema
OpenAPI operation
Inspect the operation's implementation and registration through CodeLens
Exported handler
Return to the schema or registration to understand the HTTP contract
These features describe indexed endpoint relationships. They do not establish that an API is registered or authorized on the active sandbox. See B2C Entry Points for the view that lists them
checkout.propertiesOverridden by app_customDefault
Place Order
mainLn 3, Col 1UTF-8Properties
Every key in a .properties text editor shows how often scripts and templates use it and how many files of the bundle define it. Usages opens a peek, Localizations opens the Resource Bundle Editor on that key
Use the same completion-and-definition workflow for rendered templates and resource messages:
var Resource = require('dw/web/Resource');// Within an SFRA route handler:res.render('product/details', { heading: Resource.msg('product.details.title', 'product', null)});
String
Source of intelligence
'product/details'
Indexed .isml templates; inserted paths omit the extension
'product.details.title'
Keys in indexed .properties resource bundles
'product'
Resource bundle names and available locale variants
Find All References on a resource key locates recognized usages. The resource lenses show usage and localization counts from the .properties declaration
If a project wraps these APIs in its own helpers, completion-context rules let you identify the relevant method and argument position