The IDE already understands JavaScript. What it can't know is how SFCC wires a cartridge together: which file require('*/cartridge/...') loads, which class require('dw/catalog/ProductMgr') returns, which template res.render('cart/cart') opens or which bundle a Resource.msg key lives in. Intellij SFCC adds that knowledge on top of the IDE's own JavaScript support, so completion and Go to Declaration follow your cartridges the way the server does
require paths complete from every linked cartridge. Each item shows the cartridge that owns it; the list opens with Ctrl+SpaceBefore you start
| Needs | Why |
|---|---|
| A valid license or trial | SFCC completion, references and gutter icons are part of the paid features, see Purchase & License |
| 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 until the progress bar at the bottom is gone |
Server-side code is anything inside a cartridge folder. Files under cartridge/static, cartridge/js, cartridge/client, cartridge/front-end and cartridge/front are treated as browser code and don't get Script API completion
What the plugin adds
| Area | Example | Page |
|---|---|---|
| Script API types | require('dw/catalog/ProductMgr'), session, request, @param {dw.order.Basket} | API & Types |
| Module paths | require('*/cartridge/scripts/helpers/basketHelpers'), require('~/cartridge/...'), module.superModule | Module Resolution |
| SFCC strings | URLUtils.url('Cart-Show'), res.render('cart/cart'), Resource.msg('button.checkout', 'cart', null), HookMgr.callHook(...), product.custom.badgeText | SFCC Contracts |
Use it
Type or ask for completion
Suggestions open while you type. Press Ctrl+Space to open them on demand, for example inside an empty require('') or HookMgr.callHook('')
Read the item
SFCC items carry the Salesforce cloud icon or a matching icon such as route or custom attribute . The right side names where the item comes from: the cartridge, the dw package, the resource bundle or the 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. When there is more than one target, the IDE lets you pick. With a site scope selected, the targets follow that site's cartridge path
DemandwareScript
.ds files open as JavaScript. They get the same completion and navigation as .js files, and their @input and @output annotations feed the script nodes of the Pipeline Editor
Quieter inspections
SFCC code trips a few of the IDE's generic JavaScript checks. In a project with linked cartridges the plugin turns off the ones that misfire on it, such as type validation against the Script API typings, await outside an async function and the npm "module not installed" warning. Your other inspections keep running
Troubleshooting
| Symptom | What to do |
|---|---|
| No SFCC items in completion | Check that your license or trial is active, see Purchase & License. Then link a cartridge and wait for indexing to finish |
| 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 | Document the parameter with its dw. type, see API & Types |
| Go to Declaration lists several files | The path exists in more than one cartridge. Pick a site scope to follow one site's path |
| Completion still shows nothing after linking | Use File › Invalidate Caches and restart, the index may be stale |