Best Match Account Functionality with Fuzzy Logic

When there is uncertainty in data and the search criteria, the Fuzzy logic option helps to filter the available best match account, as it is based on the degree of truth and not on the -True or False - Boolean logic. The Fuzzy logic system is applied to scenarios where it is difficult to categorize Leads and Accounts as a binary “True or False.” Fuzzy Logic can incorporate all intermediate values between True and False.

📘

When to use Fuzzy matching?

Fuzzy Matching (also called Approximate String Matching) is a technique that helps identify two elements of text, strings, or entries that are approximately similar but are not exactly the same.

Example of Fuzzy Matching

Consider that the company name Hewlett Packard is misspelt in the data. When you apply Fuzzy matching it tries to pickup all the records which has similar phonetic sound of the name. So in the below example, when you search for Hewlett Packard, it picks all the records from A-F which has similar spelling and sound.

Creating Fullcast Policy Rules for Best Match Account

Fullcast policy rules are configured in the Salesforce instance.

  1. Log in to the Salesforce account.
  2. Click on the Setup and search for Custom Metadata types
  3. Click on Manage Records against Fullcast Policy Rules.
  4. Click New and start creating the rules.
  1. Enter label name which must begin with a letter and use only alphanumeric characters and underscores. The name cannot end with an underscore or have two consecutive underscores.
  2. The Fullcast Policy Rules Name is automatically picked which is the unique name used by the API and managed packages.
  3. Pick Criteria as Fuzzy Logic and AND or OR Condition fields from the drop-down menu available.
  4. String field needs to be updated only if the Criteria field picked is LITERAL.
  5. Field 1 Object is Lead or Contact which needs to be compared with the Account.
  6. Field 1 is the API field of the Field 1 object which needs to be compared API field of the Account.
  7. Field 2 Object should always be Account which is compared with Field 1 object.
  8. Field 2 is the API field of Field 2 Account which is compared with the API field of the Field 1 object.
  1. Choose which operation to be performed from the drop-down menu for the field Operator. Use the table to pick the correct operator based on the Field type being used in Field 1 and Field 2 in the rules.
  2. Enter 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 likewise.
  3. Module name carries the name of your choice. It is an optional field.
  4. Click Save to trigger and call the policy rule whenever necessary.

Configuring Salesforce Duplicate rules and Matching rules

📘

Duplicate Rule

A duplicate rule defines what happens when a user views a record with duplicates or starts creating a duplicate record. Salesforce provides standard duplicate rules for business and person accounts, contacts, and leads. You can also create duplicate rules.

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

  1. Search for Duplicate Rule in the Quick find tab in the Salesforce environment.
  1. Create New Duplicate Rule by clicking the New rule tab. Select Account from the dropdown menu for which the rule has to be created.

Creating a New rule

📘

Matching Rules

A matching rule defines how duplicate records are identified in duplicate rules and duplicate jobs. Salesforce provides standard matching rules for business and person accounts, contacts, and leads. You can also create custom matching rules.

  1. Enter the Rule Name. Description field which describes the rule is an optional field.
  2. Object for which the rule is created is displayed in the object field.
  3. For Record-level security choose whether to enforce or bypass sharing rules according to the organization's policy. By enforcing sharing rules, the matching rule compares only those records to which the user has access to, whereas bypassing sharing rules compares all the records.
  1. Set the actions which need to be performed when the user creates or edits a duplicate record. When you choose alert, provide an appropriate alert message as to why the user is not able to save the record and what's the next step.
  1. In the Matching Rules fields select from the drop-down menu to define how duplicate records are identified.
  2. Select the field with which the Accounts need to be compared with from the drop-down menu. In the below example it is compared with accounts.
  3. Select the Matching rule required for comparison. In this particular example, it is the Standard Account Matching Rule.
  4. Select the fields that need to be mapped. The below example shows the fields that are mapped in the Standard Account Matching Rule.
  1. If there are any conditions to be met for the rule to run, those conditions need to be set in the Conditions fields which are optional.
  1. Click Save to create the duplicate rule.
  1. The fuzzy logic rule will fetch records that are the best match for the account. This can be further filtered using the Tie-Breaker or Field- Compare

📘

Standard Account Matching Rule

The standard account matching rule identifies duplicate accounts using match keys, a matching equation, and matching criteria. It’s activated by default.

Important for Account Matching equation

For accurate matches, the new or edited record must include a value in the Account Name field and either the City or the ZIP Code field.

(Account Name AND Billing Street)
OR (Account Name AND City AND State)
OR (Account Name AND ZIP)
OR (Account Name AND Phone)
OR (Website AND Phone)
OR (Website AND Billing Street)

Matching Methods in Matching Rules

The exact matching method looks for strings that exactly match a pattern. If you’re using international data, we recommend using the exact matching method with your matching rules. You can use the exact matching method for almost any field, including custom fields.

The fuzzy matching methods look for strings that approximately match a pattern. Some fuzzy matching methods, such as Acronym and Name Variant, identify similarities using hard-coded dictionaries. Because the dictionaries aren’t comprehensive, results can include unexpected or missing matches. Specific fuzzy matching methods are available for commonly used standard fields on accounts, contacts, and leads.

📘

Add rule

More than one rule can be added if needed. It can be removed as well if not necessary.

🚧

BMA Logic

If the rules don't create a single best match account, the BMA logic will select the oldest created account.

Example screenshot for Fuzzy match criteria and conditions

The below screenshots give an understanding of the different BMA with fuzzy logic cases which involve different criteria and conditions.

Case 1: Country Field matching
Filed setup needs to be created in Fullcast Policy setting by using the field value directly or Lead field value can be used as shown below.

Case 2: Using Picklist in Condition

Case 3: Using Number Field

Case 4: Using 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.

Below is the screenshot of different case studies of BMA with the fuzzy logic results for the Account name Athena Health Limited.