> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lendflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Chart Tax Data

## Chart Tax Data

The **Chart Tax Data** Workflow Builder block starts or resumes an applicant-authorized IRS connection and stores taxpayer data for a business or individual. The current block represents `chart`; tax-record retrieval follows the established connection flow.

## Requirements

### Chart Taxpayer Data

| Application field | Requirement | Notes |
| - | - | - |
| Linked Chart account | Required | Must be completed before taxpayer data can be retrieved. |

### Chart Tax Records

| Application field | Requirement | Notes |
| - | - | - |
| Linked Chart account | Required | Must be completed before tax records can be retrieved. |
| Stored Chart taxpayer data | Required | Must be available from the completed taxpayer-data retrieval. |

## Execution flow

Chart is an applicant-connection service, so use the Workflow Builder or Borrower Platform connection flow:

1. Add **Chart Tax Data** to the applicable business or individual underwriting entity.
2. Publish the workflow.
3. When no active token exists, Lendflow creates a client link.
4. The applicant follows the link and authorizes access to IRS data.
5. The callback supplies an authorization `code` or token metadata.
6. Lendflow stores the token, fetches taxpayer data, and can then fetch tax records.
7. Retrieve taxpayer results from [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) with `services[]=chart`. If the connection flow also ran the downstream tax-record service, include `services[]=chart_tax_records` to retrieve that result and status.

Do not replace this connection flow with a generic enrichment request that lacks the applicant's authorization.

## Data Orchestration availability and flow

The block is available in the **Tax Information** group for business and individual entities. Its related Workflow Builder service is `chart`; `chart_tax_records` is a downstream internal service, not a second service represented by the block. Re-running the block is state-aware: it creates a link only when no connection or prior link exists, exchanges a supplied code only when no active token exists, and fetches taxpayer data when credentials are active. Tax records require the completed Chart connection.

## What the service returns

| Result area | Response path | Meaning |
| - | - | - |
| Lifecycle | `data.statuses.chart` | Latest Chart flow and tax-record status entries. |
| Taxpayer | `data.commercial_data.chart.tax_payer` | Stored Chart taxpayer response or the client-link response while authorization is pending. |
| Tax records | `data.commercial_data.chart.tax_records` | Records returned after the OAuth connection is complete. |

## Representative response

Chart's tax-record payload is provider-defined and can be large. This abbreviated example shows the stable Lendflow grouping without inventing record fields.

```json theme={"system"}
{
  "data": {
    "statuses": {
      "chart": {
        "tax_payer": "Success",
        "tax_records": "Success"
      }
    },
    "commercial_data": {
      "chart": {
        "tax_payer": {
          "taxpayer": {
            "id": "taxpayer_example"
          }
        },
        "tax_records": {
          "records": []
        }
      }
    }
  }
}
```

## Field meanings

| Field | Type | Meaning |
| - | - | - |
| `tax_payer` | Object or null | Chart response stored for the connection flow. Before authorization, this can represent a client-link result rather than taxpayer data. |
| `taxpayer.id` | String | Opaque Chart taxpayer identifier used to associate OAuth credentials. |
| `tax_records` | Object or null | Provider-defined tax-record response available after connection. |
| `records` | Array, when returned | Tax records returned by Chart. Interpret each record according to its returned fields and form type. |

## Errors and statuses

| Signal | Meaning |
| - | - |
| `No Chart access token found for this application.` | Authorization has not completed or the token is inactive. |
| `Taxpayer not found: {id}` | Chart could not issue an access token for that taxpayer. |
| `Failed to create Chart access token` | The callback code could not be exchanged. |
| `No Chart credentials found for this application. Complete the Chart connection flow first.` | Tax records were requested before OAuth completed. |
| Existing client link and no token | The flow waits for the applicant; it does not create duplicate links. |
| `Success` | Lendflow stored the applicable Chart response. |

## FAQ

<AccordionGroup>
  <Accordion title="Can Chart run without applicant authorization?">
    It can create the applicant link, but taxpayer data and tax records require a completed OAuth connection.
  </Accordion>

  <Accordion title="Why did rerunning the block not create another link?">
    If an existing client-link result is stored, Lendflow returns without creating a duplicate while it waits for authorization.
  </Accordion>

  <Accordion title="Does the block support both businesses and individuals?">
    Yes. The current Workflow Builder definition allows both entity types.
  </Accordion>
</AccordionGroup>
