Company Onboarding

Overview

The Company Onboarding workflow provides components for managing company-related onboarding tasks. These components can be used individually or composed into a complete workflow.

Using Company Subcomponents

Employee onboarding components can be used to compose your own workflow, or can be rendered in isolation. For guidance on creating a custom workflow, see docs on composition.

Available Subcomponents

  • Company.IndustrySelect
  • Company.DocumentSigner
  • Company.FederalTaxes
  • Company.PaySchedule

Company.DocumentSigner

Provides an interface for company representatives to read and sign required company documents. The component handles document listing, signatory management, and document signing workflow.

import { Company } from '@gusto/embedded-react-sdk'

function MyComponent() {
  return (
    <Company.DocumentSigner companyId="a007e1ab-3595-43c2-ab4b-af7a5af2e365" onEvent={() => {}} />
  )
}

Props

NameTypeDescription
companyId (Required)stringThe associated company identifier.
signatoryIdstringID of the signatory. When this is set and it matches the signatory ID of the currently saved signatory it is assumed the user is the signatory. This means fields are pre populated in the signature form with their information and they are able to sign documents.
onEvent (Required)See events table for available events.

Events

Event typeDescriptionData
COMPANY_VIEW_FORM_TO_SIGNFired when a user selects a form to sign from the document listCalled with response from get company form endpoint
COMPANY_FORM_EDIT_SIGNATORYFired when user requests to change the document signatoryCalled with response from create signatory endpoint
COMPANY_FORMS_DONEFired when user completes the document signing processNone
COMPANY_SIGN_FORMFired when a form is successfully signedResponse from the sign company form API request
COMPANY_SIGN_FORM_DONEFired when the form signing process is completeNone
COMPANY_SIGN_FORM_BACKFired when user navigates back from the signature formNone
COMPANY_ASSIGN_SIGNATORY_MODE_UPDATEDFired when the signatory assignment mode changes (create/invite)Mode string ('create_signatory' or 'invite_signatory')
COMPANY_ASSIGN_SIGNATORY_DONEFired when the signatory assignment process is completeNone
COMPANY_SIGNATORY_CREATEDFired when a new signatory is created successfullyResponse from the create signatory API request
COMPANY_SIGNATORY_UPDATEDFired when an existing signatory is updated successfullyResponse from the update signatory API request
COMPANY_SIGNATORY_INVITEDFired when a signatory is successfully invited to the companyResponse from the invite signatory API request

Company.FederalTaxes

A component for adding company federal tax information including EIN, tax payer type, filing form, and legal name.

import { Company } from '@gusto/embedded-react-sdk'

function MyComponent() {
  return (
    <Company.FederalTaxes companyId="a007e1ab-3595-43c2-ab4b-af7a5af2e365" onEvent={() => {}} />
  )
}

Props

NameTypeDescription
companyId (Required)stringThe associated company identifier.
defaultValues{ legalName?: string taxPayerType?: string filingForm?: string }Default values for the company federal taxes form fields. If company data for these fields is available via the API, defaultValues will be overwritten.
onEvent (Required)See events table for available events.

Events

Event typeDescriptionData
COMPANY_FEDERAL_TAXES_UPDATEDFired when federal tax details are successfully updatedResponse from the update federal tax details API request
COMPANY_FEDERAL_TAXES_DONEFired when the federal tax update process is completeNone

Company.PaySchedule

A component for managing company pay schedules, including creating, editing, and viewing pay schedules with preview functionality.

import { Company } from '@gusto/embedded-react-sdk'

function MyComponent() {
  return <Company.PaySchedule companyId="a007e1ab-3595-43c2-ab4b-af7a5af2e365" onEvent={() => {}} />
}

Props

NameTypeDescription
companyId (Required)stringThe associated company identifier.
defaultValues{ frequency?: string (one of Every Week, Every other week, Twice per month, or Monthly), anchorPayDate?: string, anchorEndOfPayPeriod?: string, day1?: number, day2?: number, customName?: string }Default values for the pay schedule form fields. If company data for these fields is available via the API, defaultValues will be overwritten.
onEvent (Required)See events table for available events.

Events

Event typeDescriptionData
PAY_SCHEDULE_CREATEDFired when a new pay schedule is successfully createdResponse from the create pay schedule API request
PAY_SCHEDULE_UPDATEDFired when an existing pay schedule is successfully updatedResponse from the update pay schedule API request