EncompassFi has created a simple and quick way to get from company creation to going live. There are three phases for this process:

1. **Company Setup**: Creation of entities through our API: company, workplaces, pay schedules, earning codes, employees, and contractors. For
companies that have run a payroll in the year they are switching to EncompassFi as a provider, historical payroll data from their previous
provider(s) will also need to be collected.
2. **Company Onboarding**: Before a company can go live, the will need to: connect their withdrawal bank account, complete their tax setup (tax ids
and rates), and sign any authorization forms required.
3. **Company Implementation**: Once company setup and onboarding has been completed, the company will submit themselves for review where our automated
and manual systems will perform identity verifications and historical payroll audits to ensure a smooth transition.


We are currently working on releasing webhooks to provide real-time updates on onboarding and
implementation status changes. 

## Company Setup

In order for EncompassFi to process payrolls, remit taxes, and submit tax filings with state and federal governments, we will need to gather
information about the company.

### Company

We will first need to collect information about the company entity itself. This can be done using the `Create Company`
and `Start Payroll` endpoints.

Each company is a separate tax entity with a single Employer Identification Number (EIN). Your customer may own multiple companies under a single
brand (e.g. Restaurants or franchises) or multiple companies under separate brands. Each company must be created separately but they can be associated
with each other through a corporation entity in the EncompassFi API.

### Workplaces

EncompassFi needs to know the physical location where the employee does their work. This can be a office location or the employee's residential
address (if they work from home). Workplace address is ofter the same as the company address but many companies are registered at a different location
than their workers work from. Companies can have multiple workplaces in multiple states. See more
on [workplaces](/guides/payroll/working_with_payroll/core_concepts/workplaces).

### Departments

Departments are not required but is a great tool for organizing the company's workforce. Departments can be used to groups employees and contractors
in reporting, for quicker workforce management, or to filter workers when running payroll. Departments can be associated with a workplace if
necessary. See more on [workplaces](/guides/payroll/working_with_payroll/core_concepts/departments).

### Pay Schedules

While not strictly required, we recommend always creating a pay schedule to aid in tracking upcoming paydays and prevent incorrect dates from being
entered for a payroll's payday or pay period. Pay schedules will also take into account all banking holidays that could delay a payroll. A list of
paydays can be retrieved from a pay schedule to fetch the pay period, approval deadline, and payday for any upcoming payroll. See more
on [pay schedules](/guides/payroll/working_with_payroll/core_concepts/pay-schedules).

### Earning Codes

Earning codes are custom earning types. Some companies may want to separate commissions (or other earning types) based on some criteria. Earning codes
can be the way to keep otherwise identical earning types separate in reporting and on paystubs. Earning codes are required if the company needs to
submit historical payrolls and those payrolls contain their previous provider's equivalent of earning codes, even if the company will no longer pay
under those earnings. See more on [earning codes](/guides/payroll/working_with_payroll/core_concepts/earning-codes).

### Employees

Employees are persons whom are paid on a W2. The employee object contains information for EncompassFi to understand where to send direct deposits to,
who to remit taxes for and generate tax documents for, and defaults for wage, electronic W2 consent, and more. See more on [employees]
(employee-onboarding.md).

### Contractors

Contractors are persons or businesses whom are paid on a 1099. The contractor object contains information for EncompassFi to understand where to send
direct deposits to, who to remit taxes for and generate tax documents for, and defaults for wage, electronic W2 consent, and more. See more
on [contractors](/guides/payroll/onboarding_and_setup/contractor-onboarding).

## Company Onboarding

EncompassFi provides an onboard object to understand the company's state within the onboarding pipeline. Once a company's onboard status is
`Completed` or `NeedsAttention`, the company will be eligible for review.

```json
{
  "$ref": "#/components/schemas/CompanyOnboard",
  "components": {
    "schemas": {
      "OnboardStatus": {
        "enum": [
          "Blocking",
          "NeedsAttention",
          "Completed"
        ],
        "type": "string"
      },
      "CompanyOnboardItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/OnboardStatus"
          }
        },
        "additionalProperties": false
      },
      "CompanyOnboard": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/OnboardStatus"
          },
          "blockingSteps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "remainingSteps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "bankAccount": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "setupParameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyOnboardItem"
            },
            "nullable": true
          },
          "filingAuthorizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyOnboardItem"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}
```

### Onboarding Status

- **Blocking**: The company has not completed required items to go live and run payroll such as: no withdrawal bank account connected or unsigned
authorization forms.
- **NeedsAttention**: The company has outstanding items to complete that are not required to run payroll but may affect the ability for EncompassFi to
accurately calculate or to remit taxes. E.g. For a company that has applied for their state's unemployment tax id and has not yet received it,
EncompassFi may not be able to remit those taxes but may collect based on the default rate for the state.
- **Completed**: The company has no outstanding items pending and can run payroll without issues.


## Company Implementation

EncompassFi provides an implementation object to understand the company's state within the implementation pipeline. Once a company's implementation
status is `Completed`, the company will be able to run payroll.

```json
{
  "$ref": "#/components/schemas/CompanyImplementation",
  "components": {
    "schemas": {
      "ImplementationStatus": {
        "enum": [
          "NeedsAttention",
          "InReview",
          "Completed"
        ],
        "type": "string"
      },
      "ImplementationKybStatus": {
        "enum": [
          "NotInitiated",
          "InReview",
          "Denied",
          "FourDayApproved",
          "TwoDayApproved"
        ],
        "type": "string"
      },
      "CompanyImplementationKyb": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ImplementationKybStatus"
          }
        },
        "additionalProperties": false
      },
      "CompanyImplementationSteps": {
        "type": "object",
        "properties": {
          "kyb": {
            "$ref": "#/components/schemas/CompanyImplementationKyb"
          }
        },
        "additionalProperties": false
      },
      "CompanyImplementation": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ImplementationStatus"
          },
          "remainingSteps": {
            "$ref": "#/components/schemas/CompanyImplementationSteps"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
```

### Implementation Status

Implementation status describes whether the company is being reviewed or a review has been completed. Once the status is set to completed, the KYB
status can be used to determine if the company was approved or denied.

br
- **NeedsAttention**: The company has not been submitted for review.
- **InReview**: The company has been submitted for review and EncompassFi is performing verifications and audits as necessary.
- **Completed**: The implementation process is completed and the company can run payrolls.


### KYB Status

KYB status is one of the factors that determine if a company has completed implementation. This means that there are instances in which a company’s
KYB status shows as approved, but the implementation status is still `InReview` or `NeedsAttention`.

br
- **NotInitiated**: Company verifications have not been initiated.
- **InReview**: The company has been submitted for review and EncompassFi is performing verifications and audits as necessary.
- **Denied**: The company has been rejected and cannot process payrolls with EncompassFi. This can be appealed if certain circumstances.
- **FourDayApproved**: The company has been approved for a four-day processing timeline. This can be upgraded to two-day processing based on provided
financial documentation review.
- **TwoDayApproved**: The company has been approved for a two-day processing timeline. Some companies may automatically be upgraded to two-day
processing.


## EIN Verification

To reduce fraud EncompassFi performs automatic KYB checks for all companies created with a FEIN. We will only begin processing if we have both of
these values. When either one of these values is updated, processing will begin again automatically.

br
**Triggering EIN Verification**

1. Create a company with the correct legal name
2. Set that company's federal EIN value


## Bank Account Validation

There are two ways a company, employee, or contractor can connect their bank accounts:

1. By using Plaid's bank connections (Plaid bank account)
2. By providing the routing and account numbers (Raw bank account)


br
**Plaid Bank Accounts**

These accounts are automatically validated by Plaid and is th most seamless way to connect bank accounts.

br
**Raw Bank Account**

These accounts are automatically validated using a $0 ACH payments that are not visible to the account holder. This process typically takes up to
2 banking days. The bank account is assumed valid unless the $0 transaction fails.