Skip to content

Post-Install Checklist

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.

When you install the OrgGuard package, the PostInstall handler runs as the automated process user and does all of the following:

StepWhat it does
Permission set auto-assignmentAssigns 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 initializationCreates the singleton OrgGuard_Setup__c org-defaults record, marked incomplete until the wizard finishes.
Discovery schedulerSchedules the nightly discovery job at 2 AM in your org’s timezone (job name: OrgGuard Daily Discovery).
Notification processorSchedules the hourly notification dispatcher (job name: OrgGuard Notification Scheduler).
Data retention batchSchedules the daily retention purge at midnight (job name: OrgGuard Data Retention).
Log-level mode checkerSchedules the hourly log-level expiry checker (job name: OrgGuard Log Level Checker).
Scheduled Job Health pollThe 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 policiesSeeds 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.

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.

  1. Navigate to Setup → Permission Sets.
  2. 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
  3. Click Manage Assignments in the top-right.
  4. Click Add Assignment, select the users, click NextAssign.

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.

  1. Navigate to Setup → Users → click your name.
  2. Scroll to Permission Set Assignments.
  3. 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.

Who can do this: Salesforce admin.

  1. Navigate to Setup → Scheduled Jobs.
  2. Look for these five OrgGuard-prefixed jobs:
    • OrgGuard Daily Discovery — runs at 2 AM org-time
    • OrgGuard Notification Scheduler — runs hourly at :00
    • OrgGuard Data Retention — runs at midnight
    • OrgGuard Log Level Checker — runs hourly at :15
    • OrgGuard 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 Poll is 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.
SymptomLikely causeFix
OrgGuard Admin permset not auto-assigned to meNon-fatal warning during install (rare) — the install handler logs to System.debug and continuesManually assign via Setup → Permission Sets → OrgGuard Admin → Manage Assignments → Add Assignment
One or more OrgGuard ... scheduled jobs missing from Setup → Scheduled JobsCron registration race during installRun OrgGuardPostInstall.scheduleDefaultDiscoveryJob() (and siblings) from anonymous Apex; or re-install/upgrade the package
OrgGuard app launcher entry doesn’t appearPermission set assigned to user without app visibilityOrgGuard 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 tabPolicy 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 DashboardWrong default landing tabVerify <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.