Post-Install Checklist
Overview
Section titled “Overview”OrgGuard’s PostInstall handler runs every time you install or upgrade the package. Most of the post-install configuration happens automatically — this page documents what’s automated and what to verify afterward.
What runs automatically on fresh install
Section titled “What runs automatically on fresh install”When you install the OrgGuard package, the PostInstall handler runs as the automated process user and does all of the following:
| Step | What it does |
|---|---|
| Permission set auto-assignment | Assigns the OrgGuard Admin permission set to the user who clicked Install (i.e. you). Idempotent — re-installing or upgrading doesn’t create duplicate assignments. |
| Setup record initialization | Creates the singleton OrgGuard_Setup__c org-defaults record, marked incomplete until the wizard finishes. |
| Discovery scheduler | Schedules the nightly discovery job at 2 AM in your org’s timezone (job name: OrgGuard Daily Discovery). |
| Notification processor | Schedules the hourly notification dispatcher (job name: OrgGuard Notification Scheduler). |
| Data retention batch | Schedules the daily retention purge at midnight (job name: OrgGuard Data Retention). |
| Log-level mode checker | Schedules the hourly log-level expiry checker (job name: OrgGuard Log Level Checker). |
| Scheduled Job Health poll | The OrgGuard SJH Daily Poll Schedule-Triggered Flow auto-schedules itself (daily at 6 AM) to drive consecutive-failure detection. (Not scheduled by the install handler — the flow schedules itself.) |
| Default policies | Seeds two default Scheduled Job Health policies: Inactive Job Owner and Job Failure Threshold. |
What you’ll see when you open the OrgGuard app
Section titled “What you’ll see when you open the OrgGuard app”Click the App Launcher → OrgGuard. You’ll land on the Dashboard tab — that’s the default landing page for the app, configured at the package level.
If for any reason you land on a different tab, that’s a regression — file a bug.
Common tasks
Section titled “Common tasks”Assign OrgGuard to additional users
Section titled “Assign OrgGuard to additional users”Who can do this: Salesforce admin (System Administrator profile or any profile with Manage Permission Sets enabled).
Prerequisites: The other users already have Salesforce licenses in your org.
- Navigate to Setup → Permission Sets.
- Click the permission set that matches the user’s role:
- OrgGuard Admin — full control (manage policies, trigger scans, configure settings)
- OrgGuard User — day-to-day governance work (read assets, triage findings)
- OrgGuard Auditor — read-only across all governance surfaces
- Click Manage Assignments in the top-right.
- Click Add Assignment, select the users, click Next → Assign.
Expected result: Selected users now have access to the OrgGuard app and its tabs.
See Permission Sets for the full role-mapping reference.
Verify the permission set was auto-assigned to you
Section titled “Verify the permission set was auto-assigned to you”Who can do this: Anyone — useful as a sanity check after install.
- Navigate to Setup → Users → click your name.
- Scroll to Permission Set Assignments.
- Confirm OrgGuard Admin is in the list.
Expected result: The assignment exists with the date you installed the package.
If it’s missing: the auto-assignment is non-fatal — PostInstall logs a warning and continues. You can assign it manually using the steps above.
Verify the scheduled jobs are running
Section titled “Verify the scheduled jobs are running”Who can do this: Salesforce admin.
- Navigate to Setup → Scheduled Jobs.
- Look for these five
OrgGuard-prefixed jobs:OrgGuard Daily Discovery— runs at 2 AM org-timeOrgGuard Notification Scheduler— runs hourly at :00OrgGuard Data Retention— runs at midnightOrgGuard Log Level Checker— runs hourly at :15OrgGuard SJH Daily Poll— runs daily at 6 AM (a Schedule-Triggered Flow)
Expected result: All five appear with Next Scheduled Date set to a future time. (The first four are Apex jobs scheduled by the install handler; OrgGuard SJH Daily Poll is a Schedule-Triggered Flow that activates and schedules itself on install.)
Recovery if something is missing:
- One of the four Apex jobs is missing — re-install or upgrade the OrgGuard package; the install handler re-schedules the Apex jobs it owns.
OrgGuard SJH Daily Pollis missing — it’s a flow, not handler-owned, so re-installing won’t recreate it via the handler. Open Setup → Flows → OrgGuard SJH Daily Poll, confirm it’s Active, and verify a scheduled run appears under Setup → Scheduled Jobs.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
| OrgGuard Admin permset not auto-assigned to me | Non-fatal warning during install (rare) — the install handler logs to System.debug and continues | Manually assign via Setup → Permission Sets → OrgGuard Admin → Manage Assignments → Add Assignment |
One or more OrgGuard ... scheduled jobs missing from Setup → Scheduled Jobs | Cron registration race during install | Run OrgGuardPostInstall.scheduleDefaultDiscoveryJob() (and siblings) from anonymous Apex; or re-install/upgrade the package |
| OrgGuard app launcher entry doesn’t appear | Permission set assigned to user without app visibility | OrgGuard Admin / User / Auditor permsets all grant app visibility — confirm assignment via Setup → Users → [user] → Permission Set Assignments |
| Default policies (Inactive Job Owner, Job Failure Threshold) missing from Policies tab | Policy seed failed during install (non-fatal — logged to System.debug) | Recreate via the Policies tab (+ New Policy → choose Scheduled Job Health module), or re-run the install handler |
| App opens to a tab other than Dashboard | Wrong default landing tab | Verify <defaultLandingTab>OrgGuard_Dashboard</defaultLandingTab> is set in the OrgGuard application — should be on every install since 0.1.0-5 |
Q: Does the permset auto-assignment apply to all users in my org?
No — only to the user who clicked Install (you). Auto-assigning to all users is considered hostile by admins. Assign to other users manually using Manage Assignments.
Q: What if I uninstall and reinstall — will the permset be re-assigned?
Yes. Each fresh install runs the auto-assignment, but it’s idempotent — if the assignment already exists, no duplicate is created.
Q: Can I disable the auto-assignment?
Not from the package side — it’s part of the install handler. If your organization has a policy against managed packages auto-assigning permission sets, the install handler will still try to assign on install but the assignment is harmless and easy to revoke (Setup → Permission Sets → OrgGuard Admin → Manage Assignments → Del).
Q: The install ran but I see no scheduled jobs — what gives?
Most likely you installed in a sandbox or scratch org with Apex Scheduled Jobs disabled at the org level. Confirm via Setup → Scheduled Jobs; if you can’t see the page at all, the feature is unavailable in that org. OrgGuard requires Scheduled Apex; this is a Salesforce platform feature, not OrgGuard-specific.
Q: Where can I see what the install handler did?
The install handler runs as the Automated Process user. To capture its activity, enable Apex debug logs for that user before re-installing or upgrading: Setup → Debug Logs → New, set the traced entity to the Automated Process user, then re-trigger the install. Failed steps in the handler also surface as System.debug(LoggingLevel.ERROR, ...) lines in the captured log.
Related
Section titled “Related”- Permission Sets — full role-mapping reference
- Scheduled Jobs — what each scheduled job does
- Setup Wizard — the post-install configuration flow
- Upgrading OrgGuard (Beta) — moving to a newer beta build (uninstall → reinstall)