# Automated counterparty identification

When new transaction data is imported, the system will automatically attempt to identify the counterparty based on the account information in the transaction. If you’ve already provided account details in the Counterparty Management section, this process typically requires no further action.<br>

However, there are specific scenarios where the default system rules may not correctly identify the counterparty:

1. **Non-Unique Account to Counterparty Mapping:** In some cases, multiple counterparties might be using the same account for transactions.
2. **Transactions Without Account Information:** When importing transaction data via business data, the original data may lack explicit account information.

\
To address these scenarios, you can create custom Counterparty Identification Rules:

1. **Identifying Counterparties via Identification Code in Memo**:
   1. Please remind the counterparty to include the identification code in the memo field when making the transaction.
   2. Assign a unique identification code to each counterparty in the Counterparty Management section (you can bulk import these using a CSV file if they are already managed in your business system).
   3. Create custom rules that extract and use the identification code from the memo to accurately identify the counterparty.
2. **Identifying Counterparties via Account Information in Memo**:
   1. If the memo field in the original business data contains account information, you can set up custom rules to extract the account details from the memo and use them to identify the counterparty.

## Steps to follow

<figure><img src="/files/9muHHQco06pMILjZGbhW" alt=""><figcaption></figcaption></figure>

1. Managing Rules in Automation - Identify Counterparty:
   1. Default System Rules:
      1. The system comes with pre-configured rules that identify counterparties based on account information. If no match is found, the transaction is marked as an “unnamed counterparty.”
      2. System rules cannot be modified but can be enabled or disabled as needed.
   2. Custom Rules:

      1. You can add multiple custom rules to handle transactions under different circumstances.

      <figure><img src="/files/bBvXSvnacXQHafDlft3Q" alt=""><figcaption></figcaption></figure>
2. Setting Rule Conditions:

   1. Define conditions based on Platform Type, Platform, Account, and Datetime to filter which transactions a rule should apply to. This allows you to manage transactions from different data sources with specific rules.
   2. Alternatively, you may choose to apply a rule without setting any conditions.

   <figure><img src="/files/DlXCA9pTXHhSAlhNEByB" alt=""><figcaption></figcaption></figure>
3. Defining Actions:

   1. You can specify whether to identify counterparties based on the account or identification code.
   2. If using account-based identification, provide a regular expression to extract the account information from the memo field.
   3. If using identification code-based identification, provide a regular expression and specify the identification code key in the system’s counterparty records.
   4. You can also set whether the match should be case-sensitive.

   <figure><img src="/files/PqTlgZlD8KFW3mjJaDhv" alt=""><figcaption></figcaption></figure>

\
**Execution of Rules:**

1. For each transaction, the system will attempt to identify the counterparty by executing the rules in order of priority.
2. Once a rule successfully identifies a counterparty, no further rules will be applied to that transaction.
3. When new transactions are received, the system will automatically execute the counterparty identification rules for those transactions.
   1. If you need to re-identify counterparties for all transactions, you can click on "Manually execute all rules" in the list.

\
**Adjusting Rule Priority:**

1. You can adjust the priority of rules by dragging them into the desired order in the rule list.
2. Rules at the top of the list have the highest priority, with priority decreasing down the list.

\
\
\
\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.elven.com/v3/acount-management/counterparty-accounts-management/automated-counterparty-identification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
