StudioGraph
See what breaks before you change it. StudioGraph maps the dependencies between your Salesforce OmniStudio components (OmniScripts, Integration Procedures, Data Mappers, FlexCards) and the Apex, LWC, Flows and object fields they use. Pick a component and you see what uses it, what it uses, and how many components a change would affect. A health check finds broken references and risky patterns before you deploy.
Everything runs locally on your project files. Metadata never leaves your computer.
Quick start
- Open a folder that contains
sfdx-project.json. StudioGraph indexes it automatically.
- Open a component file (an Apex class, LWC, FlexCard, OmniScript, Integration Procedure, Data Mapper or Flow) and press
Ctrl+Alt+G (Cmd+Alt+G on macOS). The Dependency Graph opens focused on that component. Press it again on another file and the graph switches to that component. From any other place the shortcut just opens the graph.
- Or click the StudioGraph icon in the Activity Bar (left), StudioGraph in the status bar, or run StudioGraph: Open Graph from the Command Palette (
Ctrl+Shift+P).
Features
Dependency graph
The Dependency Graph tab has three parts:
- Component list (left): all components grouped by type, with a name filter. Click a component to select it.
- Graph (center): the selected component with the components around it. Nodes are colored by type. The border shows the relation to the selected component: orange = uses it, so a change can affect it; blue = it uses this (a dependency); dashed red = referenced but not found in your sources. Click a node to select it; double-click opens its file.
- Details (right): type, impact numbers, issues found by the health check, and the direct "Used by" and "Uses" lists with the reference mechanism (for example
IP Action, bundle, data source IP). Buttons open the file or export an impact report.
Right-click a component (in the graph, the component list, the details panel, Find Usages or Health Check) for Copy Name and Copy Path.
Show at the top sets how many levels the graph shows (1–99, or all for the whole chain).
Impact numbers
Every component has four numbers:
| Number |
Meaning |
| used by |
components that reference it directly |
| change affects |
everything that depends on it, directly or indirectly |
| uses |
components it references directly |
| depends on |
everything it needs, directly or indirectly |
StudioGraph gives you the numbers, not a risk score: you decide what they mean for your change.
Find Usages
The Find Usages tab searches component names and the content of their configuration: OmniScript and IP element settings, Data Mapper mappings and filters, FlexCard data sources, SOQL queries and Apex/LWC code. Case does not matter, and Account.Name and Account:Name find the same field.
- Match mode: Word (default) finds the name as a whole word, so
Account finds Account.Name but not AccountService; Exact only the whole identifier or dotted name; Contains any part of a name or text.
- Type filter: chips with the number of matching components per type; pick one or more types, or All.
- Results table: component, type and number of hits, sortable by any column, with a Filter results box. Each hit shows its line number: click it to open the file at that line. Click the component name to select it in the graph.
- Recent searches: the last 20 queries of the workspace, one click to run again.
- Export Results saves the results, with file and line of every hit, as Markdown, CSV or JSON.
From the editor: select a name (or place the cursor on it) and right-click → StudioGraph: Find Usages.
Health Check
The Health Check tab lists problems in three groups, which you can filter:
- Errors (will fail at deployment or at runtime):
- a reference to a component that is not in the project;
- a call to an Integration Procedure that has no active version;
- a reference whose name differs from the component's name only in case (the deployment compares names exactly).
- Warnings (works, but is risky):
- Data Mapper, Integration Procedure or Remote Actions inside a Loop Block (one call per iteration, can hit governor limits);
- HTTP / Rest steps in an Integration Procedure without a Try/Catch Block;
- a Data Mapper Load that receives a record Id but does not use it (no upsert key and no mapping to Id), so it inserts a new record instead of updating;
- call cycles between components.
- Cleanup:
- Data Mappers and Integration Procedures that nothing uses;
- other components with no connections at all;
- old inactive versions next to the active one.
Click an issue to select the component in the graph. The tab also shows how many components of each type the project has.
Click the StudioGraph icon in the Activity Bar. The Current File view follows the file you are editing and shows its component: impact numbers, health check issues, and the direct Used by and Uses lists with the reference mechanism. Click any entry to select it in the graph. The buttons at the top open the graph for the current file and export an impact report. When the focus moves to the panel or another view, the sidebar keeps the last component.
In the editor
- CodeLens above a component file (Apex, LWC, OmniStudio, Flow):
used by · change affects, uses · depends on, the number of issues, and report. Click to open the component in the graph.
- Hover over a component or field name anywhere in your code or metadata (for example
CustomerService or Account.Name) to see its impact numbers, with Show in Graph and Impact Report links.
- Right-click in the editor: Find Usages, Show in Graph, Export Impact Report. Show in Graph is also in the editor title bar and the Explorer context menu.
Impact reports
Export Impact Report (from the details panel, CodeLens, hover or the context menu) creates a report of everything that uses the component and everything it depends on, level by level, with file paths and issues. Choose Markdown (code reviews, tickets), CSV (Excel) or JSON (other tools). The report opens as a new unsaved document.
Retrieve from Org
Retrieve from Org (panel button or Command Palette) lists the orgs authorized in Salesforce CLI, retrieves OmniStudio, Apex, LWC, Flow and custom object metadata from the one you pick, and shows its graph. The metadata is stored in the extension's private storage folder; your project files are not changed. Back to Project switches the panel back.
Org dependencies
Salesforce itself tracks dependencies between Apex classes, triggers, LWC, Flows and custom fields (Tooling API, MetadataComponentDependency). Load Dependencies from Org (Settings tab or Command Palette) reads them from an org and adds the ones the files do not show, for example fields used through relationships or components that are not in the project. Added connections are dashed in the graph; components that exist only in the org have a dotted border and are never reported as missing. The data is kept for the workspace until you refresh or remove it in the Settings tab. OmniStudio components are not part of this org data.
What StudioGraph detects
| Component |
References detected |
| OmniScript, Integration Procedure |
Data Mapper actions, Integration Procedure actions, Remote Actions (Apex), custom LWCs, embedded OmniScripts, embedded FlexCards (cf<Card>) |
| Data Mapper |
object fields it reads, writes and filters on (including Extract aliases), Apex functions in formulas (FUNCTION('Class', ...)) |
| FlexCard |
data sources (Integration Procedure, Data Mapper, Apex), child and flyout cards, custom LWCs, OmniScript actions, fields in SOQL data sources |
| Apex class, trigger |
other classes, Integration Procedures called through executeIntegrationProcedure or by their Type_SubType key, fields in SOQL queries |
| LWC |
Apex imports, child components, c/ imports, schema field imports, embedded FlexCards |
| Flow |
Apex actions, Integration Procedure actions, subflows, fields in record lookups, creates and updates |
| Named / External Credential |
Integration Procedure HTTP actions and Apex callout: endpoints use the Named Credential; the Named Credential uses its External Credential |
| Lightning Page (FlexiPage) |
FlexCards, OmniScripts, Flows, LWC and Aura components placed on the page; Dynamic Forms fields |
| Custom Label |
used by Apex (Label.X), LWC (@salesforce/label/c.X), Aura and Flow ($Label.X), OmniScripts and FlexCards ($Label.X, {Label.X}) |
| Platform Event |
published by Apex (new X__e), Flows (create records) and Data Mapper Loads; subscribed by triggers, platform-event Flows and LWC (/event/X__e) |
| Custom Metadata Type |
read by Apex, Flows, Data Mappers, FlexCard data sources and LWC (X__mdt); its records are searchable |
| Aura component |
Apex controller, parent component, events, child Aura components and LWC (<c:name>), labels; placed on Lightning pages |
| Permission Set, Permission Set Group, Profile |
access to Apex classes, fields, record types, Custom Metadata Types, Flows and External Credential principals that are in the graph; group members; profile layout assignments |
| Page Layout |
fields on the layout; profiles that assign it |
| Validation Rule |
fields of its object used in the formula, labels and Custom Metadata Types |
| Record Type |
picklists it restricts; Apex lookups by developer name (getRecordTypeInfosByDeveloperName().get('X')); profiles and Permission Sets that grant or assign it |
| Formula and roll-up field |
fields of the same object used in the formula; the summarized child field |
| Quick Action |
the Flow, LWC or Aura component it runs and the fields of its layout; page layouts that show the action |
| Lightning App, Tab |
apps: custom tabs, utility bar and page overrides; tabs: the Lightning page, LWC or Aura component they open |
| Workflow Rule, Approval Process |
fields in the criteria and formula; fields the rule updates (Process Builder processes are Flows) |
| Email Template |
merge fields ({!Case.Subject}) and labels; workflow email alerts that send it |
| Sharing Rule |
fields in the criteria of criteria-based rules |
| Decision Matrix, Expression Set, Decision Table |
OmniScript and IP Matrix / Expression Set actions (by name or label), Flow and Apex runDecisionMatrix / runExpressionSet actions; versions belong to their definition; Decision Tables read source object fields |
| Static Resource |
used by LWC (@salesforce/resourceUrl/X), Aura and Visualforce ($Resource.X) and Apex (PageReference.forResource) |
| Visualforce Page, Visualforce Component |
controller and extensions, components, resources, labels, standard-controller merge fields, Lightning Out apps; opened from Apex (Page.X), tabs, Quick Actions, layouts; page access in Permission Sets and Profiles |
| Document Template (Doc Gen) |
the extract and transform Data Mappers and the custom Apex class; read from DataPacks, and from the org's records by Retrieve from Org |
| Global Value Set |
picklist fields that use it; its values are searchable |
| Custom Setting |
Apex (X__c.getInstance(), getOrgDefaults, getValues, getAll), formulas and Flows ($Setup.X__c) |
| Object field |
defined by objects/<Object>/fields/*.field-meta.xml (or objects/<Object>.object from the org), so custom fields appear even when nothing uses them; standard fields appear when referenced |
SOQL fields are read from the SELECT list, WHERE conditions and ORDER BY / GROUP BY, for the queried object only. Names are matched case-insensitively, as Salesforce does. Several versions of the same Integration Procedure or OmniScript are shown as one component.
- SFDX: folders from
packageDirectories in sfdx-project.json (source format from sf project retrieve start), and Metadata API folders.
- Vlocity DataPacks: exports from Vlocity Build Tool or the Vlocity VS Code extension, for native OmniStudio and for the
vlocity_cmt, vlocity_ins and vlocity_ps managed packages. DataPacks folders are detected automatically up to 4 levels deep; the vlocity.projectPath setting is used too.
Both formats can be in the same project: the same component in both is shown once. A FlexCard's compiled LWC (cf<Card>) is recognized as the card itself, not as a separate LWC.
Settings
Most settings can be changed in the panel's Settings tab, which saves them to the project's .vscode/settings.json:
- Metadata sources: enable or disable detected folders and add your own (
studiograph.sfdxPaths, studiograph.dataPackPaths, studiograph.excludedSources).
- Type colors (
studiograph.colors).
- Graph: default number of levels (
studiograph.defaultDepth) and whether to show object fields (studiograph.showFields).
- Refresh: refresh the graph after a metadata file changes (
studiograph.autoRefresh).
- Editor: CodeLens (
studiograph.enableCodeLens) and hovers (studiograph.enableHover).
To change the Ctrl+Alt+G shortcut, open Keyboard Shortcuts (Ctrl+K Ctrl+S) and search for @command:studiograph.open, or click change in the Settings tab.
Commands
| Command |
What it does |
| StudioGraph: Open Graph |
Ctrl+Alt+G: the Dependency Graph, focused on the component of the current file when there is one |
| StudioGraph: Find Usages |
searches for the selection or the name under the cursor |
| StudioGraph: Show in Graph |
selects the component of the current file in the graph |
| StudioGraph: Export Impact Report |
impact report for the component of the current file |
| StudioGraph: Retrieve from Org |
retrieves metadata from an org and shows its graph |
| StudioGraph: Load Dependencies from Org |
adds the org's dependency data to the project graph |
| StudioGraph: Clear Index Cache |
rebuilds the index from scratch |
Requirements
- VS Code 1.90 or later.
- For Retrieve from Org only: Salesforce CLI (
sf) and an authorized org (sf org login web).
Privacy
StudioGraph reads your files locally and sends nothing over the network. Retrieve from Org connects only to your own org, through sf, using your existing login. The index cache is stored in VS Code's private storage for the workspace, outside your repository.
| |