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

# Usecases

> What teams build with the Tomorro Public API

The Tomorro Public API lets you exchange data between Tomorro and the third-party software your
teams already use — your CRM, ERP, data warehouse, automation platform, or any internal app.

The clearest way to scope an integration is to start from the end goal — *what should this
automation achieve?* — and describe it as a simple **Trigger → Action → Data** flow:

* **Trigger** — the event that starts the automation, in Tomorro or in your tool. Pick one that's
  unique, easy to identify, and free of edge cases.
* **Action** — what should happen as a result, in the other system.
* **Data** — the fields exchanged, and in which direction.

Below are the most common integration patterns, each framed this way. They use only endpoints
available today, and most combine just two or three calls.

<CardGroup cols={2}>
  <Card title="Create contracts from your tools" icon="file-plus" href="#create-contracts-from-your-crm-or-erp">
    Generate ready-to-sign contracts straight from your CRM or ERP.
  </Card>

  <Card title="Keep counterparties in sync" icon="arrows-left-right" href="#keep-counterparties-in-sync">
    Mirror your suppliers, clients, or partners between systems.
  </Card>

  <Card title="Push contract data back" icon="arrows-rotate" href="#push-contract-data-back-into-your-tools">
    Reflect contract status and fields in your CRM or ERP.
  </Card>

  <Card title="Archive signed documents" icon="box-archive" href="#archive-signed-documents-in-your-systems">
    Store signed PDFs in your DMS, storage, or data lake.
  </Card>
</CardGroup>

## Create contracts from your CRM or ERP

Generate a ready-to-sign, pre-filled Tomorro contract straight from your CRM, ERP, or internal
app — without anyone leaving their system of record.

|             |                                                                                                                                                                                                                                                                                                                                     |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Trigger** | A user clicks "Generate contract" in your CRM/ERP, or your backend calls the API.                                                                                                                                                                                                                                                   |
| **Action**  | Look up the required fields via [`GET /contract-types/{id}/creation-form`](/api-reference/2025-01-29-alpha/contract-types/get-contract-types-creation-form), then create it with [`POST /contracts`](/api-reference/2025-01-29-alpha/contracts/create-contract).                                                                    |
| **Data**    | `contractTypeId`, `templateId`, `counterparty`, and `fields` (smart-field values; rich-text as Slate JSON; dynamic tables via [`PUT /custom-objects/{customObjectId}/contract/{contractId}/records`](/api-reference/2025-01-29-alpha/custom-objects/upsert-contract-records)). Returns the `contractId` to rebuild the Tomorro URL. |

## Keep counterparties in sync

Keep the third parties you manage elsewhere — suppliers, clients, partners, or any external
entity — aligned with their Tomorro counterparties, in either direction.

|             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Trigger** | A counterparty changes in Tomorro or in your system (poll `updatedAt`, or a [webhook](/webhooks/overview)).                                                                                                                                                                                                                                                                                                                                                                     |
| **Action**  | Detect changes with [`GET /counterparties`](/api-reference/2025-01-29-alpha/counterparties/list-counterparties) + [`GET /counterparties/{id}`](/api-reference/2025-01-29-alpha/counterparties/get-counterparty); update Tomorro with [`PATCH /counterparties/{id}`](/api-reference/2025-01-29-alpha/counterparties/update-counterparty); fetch related contracts via [`GET /contracts`](/api-reference/2025-01-29-alpha/contracts/list-contracts) filtered by `counterpartyId`. |
| **Data**    | Counterparty fields mapped between systems; `counterpartyId` as the join key.                                                                                                                                                                                                                                                                                                                                                                                                   |

## Push contract data back into your tools

Reflect a contract's status and fields in your CRM, ERP, or reporting tools the moment they
change — including via no-code automation platforms.

|             |                                                                                                                                                                    |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Trigger** | A [webhook](/webhooks/overview) event (contract created, signed, or status changed) carrying the contract ID.                                                      |
| **Action**  | Fetch full details with [`GET /contracts/{id}`](/api-reference/2025-01-29-alpha/contracts/get-contract), then update the matching record in your destination tool. |
| **Data**    | Contract fields keyed by **field ID** (unique per organization, not labels); your destination record ID.                                                           |

## Archive signed documents in your systems

Keep a copy of every signed contract in your document management system, cloud storage, or data
lake — ready for audit, search, or downstream extraction.

|             |                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Trigger** | A scheduled run, or a [webhook](/webhooks/overview) on signature.                                                                                                                                                                                                                                                                                                                                    |
| **Action**  | Select contracts with [`GET /contracts`](/api-reference/2025-01-29-alpha/contracts/list-contracts); download the signed PDF with [`GET /contracts/{id}/signed-files`](/api-reference/2025-01-29-alpha/contracts/get-contract-signed-files); for drafts, fetch the working copy with [`GET /contracts/{id}/current-version`](/api-reference/2025-01-29-alpha/contracts/get-contract-current-version). |
| **Data**    | Signed PDF (and metadata) stored in your DMS, storage, or data lake.                                                                                                                                                                                                                                                                                                                                 |
