OnboardHub is a Salesforce-native, post-sale customer onboarding / implementation console. It's built entirely on the Salesforce platform — custom schema, bulk-safe Apex triggers with test coverage, Lightning Web Components, declarative automation (Flow), and a Platform Event — as a portfolio companion to an ADM-201 certification.
It also models the real Salesforce side of the SyncBridge integration project: it produces Closed-Won Opportunities and publishes an event the moment onboarding begins, which is the seam an external integration subscribes to.
- Sales closes a deal →
Opportunity.StageName = 'Closed Won'. OpportunityTriggerfires →OpportunityTriggerHandlerdetects the stage transition and callsOnboardingService, which creates oneOnboarding__crecord for the Account plus five templatedOnboarding_Task__cchildren (Kickoff call, Data migration, Config & setup, User training, Go-live sign-off).- On creation,
OnboardingServicepublishes anOnboarding_Created__eplatform event — this is the seam SyncBridge subscribes to in order to provision the customer in an ERP. - Consultants work the onboarding in the
onboardingConsoleLWC: filter by All / My Onboardings / At Risk, see health/status/progress, expand a card, and check off tasks. Onboarding_Health_Watchdog, a record-triggered Flow, flipsHealth__ctoAt Riskwhenever the go-live date has passed and the onboarding isn'tComplete.
Schema
Onboarding__c(Lookup → Account, Lookup → Opportunity, Lookup → User) — Status, Health, Go-Live Date, Deal Amount, Apex-maintained Progress %. Auto-numberedONB-{00000}. List views: All Onboardings, My Onboardings, At Risk.Onboarding_Task__c(Master-Detail → Onboarding__c) — Status (Open/Done), Sequence, Due Date.Onboarding_Created__e(Platform Event, high-volume) — Account Id, Opportunity Id, Onboarding Id, Amount, all as flat text/number so any external subscriber (Salesforce or otherwise) can consume it without joins.
Apex (force-app/main/default/classes, .../triggers)
OpportunityTrigger→ thin, delegates toOpportunityTriggerHandler.OpportunityTriggerHandler→ detects Closed-Won transitions in bulk, callsOnboardingService.OnboardingService→ creates Onboarding + Task records, publishes the platform event viaEventBus.publish(), and recalculatesProgress__cfrom task completion. Fully bulk-safe: no SOQL/DML inside loops, dedupes by querying existing onboardings once per call.OnboardingTaskTrigger/OnboardingTaskTriggerHandler→ on insert/update/delete of a task, recalculates the parent's Progress__c.OnboardingController→@AuraEnabled(cacheable=true) getOnboardings(filterName)and@AuraEnabled completeTask(taskId)for the LWC.- Test classes (
OpportunityTriggerHandlerTest,OnboardingServiceTest,OnboardingControllerTest) cover single-record and 200-record bulk paths, the idempotency guard (a non-stage Opportunity update must not create a duplicate onboarding), progress math, event publishing (Test.getEventBus().deliver()+EventBus.TestUtils.getPublishedFieldValues), and controller reads/writes.
LWC (force-app/main/default/lwc)
onboardingConsole— main console, placed on theOnboardHub_HomeLightning App Page. Filter tabs, cards with status/health badges, progress bar, expandable task checklist that callscompleteTaskand refreshes viarefreshApex.onboardingProgressBar— small reusable child component rendering a color-coded percentage bar.
Automation
Onboarding_Health_Watchdog— record-triggered Flow onOnboarding__c(after save, create/update). One decision, one "update triggering record" element:Go_Live_Date__c < TODAY() AND Status__c != 'Complete'→Health__c = 'At Risk'.
App shell & access
- Custom Lightning app OnboardHub with tabs for the
OnboardHub_Homeapp page, Onboardings, Onboarding Tasks, Accounts, and Opportunities. - Permission set OnboardHub_Admin grants object/field access on both custom objects, tab visibility, and Apex class access to
OnboardingController.
- Install the Salesforce CLI: https://developer.salesforce.com/tools/salesforcecli
- Log into your free Developer Edition org and alias it:
sf org login web -a onboardhub - Deploy the project:
sf project deploy start -o onboardhub - Assign yourself the permission set:
sf org assign permset -n OnboardHub_Admin -o onboardhub - Seed demo data (creates accounts, contacts, and opportunities, closes several of them to fire the real automation, and adds status/health variety):
sf apex run -o onboardhub -f scripts/apex/seed.apex - Open the app:
Then launch the OnboardHub app from the App Launcher and open the Home tab.
sf org open -o onboardhub
After these steps the console shows a working system with zero manual clicking: multiple onboardings in different health/status states, one already flagged At Risk by the Flow, one Complete, and one In Progress with two of five tasks already checked off.
sf apex run test -o onboardhub -c -r human
Target is ≥90% overall coverage; the org-wide minimum to deploy with tests is 75%. All Apex is bulk-safe (no SOQL/DML in loops) and was written to handle 200-record batches, matching Salesforce's default trigger batch size.
OnboardHub is the Salesforce-native half of the SyncBridge integration story:
Onboarding_Created__eis the event an external integration (SyncBridge) subscribes to via the Pub/Sub API (or CometD) to know the instant onboarding begins for a customer, so it can provision that customer in an external ERP without polling.- Closed-Won Opportunities are what an external poller queries via a scheduled job or the same event stream, giving SyncBridge the deal context (account, amount) it needs to reconcile Salesforce with the ERP record.
Together, the two projects demonstrate both sides of an event-driven, platform-to-external-system integration: OnboardHub emits real signals from real Salesforce automation, and SyncBridge is the consumer that acts on them.
onboardhub/
sfdx-project.json
.forceignore
README.md
force-app/main/default/
objects/ Onboarding__c, Onboarding_Task__c, Onboarding_Created__e (+ fields, list views)
triggers/ OpportunityTrigger, OnboardingTaskTrigger
classes/ handlers, service, controller, and all *Test classes
lwc/ onboardingConsole, onboardingProgressBar
flows/ Onboarding_Health_Watchdog.flow-meta.xml
flexipages/ OnboardHub_Home (hosts onboardingConsole)
tabs/ Onboarding__c, Onboarding_Task__c
applications/ OnboardHub.app-meta.xml
permissionsets/ OnboardHub_Admin
scripts/apex/seed.apex