# Setting up a Chainalysis Know Your Transaction (KYT) integration

> Register crypto transfers in Chainalysis KYT from a Workflow on Transaction creation, then pull alerts on a schedule and auto-create Cases for review.

Source: https://help.withpersona.com/articles/1WulTGsGvhnQkYenuHvR5X/
Section: Marketplace and 3rd-Party Integrations > Crypto > Chainalysis

## Overview

With the Know Your Transactions (KYT) integration powered by [Chainalysis](https://www.chainalysis.com/), organizations can now streamline crypto monitoring and investigations directly within the Persona platform. Crypto transfers can be registered in Chainalysis, and alerts triggered in Chainalysis can automatically generate Cases in Persona.

This is useful for organizations who are looking to reduce tool switching and centralize their anti-money laundering (AML) workflows. By streamlining the end-to-end process within a single platform, teams can work more efficiently, reduce context switching, and accelerate investigations.

### Related Workflow action steps

Chainalysis integrations available within Persona include the Address Screening Report and Know Your Transaction (KYT)-related workflow action steps. KYT-related workflow steps include:

- **Register Transfer** – Registers a cryptocurrency transfer in Chainalysis system to begin compliance monitoring.
- **Get Transfer Summary** – Retrieves details of a registered transfer.
- **Get All Alerts** – Retrieves all alerts information within your organization. By default, only transfer alerts will be returned.
- **Update An Alert’s Status** – Updates the status of a specific alert and optionally adds a comment.

Use of these steps require proper set up of Chainalysis credentials within the Persona marketplace. For directions on how to do this and all Chainalysis integrations with Persona, review the [Chainalysis integration overview](/articles/7ykrjzOJl668pf6QFThNWH/ 'Chainalysis integration overview').

## Know Your Transaction (KYT)

ℹ️

A common use case is to use a combination of these Chainalysis KYT-related Workflow action
steps alongside the rest of the features available on the Persona platform to create a solution
that monitors for high risk transfers from high risk identities. Transfers, as you may refer to
them as, are modeled or mapped into Persona as Transactions. This article describes how to
construct a basic KYT solution within Persona.

![Chainalysis Know Your Transaction (KYT) example Case template](https://assets.withpersona.com/f_auto,q_auto/help-center/articles/marketplace-and-3rd-party-integrations/chainalysis-know-your-transaction-case-view.png '512x306')

_Example Case view focused on transaction monitoring._

## How to register a Transfer

_The below steps require use of Transactions and a Workflow triggered on Transaction Created. [Transactions can be generated via API](https://docs.withpersona.com/reference/create-a-transaction 'Create a Transaction API') or created through a CSV [Import](/articles/2fpD7Bwb7OrzAS4g7XWoMG/ 'Create an Import')._

### Transaction Type

1.  Create a new transaction type (Note: an apt name may be Virtual Transactions) with the following schema:

    ![Chainalysis KYT-related Transaction Type schema](https://assets.withpersona.com/f_auto,q_auto/help-center/articles/marketplace-and-3rd-party-integrations/chainalysis-kyt-transaction-type-schema.png '512x251')

ℹ️

While your schema can include other fields, these are the fields that are required to register a transaction within Chainalysis.

### Workflow

1.  Create a workflow with the following steps:
    1.  Trigger workflow is `Transaction created` (filtered by the transaction type you just created).
    2.  Add the **Register a Transfer in Chainalysis** workflow step.
    3.  Map the transaction fields to the required Chainalysis fields for:
        - `User ID`
        - `Asset`
        - `Network`
        - `Direction`
        - `Transfer Reference`

    ![Chainalysis KYT-related Workflow example: Register a Transfer](https://assets.withpersona.com/f_auto,q_auto/help-center/articles/marketplace-and-3rd-party-integrations/chainalysis-kyt-related-workflow-example.png '512x371')

2.  Add a 10 second **Wait Step**.
3.  Add a step to **Get a Transfer Summary** from Chainalysis. Pass in the External ID created in the previous step `register_a_transfer_in_chainalysis.externalID`.

![Get a Transfer Summary Workflows step](https://assets.withpersona.com/f_auto,q_auto/help-center/articles/marketplace-and-3rd-party-integrations/get-a-transfer-summary-workflows-step.png '260x390')

## How to configure ongoing transaction monitoring

ℹ️

These steps require the use of a similar Transaction Type outlined above in How to register a Transfer, a Case Template with a specific field schema, and a Workflow with a Recurring trigger.

### Case Template

1.  Create a Case Template with the following minimum fields using the [Cases Field Editor](/articles/6hHtNHUvxOXRqVoMvOk2sX/ 'Cases Field Editor').

    ![Minimum required fields for Chainalysis KYT-related Case Template](https://assets.withpersona.com/f_auto,q_auto/help-center/articles/marketplace-and-3rd-party-integrations/kyt-case-template-example-field-schema.png '512x424')

### Workflow

1.  Set up an **Recurring trigger** for a Workflow:
    - **Schedule**: Every Day.
    - **Start Time**: Choose a time that makes sense.
    - **Object Type**: Transaction.
    - **Filter Criteria**:
      - **transaction_type** (the transaction type you just created).
      - **id** (pick a transaction ID). _Note: this is important otherwise you’ll create a workflow run for every single transaction of the type you just created_).

    ![Recurring Workflow Trigger Example](https://assets.withpersona.com/f_auto,q_auto/help-center/articles/marketplace-and-3rd-party-integrations/recurring-workflow-trigger-example.png '512x321')

2.  Add an **Evaluate code** step.
    - Add a custom code that calculates the current time - X hours so that it fetches all the transactions created in the last X hours.

      ![Example Workflow with Evaluate Code Step](https://assets.withpersona.com/f_auto,q_auto/help-center/articles/marketplace-and-3rd-party-integrations/example-workflow-with-evaluate-code-step.png '387x512')

3.  Add a **Get All Alerts** step.
    - **Action**: Get all alerts in Chainalysis.
    - **Integration Credentials**: Make sure your Chainalysis instance's specific API credentials are selected here.

      ![Get All Alerts Chainalysis workflow step](https://assets.withpersona.com/f_auto,q_auto/help-center/articles/marketplace-and-3rd-party-integrations/get-all-alerts-chainalysis-workflow-step.png '209x512')

4.  Add a **Loop** step.
    - **Loop type**: `for each`.
    - **Loop through list**: `get_all_alerts.data`.
    - **Loop Mode**: Sequential.

      ![Loop step configuration in Workflows](https://assets.withpersona.com/f_auto,q_auto/help-center/articles/marketplace-and-3rd-party-integrations/loop-step-in-workflows.png '295x512')

5.  Add a **Create Case** step within the loop.
    - Map the alert fields to the fields on the Case Template.

![Example of Chainalysis KYT-related Create Case step](https://assets.withpersona.com/f_auto,q_auto/help-center/articles/marketplace-and-3rd-party-integrations/example-of-chainalysis-kyt-related-create-case-step.png '512x333')

## Plans Explained

### Chainalysis Integration by plan

|                         | Startup Program | Essential Plan | Growth Plan | Enterprise Plan |
| ----------------------- | --------------- | -------------- | ----------- | --------------- |
| Chainalysis Integration | Not Available   | Not Available  | Limited     | Available       |

[Learn more about pricing and plans](https://withpersona.com/pricing?utm_source=product&utm_medium=referral&utm_audience=a&utm_campaign=cm_gen_ds_hc-plan-table).
