Requests, jobs and hooks enter your code from five places: pipeline XML, controllers, hooks.json, steptypes.json and custom API api.json files. B2C Entry Points lists them all from your linked cartridges in one searchable tool window, and every row opens the code that runs it
Open the tool window
Click B2C Entry Points on the right tool window bar. You can also open it from:
- Navigate › B2C Entry Points
- Tools › Salesforce B2C Commerce › B2C Entry Points
- More › Tool Windows › B2C Entry Points
The menu items focus the search field and show up once a cartridge is linked. To jump to an entry point without the tool window, use the B2C Entry Points tab of Search Everywhere
What it lists
One tab per kind, with its count. The tabs stay in one row: scroll it with the trackpad or mouse wheel, or click the chevron at its end for the tabs out of sight. Each tab keeps its own expanded folders and scroll position, and the tool window reopens on the last tab you picked
| Tab | Read from | Each row shows | Grouped by |
|---|---|---|---|
| Pipelines | Pipeline XML in pipelines folders | The pipeline with its type and cartridge, and under it each start node with its route, such as Cart-Show | Pipeline group |
| Controllers | Routes in controllers folders, from server.get, server.post, server.append and the other server calls, and SiteGenesis exports.Show = assignments | The endpoint, such as Cart-Show, and under it each definition with its method, controller file and cartridge | Endpoint, sections A to Z, or cartridge then controller |
| Hooks | The hooks file that the cartridge's package.json names in hooks, usually hooks.json. Without that entry, the cartridge's hooks.json | The hook name, system for Salesforce hook points such as dw.order.calculate, and the script path | Cartridge, or cartridge then script |
| Step Types | steptypes.json in the cartridge folder | The step type ID, its kind (Script, Chunk or Pipeline) and the module or pipeline it runs | Cartridge |
| Custom APIs | rest-apis/<api>/api.json and the schema.yaml it names | The HTTP method in colour, the versioned path such as v1/members/{memberId}/points and the operation ID. Hover a row for the operation summary | Cartridge, then API with its version |
Search
Type in the field at the top. Names match as in Search Everywhere, so cart-rem finds Cart-RemoveProduct. Details match too:
| Tab | Also matches |
|---|---|
| Pipelines | Group, cartridge, type, path, and start nodes by name or route |
| Controllers | Cartridge and method |
| Hooks | Script path and cartridge |
| Step Types | Module, function, pipeline, cartridge and kind |
| Custom APIs | API name, operation ID, method, summary and cartridge |
One search covers every tab. Each tab counts its matches, and when yours has none, the first tab with a match opens. A tab shows up to 400 matches. Each tab keeps its own scroll position
Tools in the search row
The tools of the open tab sit next to the search field, after a line: three views on Controllers, and Filter Hooks with the grouping on Hooks. The tool in use shows pressed, and each tool has its own coloured icon, so you can tell at a glance what the tab shows. Hover a tool for its name and what it does. The other tabs have none, and Refresh, Expand All and Collapse All come last on every tab
Controller views
The Controllers tab has three views, and your pick is kept for the project:
- Endpoints , the default, lists every endpoint once, A to Z
- A to Z puts the same endpoints in sections by first letter, A to Z, then # for the ones that start with a digit or a sign
- Cartridges shows a folder per cartridge in cartridge path order, then one per controller
In Endpoints and A to Z, an endpoint such as Cart-Show opens to every definition of it across your cartridges: the get, post, prepend, append and replace calls. They follow the cartridge path, so the cartridge that comes first in the path is on top, and calls in one file keep their order. Each row shows its method in colour, with softer tones for prepend, append and replace, then the controller file such as controllers/Cart.js and its cartridge on the right. In a narrow tool window a row drops the file, then the cartridge name, and keeps its icon
A to Z sections
Every section starts open, so you scroll through hundreds of endpoints like a contact list. Each header shows its letter and how many endpoints it holds. While you scroll, the header of the section at the top stays pinned until the next one pushes it out. Click a header, pinned or not, to close or open its section. Collapse All closes every section and leaves the letters as an index, Expand All opens them again
While you search, every section with a match opens, and the counts on the headers, the endpoints and the tab follow each key you press
Filter hooks
Filter Hooks on the Hooks tab opens one list in two parts:
- Hook type: All types, System, Custom, OCAPI Shop, OCAPI Data or SCAPI
- Hook area: about 40 areas such as Authentication, Basket, Product / PDP, Order, Shopper context or Apple Pay
Each choice shows how many hooks it keeps, counted with the search and the other part, and a check marks the one in use. Type to narrow the list and press Enter to pick. While a filter is set, the button shows pressed with a blue funnel and its tip names the type and area. Reset Hook Filters at the end of the list clears both and keeps the search. With nothing left, the tab reads No hooks match the selected type and area
Group by Script
The two tools after Filter Hooks switch between Cartridge and Script. Script shows each hook under the script that implements it: one folder per script file, named after the file with its folder in the cartridge, such as calculate.js in cartridge/scripts/cart. A script that can't be found reads red, with its hooks. Cartridge lists one row per registration. The choice is kept for the project
Keys
| Key | What it does |
|---|---|
↓ in the search field | Selects the first result and moves into the tree |
Enter in the search field | Opens the first result |
Enter in the tree | Opens the selected entry point, or expands and collapses a folder |
| Double-click | Opens the entry point |
Open the code
Every row opens the code that runs, or the declaration when that code can't be found
| Row | Opens |
|---|---|
| Pipeline | The pipeline in the Pipeline Editor |
| Start node | The pipeline in the Pipeline Editor, on that start node |
| Controller route | The line that defines the route |
| Hook | For a system hook, the function named after the hook point, such as calculate for dw.order.calculate. Other hooks open their script. Without either, the entry in hooks.json |
| Step type | The step's function in its module. A pipeline step opens its pipeline on the start node it calls |
| Custom API endpoint | The exported function for the operation in the API script, or the operation in schema.yaml |
Context menus
Right-click a row for the actions that fit it
| Row | Items |
|---|---|
| Pipeline | Open in Pipeline Editor, Open XML Source, Reveal in Project View, Copy Pipeline Name |
| Start node | Open at Start Node, Open XML Source, Copy Route Name |
| Controller route | Open Route, Reveal in Project View, Copy Route Name |
| Hook | Open Implementation, Open in hooks.json, Copy Hook Name |
| Step type | Open Implementation, Open in steptypes.json, Copy Step Type ID |
| Custom API endpoint | Open Implementation, Open Schema, Open api.json, Copy Endpoint Path, Copy Operation ID |
Copy Endpoint Path copies the path with the API name, for example /loyalty/v1/members/{memberId}/points/redeem
File-backed entries also offer the IDE's Copy Path/Reference menu, including absolute and content-root paths, plus the same native Git/VCS actions as the Metadata tree. These actions use the selected entry's file; a pipeline start node uses its pipeline XML file. Git actions appear when the file belongs to a configured Git repository.
Toolbar
The search row ends with the actions every tab has, after the tools of the open tab
| Button | What it does |
|---|---|
| Refresh | Collects the entry points again |
| Expand All, Collapse All | Expands or collapses the tree of the open tab, the A to Z sections too |
You rarely need Refresh: the tree updates half a second after you change an entry point file
Where the entries come from
The plugin's own indexes, built with the IDE's other indexes. No Node.js needed. They read the same declarations as the VS Code extension and also draw the Code Vision lenses. While the IDE indexes, the tree shows "Collecting entry points..."
Troubleshooting
| Symptom | What to do |
|---|---|
| "No cartridges are linked to this project" | Link your cartridges, see Cartridges & Modules |
| No hooks, or some are missing | The hooks file needs a top-level hooks array. If package.json has a hooks entry, only that file is read |
| No step types | steptypes.json must sit in the cartridge folder, next to the cartridge subfolder, with a step-types object |
| A custom API is missing | The API needs cartridge/rest-apis/<api>/api.json in a linked cartridge |
| A custom API row says "not in the schema" | The operation ID from api.json has no matching operation in schema.yaml |
| "N more, refine the search" | Type a longer or more specific search |
Related
Pipeline Editor
Pipeline Groups and editing pipelines as a graph
Search Everywhere
Find every entry point by name in the B2C Entry Points tab
Code Vision
Lenses above routes, hooks and step types, gutter icons for custom APIs
Cartridges & Modules
Link cartridges and browse them in the B2C project view
Actions & Shortcuts
Every menu item, tool window and shortcut of the plugin