> For the complete documentation index, see [llms.txt](https://docs.gradient.works/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gradient.works/kb/automation-builder-kit-abk/actions/matching/matchaccounttoaccountaction.md).

# Match Account to Account

Takes a list of Accounts from earlier in the Flow, finds matching Accounts and provides a list of [AccountToAccountMatch](/kb/automation-builder-kit-abk/models/accounttoaccountmatch.md) results for use later in the Flow. The matches can be used for assignment.

For more information on how to use this action, see [Lead and Account Matching](/kb/routing/matching.md).

## Configuration

{% tabs %}
{% tab title="Flow Element" %}

<figure><img src="/files/eICF1Wx6kWmMqf3c3WZj" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Apex Properties" %}
Please note that you will not directly interact with these input fields as you do with some Flow Actions. Instead the Gradient Works custom editor takes care of the heavy lifting.

| Name              | Required | Type           | Description                                                                   |
| ----------------- | -------- | -------------- | ----------------------------------------------------------------------------- |
| account           | No       | Account        | The Account to match to Accounts. Must fill out account or accounts.          |
| accounts          | No       | List\<Account> | The list of Accounts to match to Accounts. Must fill out account or accounts. |
| filterData        | No       | String         | Include matches that meet all the specified filters                           |
| matchCriteriaData | No       | String         | Criteria for finding potential matching Accounts                              |
| rankerData        | No       | String         | If there are multiple matches, rank them according to the specified criteria  |
| {% endtab %}      |          |                |                                                                               |
| {% endtabs %}     |          |                |                                                                               |

## Outputs

For easy access later in the flow, we recommend you select "Manually assign variables" in the Flow editor and store the `results` value in a variable.

| Name    | Type                                                                                          | Description                                                                                                            |
| ------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| count   | Integer                                                                                       | The number of results                                                                                                  |
| result  | [AccountToAccountMatch](/kb/automation-builder-kit-abk/models/accounttoaccountmatch.md)       | The first result of matching Accounts to Accounts. Can be used when working with a single Account in place of results. |
| results | List<[AccountToAccountMatch](/kb/automation-builder-kit-abk/models/accounttoaccountmatch.md)> | The results of matching Accounts to Accounts                                                                           |
