OnboardingFlow
Guided flow to onboard a company to Gusto.
Remarks
The flow begins on the overview screen and steps through locations, federal taxes, industry, bank account, employee onboarding, pay schedule, state taxes, and document signing before returning to the overview.
Example
import { CompanyOnboarding, type EventType } from '@gusto/embedded-react-sdk'
function MyApp() {
return (
<CompanyOnboarding.OnboardingFlow
companyId="a007e1ab-3595-43c2-ab4b-af7a5af2e365"
onEvent={(eventType: EventType) => {
if (eventType === 'company/overview/done') {
// Onboarding complete — navigate to your next screen
}
}}
/>
)
}
OnboardingFlowProps
Props for the company onboarding flow orchestrator.
| Property | Type | Description |
|---|---|---|
companyId | string | The associated company identifier. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
defaultValues? | RequireAtLeastOne<OnboardingFlowDefaultValues> | Default values applied to individual flow step components (federal taxes, pay schedule). |
Inherits children, className, dictionary, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
company/overview/continue | User chose to continue to the next outstanding onboarding requirement | — |
company/overview/done | User signaled they are done with the overview screen | — |
company/location/done | User completed the locations step | — |
company/federalTaxes/done | User completed the federal taxes step | — |
company/industry/selected | User selected and saved an industry | The saved industry field from the update industry selection API |
company/bankAccount/done | User completed the bank account step | — |
employee/onboarding/done | User completed the embedded employee onboarding sub-flow | — |
paySchedule/done | User completed the pay schedule step | — |
company/stateTaxes/done | User completed the state taxes step | — |
company/forms/done | User completed signing company documents | — |
Each step is also exported as a standalone block (see the Sub-components table) for composing a custom workflow when this orchestration is the wrong fit. See the Composition guide for how to recompose these blocks into your own flow.
Sub-components
| Component | Description |
|---|---|
| OnboardingOverview | Displays the company's overall onboarding status, showing completed steps alongside any remaining requirements. |
| Locations | Orchestrated component for managing a company's mailing and filing addresses. |
| FederalTaxes | Collects company federal tax information including EIN, tax payer type, filing form, and legal name. |
| Industry | Selects and saves the company's industry classification (NAICS code). |
| BankAccount | Manages a company's bank account — adding, viewing, and verifying it. |
| EmployeeOnboarding.OnboardingFlow | Guided flow to onboard multiple employees, one at a time. |
| PaySchedule | Manages a company's pay schedules, including listing existing schedules and creating or editing one. |
| StateTaxes | Orchestrated flow for managing a company's state tax setup. |
| DocumentSigner | Company onboarding step for reading and signing required company documents. |
Step flow
The flow opens on the overview, then runs the linear step sequence below before returning to the overview to finish. Every step is a CompanyOnboarding block except the Employees step, which embeds EmployeeOnboarding.OnboardingFlow and owns its own internal navigation.
Each step is also exported as a standalone block (see the Sub-components table) for composing a custom workflow when this orchestration is the wrong fit. See the Composition guide for how to recompose these blocks into your own flow.