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

# TRM Labs Integration for Blockchain Compliance Alerts

> Connect your TRM Labs account to Corsa for bi-directional blockchain compliance alert syncing and case management.

The TRM Labs integration connects your TRM Labs account directly to the Corsa platform. TRM alerts and their related transfers are synced into your Corsa dashboard when Corsa can match the TRM account to an existing Corsa client, or when client creation is explicitly enabled for the integration.

This enables a seamless, bi-directional workflow, ensuring your compliance team always works with the most current data across both platforms.

## How It Works

1. **Secure Connection** - Securely link your TRM Labs account to Corsa. One-time setup with fully encrypted credential storage.
2. **Automatic Syncing** - Corsa checks TRM Labs every few minutes for new or updated alerts and syncs matched alerts to your dashboard.
3. **Smart Organization & Prioritization** - Corsa uses a rules engine to read alert details (risk score, sanction exposure, transaction type) and assigns the correct Priority and Category.
4. **Building the Full Picture** - Each alert is linked to the relevant client and transaction. If the related transaction is not yet in Corsa and the client is matched, Corsa retrieves the transfer from TRM Labs and creates the matching Corsa transaction.
5. **Keeping Everything Up-to-Date** - Corsa upserts synced alerts and transactions to avoid duplicates.

## Prerequisites

1. A TRM Labs account with permission to generate API credentials.
2. Owner access to the Corsa application.

## Setting Up the TRM Integration

1. Log in to Corsa.
2. Go to **Developers Hub → Integrations**.
3. Click **Configure** on the TRM Labs card.
4. Create an API Key inside the TRM Labs API keys page.
5. Enter the credentials into Corsa.
6. Configure the **Polling Interval** (how frequently Corsa fetches new alerts).
7. Choose whether Corsa should **Create missing clients**.

If the configuration was successful, you should see the integration in an **enabled** status.

## Client Creation and Matching

The TRM Labs integration can run in two client modes:

| Setting                                                        | Behavior                                                                                                                                                                         |
| -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Create missing clients: off** (default for new integrations) | Corsa only ingests TRM alerts and transactions when the TRM account matches an existing Corsa client. If no client matches, the alert is skipped until a matching client exists. |
| **Create missing clients: on**                                 | Corsa creates an Individual client when a TRM account does not match an existing Corsa client, then syncs the related transaction and alert.                                     |

Existing TRM Labs integrations keep their previous behavior and continue creating missing clients unless you turn this setting off.

### Matching Existing Clients

When client creation is off, Corsa tries to match the TRM account to a Corsa client using either:

| Corsa Client Field                  | Description                                                                                           |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `referenceId`                       | Match this to the TRM account external ID.                                                            |
| `integrations.trmAccountExternalId` | Set this explicitly when the Corsa client reference ID is different from the TRM account external ID. |

To pre-link a client, create or update the Corsa client with the TRM account external ID:

```json theme={null}
{
  "referenceId": "client-123",
  "integrations": {
    "trmAccountExternalId": "trm-account-external-id"
  }
}
```

### Skipped Alerts

If Corsa receives a TRM alert for an unmatched account while **Create missing clients** is off:

1. Corsa records the alert as skipped.
2. No Corsa client, transaction, or alert is created.
3. Scheduled syncs keep checking whether that TRM account now matches a Corsa client.
4. When a matching client exists, Corsa backfills the skipped TRM alerts and their related transactions.

This means you can ingest or update the client later, using the matching `referenceId` or `integrations.trmAccountExternalId`, and the previously skipped TRM alerts will be picked up by a later sync.

<Note>
  Backfill is bounded per scheduled sync. Large skipped-alert backlogs may take multiple sync cycles to fully drain.
</Note>

***

Corsa offers native integrations with leading compliance, blockchain analytics, and custody providers. [See all integrations](/integrations) or [schedule a demo](https://calendly.com/michellelatzer/welcome-to-corsa) to see how Corsa fits into your stack.
