Skip to main content

ContractorListFlow

Hub for viewing and managing a company's contractors, including onboarding new ones.

Remarks

Drop-in entry point for browsing a company's contractors. Begins on the management contractor list and routes into DashboardFlow when the admin selects "View details" on a row, or directly into the Profile step of contractor onboarding — the same Profile → Address → Payment Method → New Hire Report → Submit sequence used by OnboardingFlow — when the admin clicks "Add contractor" or selects "Continue"/"Review" on an onboarding-tab row. A "Back to contractors" header is added above the dashboard; the onboarding steps show their own progress header instead, matching OnboardingFlow's own screens exactly. Submitting, or cancelling from any step, returns to this list.

"Dismiss" and "Rehire" have no corresponding sub-flow yet and are not handled internally — they continue to fire their documented events (contractor/dismiss, contractor/rehire) straight through onEvent for the host app to handle, exactly as they do outside this flow.

The flow forwards every event emitted by its blocks to onEvent; see the events table on each block for the full set of events and payloads observable from this flow.

Example

App.tsx
import { ContractorManagement } from '@gusto/embedded-react-sdk'

function MyApp() {
return (
<ContractorManagement.ContractorListFlow
companyId="a007e1ab-3595-43c2-ab4b-af7a5af2e365"
onEvent={() => {}}
/>
)
}

ContractorListFlowProps

Props for ContractorListFlow.

PropertyTypeDescription
companyIdstringThe associated company identifier.
onEventOnEventType<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.

Inherits children, className, defaultValues, dictionary, FallbackComponent, LoaderComponent from BaseComponentInterface.

Sub-components

ComponentDescription
ContractorListRenders a tabbed list of a company's contractors split across Active, Onboarding, and Dismissed tabs, with per-row actions tailored to each tab (edit, delete, view details, dismiss, rehire, cancel a scheduled dismissal or rehire).
DashboardFlowHub for viewing and managing a single contractor's details, pay, and documents.
ContractorOnboarding.ContractorProfileForm for creating or editing a contractor profile, supporting both individual and business contractor types.
ContractorOnboarding.AddressForm for collecting and updating a contractor's mailing address. Renders a business or home address title based on the contractor type.
ContractorOnboarding.PaymentMethodManages a contractor's payment method, capturing a bank account for direct deposit or recording check as the payment method.
ContractorOnboarding.NewHireReportCollects new hire reporting information for a contractor and persists it to the contractor record.
ContractorOnboarding.ContractorSubmitFinalizes contractor onboarding by updating the onboarding status, and in the self-onboarding flow can trigger an invitation to the contractor.

Step flow

The flow rests on the management contractor list and routes into one of two destinations based on the row action invoked (or the "Add contractor" CTA):

  • View details (contractor/view) → DashboardFlow
  • Add contractor (contractor/create) or an onboarding-tab row's Edit/Continue/Review (contractor/update) → directly into the Profile step of contractor onboarding

The Profile-entry path reuses the exact same Profile → Address → Payment Method → New Hire Report → Submit step sequence documented in full (including its self-onboarding and new-hire-report branching) on ContractorOnboarding.OnboardingFlow's own page — this flow spreads those same states into its own machine rather than mounting OnboardingFlow as a nested component, so there's a single header per screen (the onboarding steps' own progress header, not a second "Back to contractors" bar) and cancelling or submitting from any step returns straight to this list, not to OnboardingFlow's separate internal one.

The dashboard is given a "Back to contractors" header that emits contractor/returnToList to come back to the list.

"Dismiss" (contractor/dismiss) and "Rehire" (contractor/rehire) have no corresponding sub-flow yet. They fire their documented events straight through to the host app, exactly as ContractorList does on its own outside this flow.

Endpoints