---
title: "Setup best matched account (BMA) filter"
slug: "how-does-best-match-account-work"
description: "The  functionality helps match the right Leads to the right  accounts for effective sales planning. When a lead enters a system, it is essential to check the lead with already existing accounts to eliminate all invalid leads."
updated: 2026-02-01T04:48:41Z
published: 2026-02-01T04:48:41Z
---

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

# Setup best matched account (BMA) filter

The BMA functionality helps match the right Leads to the right GTM accounts for effective sales planning. When a lead enters a system, it is essential to check the lead with already existing accounts to eliminate all invalid leads.

![Process flow for lead comparison with BMA rules.](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-cerujphace.jpg)

## Field comparison

The following fields are usually compared to filter out the leads:

![Field comparison.](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-2tiwhcrtiw.png)

| Lead fields | Account fields |
| --- | --- |
| Company Name | Account Name |
| Website | Website |
| Phone number | Phone number |
| Address | Billing Address |

## Create policy rules for BMA

Fullcast policy rules are configured in the Salesforce instance.

> [!NOTE]
> Note
> 
> If the rules don't create a single best-match account, the BMA logic will select the oldest created account.

1. In Salesforce, go to **Setup > Custom Metadata Types**.
2. Find **Fullcast Policy Rules**and click**Manage Records.**

![Manage Records option highlighted for Fullcast Policy Rules.](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/image(540).png)
3. Click **New.**

![New option highlighted.](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/image(541).png)
4. Complete the following fields:

![Fullcast Policy Rules fields.](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-jqkwizkbwj.png)

| Field | Description |
| --- | --- |
| **Label** | Type a label for the policy rule with the following requirements: - Must begin with a letter. - No spaces. - Only alphanumeric characters and underscores allowed. - Cannot end with an underscore or have two consecutive underscores. |
| **Fullcast Policy Rules Name** | Auto-populates a name based on the label which is used by the API and managed packages. |
| **Criteria** | Select one of the following criteria: - **Field compare:**Compares field 1 on the field 1 object (lead or contact) to field 2 on the field 2 object (which should always be an account). - **Literal:**Compares field 2 on the field 2 object (account) to string value provided on the custom metadata. - **Tie Breaker:**Uses the field compare or literal criteria and if more than 1 account is found, criteria selects one. - **Fuzzy logic:**Compares unsure data fields. |
| **Condition** | Select one of the following conditions based on the selected criteria: - **AND**(field compare, literal, fuzzy logic) - **OR**(field compare, literal, fuzzy logic) - **MAX**(tie breaker): Orders the records in ascending order. - **MIN**(tie breaker): Orders the records in descending order. - **EXIT**(tie breaker): Uses a null value instead of selecting an account from the tied (similar) accounts. |
| **String** | Only required if you selected literal for the Criteria. |
| **Field 1 Object** | Type the lead or contact which is compared with the account. |
| **Field 1** | Type the API field of the field 1 object which is compared to the API field of the account. |
| **Field 2 Object** | Type the account which is compared to the field 1 object. |
| **Field 2** | Type the API field of the field 2 account which is compared to the API field of the field 1 object. |
| **Operator** | Select an operator based on the field type used in field 1 and field 2 in the rules: - **Equal To** (string, Boolean, percent, datetime): - **Greater Than** (double, datetime) - **Greater Than or Equal To** (double, datetime) - **Less Than** (double, datetime) - **Less Than or Equal To** (double, datetime) - **Not Equal To** (picklist, URL, Boolean, currency, date) - **Contains Any** (multipicklist, email) - **Contains All** (email) - **Does Not Contain** (email) - **Fuzzy Match** |
| **Order** | Type the number according to which the rule has to be executed. For example, if it has to be executed first then the order number is 1. If it has to be executed third, then the order number is 3, and so on. |
| **Module Name** | Optional. Type a name for the module. |
5. Click **Save**to trigger and call the policy rule whenever necessary.

### Criteria examples

#### Field compare criteria

![](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-pdwolfhpev.png)

#### **Literal criteria**

![](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-own2kydnlm.png)

#### Tie-breaker criteria

![Example Tie Breaker](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-uohizylsqn.png)

![Example Condition for Tie Breaker](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-otzvc22brw.png)

The final account could be decided by the rules configured as shown.

![BMA Logic.](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-xbjvcpe4t1.png)

#### **Single Rule (One order only)**

- In the below setup we have 3 rules resulting in always one account as the output which is ensured by the Max condition.
- Since it's based on a single rule we have order for all of them as 1

![Single Rule Example](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-itipnthzsn.png)

#### Multiple rule (multiple order)

- In the below setup we have 2 rules resulting in always one account as the output which is ensured by the Max condition.
- Since it's based on two rules we have an order for that as 2

![Multiple Rule Example](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-pmjjxqrjr6.png)

## Supported basic logical expressions and setup

![Supported Basic Logical Expressions and Setup Table](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-lwhqmq9gry.png)

## Call BMA from Flow Builder

> [!NOTE]
> Note
> 
> The flow builder must be created to sync the domain and call the BMA. To configure the flow builder, refer to the [Configuring Flows for Motion Policies](/v1/docs/configure-salesforce-flows-for-fullcast-routing-policies) article.

The apex variables for BMA is as follows:

1. **RecordID**: Use field reference in the type to select `AccountID`
2. **PolicyType**: Set to string with value `CleanDomain` (case sensitive)
3. **inputVal1** selection:
  - If **Yes**, it will call clean domain functionality.
  - If **No**, it will not call clean domain functionality.
4. **inputVal2** selection:

![Example Flow Builder Configuration.](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-ll7mr7nloe.png)
  - If **Yes**, it will execute BMA functionality.
  - If **No**, it will not execute BMA functionality.

**Best matched account:**The account that Fullcast identifies as the best match based on defined rules.

**Go-to-market:**The strategy used to bring a product to market.
