B2C Entry Points

Search every pipeline, controller route, hook, step type and custom API of your linked cartridges in one tool window and open the code that runs it

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

B2C Entry Points has a tab for each kind of entry point in your linked cartridges, with its count. One search filters every tab and counts the matches, the context menu opens a registration, and a double-click opens the code

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"

TabRead fromEach row showsGrouped by
Pipelines Pipeline XML in pipelines foldersThe pipeline with its type and cartridge, and under it each start node with its route, such as Cart-ShowPipeline group
Controllers Routes in controllers folders, from server.get, server.post, server.append and the other server calls, and SiteGenesis exports.Show = assignmentsThe action, its method such as GET, POST or APPEND, and the full route nameCartridge, 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.jsonThe hook name, system for Salesforce hook points such as dw.order.calculate, and the script pathCartridge
Step Types steptypes.json in the cartridge folderThe step type ID, its kind (Script, Chunk or Pipeline) and the module or pipeline it runsCartridge
Custom APIs rest-apis/<api>/api.json and the schema.yaml it namesThe HTTP method in colour, the versioned path such as v1/members/{memberId}/points and the operation ID. Hover a row for the operation summaryCartridge, then API with its version

Cartridges follow the order of your linked cartridges. Folders you expand stay expanded when the tree refreshes

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:

TabAlso matches
PipelinesGroup, cartridge, type, path, and start nodes by name or route
ControllersCartridge and method
HooksScript path and cartridge
Step TypesModule, function, pipeline, cartridge and kind
Custom APIsAPI 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

KeyWhat it does
↓ in the search fieldSelects the first result and moves into the tree
Enter in the search fieldOpens the first result
Enter in the treeOpens the selected entry point, or expands and collapses a folder
Double-clickOpens 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

RowOpens
PipelineThe pipeline in the Pipeline Editor
Start nodeThe pipeline in the Pipeline Editor, on that start node
Controller routeThe line that defines the route
HookFor 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 typeThe step's function in its module. A pipeline step opens its pipeline on the start node it calls
Custom API endpointThe 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

RowItems
PipelineOpen in Pipeline Editor, Open XML Source, Reveal in Project View, Copy Pipeline Name
Start nodeOpen at Start Node, Open XML Source, Copy Route Name
Controller routeOpen Route, Reveal in Project View, Copy Route Name
HookOpen Implementation, Open in hooks.json, Copy Hook Name
Step typeOpen Implementation, Open in steptypes.json, Copy Step Type ID
Custom API endpointOpen 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

ButtonWhat it does
RefreshCollects the entry points again
Expand All, Collapse AllExpands 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

KindIndexed from
Pipelines and start nodesPipeline XML in the pipelines folder of each cartridge
Controller routesserver.* calls on any variable that holds require('server'), and SiteGenesis exports.<Name> = assignments, also when wrapped in guard.ensure
HooksThe 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 typessteptypes.json in the cartridge folder, with every function key of chunk steps
Custom APIsrest-apis/<api>/api.json, the schema.yaml it names and the functions the API script exports
Route usages, for the lens countsThe 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 &quot;. 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

SymptomWhat to do
"No cartridges are linked to this project"Link your cartridges, see Cartridges & Modules
"Collecting entry points..." stays on screenIndexing is still running. The tree fills in when it finishes
The B2C Entry Points menu items are missingNo cartridge is linked yet
No hooks, or some are missingThe 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 typessteptypes.json must sit in the cartridge folder, next to the cartridge subfolder, with a step-types object
A custom API is missingThe 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

On this page