Intellij SFCC teaches the IDE's JavaScript support how B2C Commerce runs your code. Completion, Go to Declaration, types, Find Usages and checks follow your cartridges the way the server does, from require('*/...') to the template a route renders and the type of every callback parameter
req and res complete with their types, so req.currentCustomer.profile and res.render come up as you type. Cmd+Click on server.middleware.https opens the function in your project's modules/server/middleware.jsExplore JavaScript support
SFRA Controllers
Typed req and res, middleware, route extensions, view data and the templates a route renders
API & Types
Bundled Script API typings, globals, JSDoc and SOAP web references
Type Inference
Callback, hook, job step and superModule types without JSDoc
Module Resolution
require paths, */, ~/ and module.superModule across the cartridge path
SFCC Contracts
Routes, templates, resource keys, hooks and step types behind your strings
Forms
Form members, dwfrm_ names and checks from the form XML
Custom Attributes
Custom attributes and site preferences typed from the metadata XML
Page Designer
Typed render scripts and completion in the meta JSON
Before you start
| Needs | Why |
|---|---|
| A valid license or trial | SFCC completion, references, parameter types and gutter icons are paid features, see Free and licensed |
| At least one linked cartridge | The plugin works only with linked cartridges, see Cartridges & Modules |
| Finished indexing | Routes, templates, resources and metadata come from the IDE index. Wait for the progress bar to finish |
Server-side code is anything inside a cartridge folder. Files under cartridge/static, cartridge/js, cartridge/client, cartridge/front-end and cartridge/front are browser code and don't get Script API completion
Server-side .js and .ds files resolve names against the bundled Script API typings and your project's modules. The typings declare the standard library the server runs, so the IDE's ES libraries stay out. Map and Set resolve, as the Script API declares them. window, document and fetch don't, and are reported as host objects, see Scopes & Types. Other files come in through require, see Module Resolution. Browser code keeps the IDE's usual scope
What the plugin adds
| IDE feature | In SFCC code | More |
|---|---|---|
| Completion | Script API members, require paths, routes, templates, resource keys, hooks, forms, custom attributes and Page Designer attributes. Items from another cartridge name it on the right with its icon and path, Script API items their package such as dw.util | SFCC Contracts |
| Types | dw classes from the bundled typings, typed req and res in SFRA routes, callback, hook and job step parameters, module.superModule, forms and custom attributes | Type Inference |
| Go to Declaration | require('*/...') to the winning cartridge, server.middleware.https to SFRA's middleware, a route string to its controller, a template, bundle key, hook, form field or attribute | Search & Navigation |
| Find Usages and Rename | Templates with the calls that render them, picked templates included, form fields and job step functions. Custom attributes list every read | SFRA Controllers |
| Gutter icons | Navigate to template on every render call, with Choose Template when several cartridges have it | Gutter icons |
| Code Vision | Open Endpoint, Copy Endpoint URL, usages and append or replace counts above each route, the hook above a hook function, the step type above a job step | Code Vision |
| Folding | Resource.msg('title', 'loyalty', null) reads as "Loyalty rewards" | Resource bundles |
| Inspections | Hook functions that return what the hook doesn't expect, unknown forms and form elements, and the Digital Script and compatibility mode checks | Hooks |
| Search Everywhere | Every route, hook, step type and custom API in the B2C Entry Points tab | Search Everywhere |
Use it
Type or ask for completion
Inside a string, suggestions open on their own only in the arguments of calls named url, abs, http, https, render, renderTemplate, getRenderedHtml, sendEmail, append, prepend, replace, msg, msgf and on, and of methods added in SFCC Route Calls. In other strings, for example require('') or HookMgr.callHook(''), press Ctrl+Space
Read the item
SFCC items carry the Salesforce cloud icon or a matching one such as route or custom attribute . The right side names the source: cartridge, dw package, resource bundle or metadata file
Jump to the source
Cmd+Click or Cmd+B (Ctrl+Click or Ctrl+B on Windows and Linux) opens the file, route, template, bundle key, hook or attribute behind a string. With several targets the IDE lets you pick, and a site scope limits them to that site's cartridge path
Free and licensed
A license change applies at once, without a restart:
| Free | Needs a license or trial |
|---|---|
The bundled Script API, SFRA and OCAPI typings, with completion and quick documentation of dw classes | Completion and Cmd+Click of SFCC strings: routes, templates, resource keys, hooks, forms and custom attributes |
Types of module.superModule, for each over Script API collections and ES6 imports | Cmd+Click on require paths and module.superModule, and the cartridge on each completion item |
Server .js files parsed as Digital Script, with the compatibility mode and Rhino syntax checks | Parameter types of callbacks, hooks, pipelets and job steps |
| Live templates and the New Digital Script File dialog | The template gutter icon, Code Vision, Resource.msg folding, hook documentation and the hook return check |
See Purchase & License for the trial
Fast in large projects
From the plugin's performance tests on a large storefront:
| Task | Before 2026.3 | Now |
|---|---|---|
| Index a 114,000-file storefront with every plugin index | 32 s | 24 s |
| Resource bundle keys after opening a project or switching branches | 13 s | 0.1 s |
| The hooks index of the same storefront | 1.3 s | 0.45 s |
| Highlighting a library that 100 scripts import, after one typed character | 118 ms | 85 ms |
| Reindex after saving a controller | 35 ms | 31 ms |
Caches follow only the files they read, so typing in one script recomputes nothing in the others, see Faster in large projects
Digital Script
.ds files and server .js files are parsed as Digital Script, the Rhino dialect B2C Commerce runs, with the same completion and navigation as JavaScript. Import calls, for each loops, type annotations and E4X work there, and the @input and @output headers of .ds pipelet scripts feed the script nodes of the Pipeline Editor, see Digital Script
Quieter inspections
The plugin turns off a few generic JavaScript checks that SFCC code trips. Your other inspections keep running
| Inspection | Turned off |
|---|---|
| Missing module dependency | In every JavaScript file. require paths of a cartridge aren't npm packages |
| Expression statement which is not assignment or call | In every JavaScript file |
| ECMAScript specification is not followed | In Digital Script and server scripts of a project with linked cartridges. Real syntax errors still show. Client code under cartridge/client/ and cartridge/static/ keeps every check |
The await checks and type validation against the API typings | In Digital Script and server scripts, as above |
ESLint no-undef | Only the exact 'session' is not defined. (no-undef) report, for the SFCC runtime globals such as dw, session, request, response, customer, slotcontent, importPackage, PIPELET_NEXT and trace, in server scripts of linked cartridges. B2C and global modules keep it, and every other ESLint report stays. Needs a license |
Troubleshooting
| Symptom | What to do |
|---|---|
| No SFCC items in completion | Check that your license or trial is active, a cartridge is linked and indexing has finished, see Before you start |
| Script API completion is missing in one file | The file is under a browser-code folder such as cartridge/client, or outside any cartridge folder |
| Members of a function parameter don't complete | Pass the function straight to a typed call, or document the parameter with its dw. type, see Type Inference |
req. or res. lists nothing in a route | Mark SFRA's modules folder as Modules (Global Modules) Root, see SFRA Controllers |
| Go to Declaration lists several files | The path exists in more than one cartridge. Pick a site scope |
window, document or fetch is unresolved in a script | Expected in server-side .js and .ds files, which B2C Commerce runs without them, see Host objects |
| Completion still shows nothing after linking | Use File › Invalidate Caches and restart, the index may be stale |