On this page
- What does a Salesforce org audit check?
- How do I run a Salesforce org audit by hand?
- What does Clientell AI's org audit add?
- How does a finding become a fix?
- Is the audit safe to run on a production org?
- How do I run my first audit?
- Which findings should I fix first?
- Sources
- Common questions about the Salesforce org audit
A Salesforce org audit is a review of your org's permissions, automation, code, data, licenses and change history. It ends with a ranked list of fixes. You can run one by hand with native tools, or let a tool scan the org for you.
Clientell AI, the AI Salesforce admin, runs a read-only org audit and then drafts the fix for each finding. See the org audit use case for the full view. Clientell AI has run 1,000+ org audits.
What does a Salesforce org audit check?
A good audit answers six questions. Each one maps to a page in Setup or an object you can query.
Swipe sideways to see all columns
| Area | The question | Where to look in Salesforce |
|---|---|---|
| Permissions | Who can see and change what? | Profiles, permission sets, PermissionSetAssignment |
| Automation | What runs when a record saves? | Flows, Process Builder, Workflow Rules, Apex triggers |
| Code | Is the Apex tested and safe? | Apex classes, test coverage |
| Data | Are key fields filled and free of duplicates? | Reports on fill rate, duplicate rules |
| Licenses | Are paid seats in use? | Users, Login History |
| Change history | Who changed the setup, and when? | Setup Audit Trail |
Security settings are a seventh check. Salesforce gives you a free tool for that one.
How do I run a Salesforce org audit by hand?
Use these steps in order. You need the System Administrator profile and the Developer Console (Setup > Developer Console).
- Score your security settings. Open Setup > Security > Health Check. Health Check compares your org's security settings to a Salesforce baseline and gives a score (Salesforce Help: Health Check).
- Install Org Check. Salesforce has retired the Optimizer app (Salesforce Help). The Salesforce Admins blog points to Org Check, a free Salesforce Labs app, as the replacement (Salesforce Admins). Org Check analyzes your org and its technical debt (Org Check on GitHub).
- Find unused permission sets. Run the first query below in the Developer Console. SOQL (Salesforce Object Query Language) is how you query Salesforce data.
- Find idle users. Run the second query. Then open Setup > Identity > Login History for the users it returns (Salesforce Help: Login History).
- Export the Setup Audit Trail. Open Setup > Security > View Setup Audit Trail. The page shows only the latest 20 changes. Download the CSV file to see up to 180 days of history (Salesforce Help: Setup Audit Trail).
- Check code coverage. Production deploys need 75% Apex test coverage (Apex Developer Guide).
- List automation by object. Count the flows, rules and triggers on Opportunity, Case and Lead. Two automations that write the same field can overwrite each other.
Here are the two queries.
SELECT Id, Name, Label FROM PermissionSet
WHERE IsOwnedByProfile = false
AND Id NOT IN (SELECT PermissionSetId FROM PermissionSetAssignment)
SELECT Name, Username, LastLoginDate, Profile.Name FROM User
WHERE IsActive = true AND (LastLoginDate = null OR LastLoginDate < LAST_N_DAYS:90)
Check permission set groups before you delete anything from the first list. A permission set can sit inside a group with no direct assignment.
A manual audit of a mid-size org takes days. The hard part is not the queries. The hard part is closing each finding with a tested change.
What does Clientell AI's org audit add?
Clientell AI runs the same checks in one read-only scan. It lists every finding by area, with the record or setting it names. Then it drafts the fix.
Swipe sideways to see all columns
| Area | What a finding looks like (for example) | Our guide |
|---|---|---|
| Permissions | A permission set with "Modify All Data" and no active users | Permissions audit |
| Automation | Two flows and a trigger that all update Opportunity.StageName | Flow audit |
| Code | An Apex class with no test class and a query inside a loop | Technical debt audit |
| Compliance | A user with "View All Data" who left the team | Compliance audit |
Each finding names who made the change and when, from the Setup Audit Trail. That answers the auditor's question, "who granted this?"
How does a finding become a fix?
Here is an illustrative example, not a real customer.
The audit flags a permission set called Legacy_Service_Tier2. It has no users and grants edit on Case.Status. You ask Clientell AI to clean it up.
- Clientell AI shows what the permission set grants and what still refers to it.
- It drafts the change: remove the permission set.
- It applies the change in your sandbox and tests it.
- You read the result and approve.
- The change goes to production. If something breaks, you roll it back.
The same flow works for a flow merge, a field cleanup or a profile change. You can also run it from Claude Code, Cowork, Codex, Cursor and VS Code through Clientell MCP.
Is the audit safe to run on a production org?
Yes. The scan is read-only. It reads your setup and does not change records.
Changes are a separate step. Clientell AI drafts each change, tests it in a sandbox and asks before it changes anything in production. Platform deployments can roll back. Clientell AI holds SOC 2 Type II, ISO 27001 and HIPAA. See our security and privacy page.
You can also cut access at any time. The connection uses OAuth (the standard way to let an app sign in without sharing your password). A Salesforce admin can revoke it in Setup > Apps > Connected Apps > Connected Apps OAuth Usage.
How do I run my first audit?
- Sign up for the 14-day trial, no card.
- Connect your Salesforce org through the standard Salesforce login screen.
- Read the findings by area. Expected result: a list grouped by Permissions, Automation, Code and Compliance, each with the user or setting it names.
- Pick the fixes with the table below.
Which findings should I fix first?
Rank by risk, then by effort. A finding that exposes every record beats a finding that wastes a seat.
Swipe sideways to see all columns
| Finding | Why first | Typical fix |
|---|---|---|
| A user with "Modify All Data" or "View All Data" who does not need it | Fails an access review, exposes every record | Move the user to a smaller permission set |
| Active users who never log in | Paid seats and open doors | Freeze the user, then deactivate |
| Two automations that write the same field | Causes "the field changed twice" tickets | Merge into one record-triggered flow |
| An Apex class with no test | Low coverage blocks production deploys | Write the test class |
| Unused permission sets | Hides who has what access | Delete after you check groups |
If a fix fails in the sandbox, nothing reaches production. You read the test result and change the plan. If a fix causes trouble after release, roll it back to the saved version, then redo it in the sandbox.
Try it in Clientell AI: "Audit my org in read-only mode and list unused permission sets, idle users and duplicate flows on Opportunity."
Start the free 14-day trial, no card. Clientell Platform runs the audit every week, for $500 a month. Clientell MCP is $249 a month. See pricing.
Common questions about the Salesforce org audit
How often should I audit a Salesforce org?
Run a full audit once a quarter and before any big release or security review. Check permissions every month, because access changes fastest.
Does Salesforce have a built-in org audit?
Partly. Health Check scores security settings, and Org Check from Salesforce Labs lists metadata issues. Neither one drafts or tests a fix for you.
What replaced Salesforce Optimizer?
Salesforce has retired the Optimizer app. Admins now use Org Check, a free Salesforce Labs app.
How far back does the Setup Audit Trail go?
It keeps 180 days of setup changes (Salesforce Help). Export the CSV file each quarter if you need a longer record.
Will Clientell AI change my org during the audit?
No. The audit is read-only. Clientell AI asks before it changes anything in production.
Sources
Salesforce documentation
- Health Check
- Salesforce Optimizer App Retirement
- Optimizer Is Sunsetting: Learn How To Use Org Check
- Org Check on GitHub
- Monitor Setup Changes with Setup Audit Trail
- Login History
- Code Coverage Best Practices
Last reviewed October 2026
Last updated: October 22, 2026




