---
title: "Create policy rules for best matched accounts (BMA) with fuzzy logic"
slug: "introduction-to-best-match-account-functionality-and-rules-for-fuzzy-matching"
description: "Create policy rules for BMA with fuzzy logic."
updated: 2026-02-01T04:49:52Z
published: 2026-02-01T04:49:52Z
---

> ## 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.

# Create policy rules for best matched accounts (BMA) with fuzzy logic

## Basic configuration setup

1. [Create Fullcast Policy rule in Custom metadata type](/v1/docs/best-match-account-functionality-with-fuzzy-logic#creating-fullcast-policy-rules-for-best-match-account).
  1. Refer to the [table](/v1/docs/how-does-best-match-account-work) to pick the correct operator based on the Field type being used in Field 1 and Field 2 in the rules.
  2. Select Fuzzy Logic for the **Criteria** and **AND**or **OR**the **Condition.**
2. [Enable Standard Account Duplicate rule in Salesforce](/v1/docs/best-match-account-functionality-with-fuzzy-logic#configuring-salesforce-duplicate-rules-and-matching-rules).
3. [Enable triggers in Fullcast Setting](/v1/docs/best-match-account-functionality-with-fuzzy-logic#enabling-triggers-in-fullcast-setting) or [Call BMA using Flow to fetch clean domain functionality or BMA](/v1/docs/best-match-account-functionality-with-fuzzy-logic#configuration-of-process-builder-for-bma-with-fuzzy-logic).

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

## Configure Salesforce duplicate rules and matching rules

The duplicate rule needs to be configured in the Salesforce environment, to make the Fullcast Fuzzy Logic operator work and find the BMA.

1. Search for **Duplicate Rule** in the quick find tab in the Salesforce.
2. From the dropdown, select **Account**.
3. Click **New Rule**.

![](https://cdn.document360.io/369efcf7-66f9-4f6b-9d45-9ca24a5b06cf/Images/Documentation/file-fqtbnwkemk.gif)
4. Complete the following sections:

#### Rule Details

Complete the following fields:

| Field | Description |
| --- | --- |
| **Rule Name** | Type a name for the rule. |
| **Description** | Optional. Type a brief description for the rule. |
| **Object** | Displays the object you are creating the rule for. |
| **Record-Level Security** | Select one of the following: - **Enforce sharing rules:** Compares only those records the user has access to. - **Bypass sharing rules:** Compares all the records. |

#### Actions

Complete the following fields:

| Field | Description |
| --- | --- |
| **Action On Create and Action on Edit** | Select one of the following: - **Allow** - **Alert:**select the checkbox to display an alert when the user tries to save a duplicate record. - **Report:** select the checkbox to receive a report. - **Block** |
| **Alert Text** | Type an alert message and instructions. Required when you select the checkbox for **Alert**. |

#### Matching Rules

Complete the following fields:

| Field | Description |
| --- | --- |
| **Compare Accounts With** | Select the field the account needs to be compared with. > [!NOTE] > Note > > The account can be compared with lead, but the lead detail fields are mapped to the particular account detail fields in the backend and finally those mapped fields are compared. So even when you want to compare accounts to lead, it is mandatory to select accounts as it is already mapped. |
| **Matching Rule** | Select the matching rule. > [!NOTE] > Note > > If you select **Create New Matching Rule**, it will prompt you to save your duplicate rule to create the matching rule. You can then edit the duplicate rule to select the new matching rule. |
| **Field Mapping** | Displays the fields that need to be matched. |

Optional. Click **Add Rule** to add more rules.

#### Conditions (optional)

Set any conditions to be met for the rule to run.

| Field | Description |
| --- | --- |
| **Field** | Select a field. |
| **Operator** | Select an operator. |
| **Value** | Type the field value. |
5. Click **Save**to create the duplicate rule. The standard account duplicate rule created screen will look like the following:

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

> [!NOTE]
> Note
> 
> The fuzzy logic rule will fetch records that are the best match for the account. This can be further filtered with the [Tie-Breaker](/v1/docs/how-does-best-match-account-work) or [Field- Compare](/v1/docs/how-does-best-match-account-work).

## Enable triggers in Fullcast Setting

1. Click **Setup** and search for **Custom Metadata types**.
2. Click **Manage Records** against Fullcast Setting.
3. Click **New** and start creating the Fullcast Setting.
4. Select a Label for the setting.
5. Check the Account, Contact and Lead trigger flags.
6. Set a number for the Error log that needs to be displayed.
7. Click save. When these flags are checked, the clean domain functionality will be triggered when there is a website address in the Website field. Whenever a new data is added or edited in the website field the clean domain functionality is triggered.

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

### Configuration of flow for BMA with fuzzy logic

[Setup a flow in Salesforce environment](/v1/docs/configure-salesforce-flows-for-fullcast-routing-policies)for each policy to trigger it when needed.

The Best Matched Account for the Lead Account is displayed in the BMA field if there is any record found.

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

### BMA with fuzzy logic cases which involve different criteria and conditions

The following are different BMA with fuzzy logic cases which involve different criteria and conditions.

#### **Case 1: Country field matching**

The following displays the field setup that needs to be created in Fullcast Policy setting by using the field value directly or Lead field value can be used.

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

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

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

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

#### **Case 2: Use picklist in Condition**

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

#### **Case 3: Use number field**

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

#### **Case 4: Use date field in condition**

- **Condition 1**: When the proper lead value is given according to the condition then it will fetch the correct BMA.
- **Condition 2**: For the same case if the lead date value given is wrong then it should not fetch the correct BMA.
- **Condition 3:** When the date value equals null, it should fetch the data correctly.

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

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

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

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

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