Initialize Plaid Items 
=======================

#### Create Plaid Items to be used with Signal Transaction Scores 

#### Creating Plaid Items 

Before getting a Signal Transaction Score for a proposed transaction, your end users need to link a bank account to your app using [Link](https://plaid.com/docs/link/index.html.md) , Plaid's client-side widget. Link will connect the user's bank account and obtain the consent required to perform this evaluation.

See the [Link documentation](https://plaid.com/docs/link/index.html.md) for more details on setting up a Plaid Link session. At a high level, the steps are:

1.  Call [/link/token/create](https://plaid.com/docs/api/link/index.html.md#linktokencreate) .
    
    *   Put `signal` and `auth` in the `products` array, along with any other Plaid products (except Balance) you will be requiring, e.g. `products: [signal, auth]`.
    *   Put any other Plaid products you plan to use in the `optional_products` or `required_if_supported_products` arrays, e.g. `required_if_supported_products: [identity]`.
2.  Initialize Link using the `link_token` created in the previous step. For more details for your specific platform, see the [Link documentation](https://plaid.com/docs/link/index.html.md) . The user will now go through the Link flow.
    
3.  Call [/item/public\_token/exchange](https://plaid.com/docs/api/items/index.html.md#itempublic_tokenexchange) to exchange the `public_token` for an `access_token`.
    
4.  Obtain the `account_id` of the account used for the transaction you wish to perform the evaluation on; this can be obtained from the `metadata.accounts` field in the `onSuccess` callback, or by calling [/accounts/get](https://plaid.com/docs/api/accounts/index.html.md#accountsget) or [/link/token/get](https://plaid.com/docs/api/link/index.html.md#linktokenget) .
    

Once you have your Plaid Item, continue to [evaluate](https://plaid.com/docs/signal/signal-rules/index.html.md) the risk of the transaction.

#### Adding Signal to existing Items 

You may have Items that were not initialized with `signal`; for example, if you are adding Signal support to an existing Plaid integration. In this case, for best results, call [/signal/prepare](https://plaid.com/docs/api/products/signal/index.html.md#signalprepare) on the Item before your first call to [/signal/evaluate](https://plaid.com/docs/api/products/signal/index.html.md#signalevaluate) . If you skip calling [/signal/prepare](https://plaid.com/docs/api/products/signal/index.html.md#signalprepare) , the Item's first call to [/signal/evaluate](https://plaid.com/docs/api/products/signal/index.html.md#signalevaluate) will take longer and be less accurate, because Plaid will not have had the opportunity to pre-load certain data about the Item. Subsequent calls to [/signal/evaluate](https://plaid.com/docs/api/products/signal/index.html.md#signalevaluate) on the Item will have higher accuracy.

If you intend to add Signal to an existing Item and have enabled [Data Transparency Messaging](https://plaid.com/docs/link/data-transparency-messaging-migration-guide/index.html.md) on the Item, you may need to send the Item through [update mode](https://plaid.com/docs/link/update-mode/index.html.md#data-transparency-messaging) . If you have a large number of existing Items that require update mode for this reason, contact your Plaid account manager for more details and assistance.