A request, a job or a hook can enter your code in five different ways, and each one is declared in its own place: pipeline XML, controller scripts, hooks.json, steptypes.json and the api.json of a custom API. B2C Entry Points collects all of them from your linked cartridges into one searchable tool window with a tab for each kind, 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 open the tool window with the search field focused, so you can start typing right away. They show up once a cartridge is linked, see Cartridges & Modules
To jump to an entry point without opening the tool window, press Shift twice and use the B2C Entry Points tab of Search Everywhere. It lists the same entries and opens the same code
What it lists
The tool window has a tab for each kind of entry point, with its total next to the name. Each tab holds a tree of its own that keeps its expanded folders and scroll position, and the tool window opens on the tab you picked last. The status line at the bottom counts every kind, for example "143 entry points in 5 cartridges"
| 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 action, its method such as GET, POST or APPEND, and the full route name | 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 |
| 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 |
Cartridges follow the order of your linked cartridges. Folders you expand stay expanded when the tree refreshes
Search
Type in the field at the top. Names match the way they do in Search Everywhere, so cart-rem finds Cart-RemoveProduct. The search also looks at the details of each row:
| 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 |
The search covers every tab at once. While you search, each tab shows its number of matches, folders without a match are hidden and the status line counts all the matches. When the tab you are on has no match, the first tab that has one opens. Matched text is highlighted in every row. Each tab shows up to 400 matches and then a "N more, refine the search" row
| 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, not only the file that declares it. When the plugin can't find that code, it opens the declaration instead
| 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
Toolbar
| Button | What it does |
|---|---|
| Refresh | Collects the entry points again |
| Expand All, Collapse All | Expands or collapses the tree of the open tab |
You rarely need Refresh. The tree updates on its own half a second after you change a controller, a pipeline, a hooks.json, steptypes.json or package.json, or a file under rest-apis. While the tool window is hidden it waits and refreshes the next time you open it
Where the entries come from
Every entry point comes from the plugin's own indexes. The IDE builds and updates them together with its other indexes, like the ones for Java or JavaScript. Nothing runs outside the IDE and Node.js is not needed. The indexes read the same declarations as the VS Code extension, so both editors list the same entry points. The same indexes draw the Code Vision lenses above routes, hooks, step types and custom APIs
| Kind | Indexed from |
|---|---|
| Pipelines and start nodes | Pipeline XML in the pipelines folder of each cartridge |
| Controller routes | server.* calls on any variable that holds require('server'), and SiteGenesis exports.<Name> = assignments, also when wrapped in guard.ensure |
| Hooks | The hooks file each cartridge's package.json names in hooks, else the cartridge's hooks.json. When a file has two hooks arrays, the last one counts |
| Step types | steptypes.json in the cartridge folder, with every function key of chunk steps |
| Custom APIs | rest-apis/<api>/api.json, the schema.yaml it names and the functions the API script exports |
| Route usages, for the lens counts | The calls that the route call rules name and Pipeline.execute in scripts, the same calls and <iscomponent pipeline> in ISML, call and jump nodes in pipelines, <exec pipeline> in other cartridge XML, and the same calls inside pipeline and XML values, where quotes may be written as ". The built-in rules cover URLUtils and URLAction calls, and your own helpers count once you add them. A rule change applies without indexing again |
While the IDE is indexing, the tree shows "Collecting entry points..." and the lenses are hidden. Both fill in when indexing finishes
Troubleshooting
| Symptom | What to do |
|---|---|
| "No cartridges are linked to this project" | Link your cartridges, see Cartridges & Modules |
| "Collecting entry points..." stays on screen | Indexing is still running. The tree fills in when it finishes |
| The B2C Entry Points menu items are missing | No cartridge is linked yet |
| No hooks, or some are missing | The hooks file needs a top-level hooks array. When the cartridge's package.json has a hooks entry, only the file it points to is read, so check that the path is right. Without the entry, the plugin reads hooks.json in the cartridge |
| 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 |
| A tab says "No hooks in the linked cartridges" | None of the linked cartridges declares that kind. See the rows above for where each kind is read from |
| "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, step types and custom APIs
Cartridges & Modules
Link cartridges and browse pipelines in the project view
Actions & Shortcuts
Every menu item, tool window and shortcut of the plugin