Salesforce Objects Scanner finds the Salesforce objects available to a user, counts their records where Salesforce allows it, and saves the results as an Excel workbook and JSON files.
It is intended for Salesforce administrators, developers, and migration teams who need a starting inventory for cleanup or migration planning. A Salesforce object is similar to a database table: it stores records such as accounts, contacts, or custom business data. The scanner reads from Salesforce but does not change org data.
You need:
- Git
- Python 3.10 or later
- Salesforce CLI,
the
sfcommand-line program used to sign in and send requests to Salesforce - Access to a Salesforce org through a user who can use the API and read the objects you want to count
See Installation if any of these tools are not ready.
Run these commands in a terminal.
git clone https://github.com/b-vamsipunnam/salesforce-objects-scanner-tool.git
cd salesforce-objects-scanner-tool
python -m venv venvA virtual environment keeps this project's Python packages separate from other projects. Activate it before installing anything.
On Windows PowerShell:
.\venv\Scripts\Activate.ps1On Windows Command Prompt:
venv\Scripts\activate.batOn macOS or Linux:
source venv/bin/activatepython -m pip install -r requirements.txtThe command installs Robot Framework, Pabot, and the Excel-writing library in the virtual environment.
sf org login web --alias MyOrgA Salesforce org is a Salesforce environment, such as a production org or
sandbox. The command opens a browser for sign-in. MyOrg is an org alias: a
short local name for that saved login. You can choose another name, but use the
same name in the remaining commands.
Confirm that the alias works:
sf org display --target-org MyOrgThe command should show the selected org without an authentication error. Its output contains sensitive connection information, so do not share it.
robot -d results --variable ORG_ALIAS:MyOrg src/robot/orchestrator/scan.robotAn object scan asks Salesforce for object names and then runs
SELECT COUNT() for each name. The console shows the output workbook path before
the count work begins and prints a summary when the run ends.
Each scan creates a directory under output/:
output/Run_<date-time>_<id>/
|-- json/
|-- pabot/
`-- SF_Objects_<date-time>.xlsx
The .xlsx file is the output workbook. Data Objects contains successful
counts for standard and custom Salesforce objects. Tooling Objects contains
successful counts for development and setup metadata exposed by Salesforce's
Tooling API; these objects are included by default. The workbook also contains
skipped objects and query durations. The json/ directory holds the same report
data for scripts. Robot Framework writes its technical log and report to
results/.
A skipped object is an object that Salesforce discovered but the scanner could
not count. Always review every row in the workbook's Skipped Objects sheet.
A successful Robot Framework run does not mean every discovered object was
countable. A missing count is not zero.
Common credential patterns are redacted from captured errors, but the output can still contain sensitive information about your Salesforce org. Store and share the run directory accordingly. See Usage for every output file and Limitations before using the counts in an assessment.
Salesforce CLI discovers objects and runs the SELECT COUNT() queries. Robot
Framework controls the workflow and reporting, while Pabot, its parallel runner,
runs isolated object batches with test-level splitting. Each generated shard is
one Robot test, so PABOT_PROCESSES controls concurrency and
PABOT_SHARDS_PER_PROCESS controls the number of queued shards per process. See
Architecture for details.
| Guide | What it covers |
|---|---|
| Installation | Prerequisites and local setup |
| Authentication | Salesforce CLI login and permissions |
| Configuration | Robot variables, defaults, and timeouts |
| Usage | Running a scan and reading its output |
| Architecture | Execution flow and component responsibilities |
| Troubleshooting | Common failures and practical fixes |
| Limitations | What the counts do and do not represent |
See CONTRIBUTING.md to work on the project. This project uses the MIT License.