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

# Foundation

> Export billing and settlements to Foundation.

Move approved billing into Foundation without re-keying it. Tread exports approved invoices and [Vendor](/concepts/dispatching-drivers-vendors) settlements to Foundation Software's construction accounting system. The export is file-based — Tread generates a CSV in Foundation's import format, and your accounting team imports it.

## Prerequisites

* A Foundation instance with import access.
* A Tread admin user with the **Settlements** and **Exports** [permissions](/concepts/roles-permissions).
* Customer and vendor records already in Foundation. Tread maps by external ID.
* A Foundation import template confirmed with your accounting team.

## How it works

1. **Approve in Tread** — Settlements close once both sides sign off. See [Settlements & Driver Pay](/concepts/settlements-driver-pay).
2. **Generate export** — From the Settlements page, pick a date range and export to Foundation format.
3. **Map external IDs** — Customer and vendor records carry a Foundation customer or vendor code as the external ID.
4. **Import to Foundation** — Your accounting team imports the CSV into Foundation's AR or AP module.
5. **Track exported settlements** — Tread marks each exported settlement so the same settlement is not exported twice.

## What flows where

| Data              | Direction          | Frequency |
| ----------------- | ------------------ | --------- |
| Customer invoices | Tread → Foundation | On export |
| Vendor bills      | Tread → Foundation | On export |
| Driver pay        | Tread → Foundation | On export |

## Setup

<Steps>
  <Step title="Open Integrations settings">
    Go to **Settings → Integrations → Foundation**.
  </Step>

  <Step title="Confirm your Foundation import schema">
    Have your accounting team share the AR and AP import templates in use.
  </Step>

  <Step title="Tag customers and vendors">
    Open each Customer and Vendor in Tread and enter the matching Foundation code in the **External ID** field.
  </Step>

  <Step title="Run a test export">
    Export one approved settlement and confirm the import succeeds in Foundation.
  </Step>

  <Step title="Set the cadence">
    Pick a recurring cadence with your accounting team. Tread does not auto-push.
  </Step>
</Steps>

## Limitations

* Export only. Tread does not pull data back from Foundation.
* CSV-based, not API-based. No live two-way sync.
* Customer and vendor records must exist in Foundation before import. Tread does not create them.
* Foundation import errors surface in Foundation, not Tread.
* Custom configurations may need a one-time mapping review with the Tread team.

## Troubleshooting

**Foundation rejects rows on import**

1. Read the Foundation import log to find rejected rows.
2. Match each row to the Tread settlement using the invoice number.
3. Fix the missing field (often a job code or external ID) and re-export.

**Duplicate invoice in Foundation**

1. Tread's export log shows which settlements were in each file.
2. Avoid overlapping date ranges on subsequent exports.
3. Delete the duplicate in Foundation if needed.

**External ID mismatch**

1. Pull the Foundation customer or vendor list.
2. Reconcile against Tread external IDs and update Tread to match.
3. Re-export.
