Basic configuration setup
Create Fullcast Policy rule in Custom metadata type.
Refer to the table to pick the correct operator based on the Field type being used in Field 1 and Field 2 in the rules.
Select Fuzzy Logic for the Criteria and AND or OR the Condition.
Enable triggers in Fullcast Setting or Call BMA using Flow to fetch clean domain functionality or BMA.
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.
Search for Duplicate Rule in the quick find tab in the Salesforce.
From the dropdown, select Account.
Click New Rule.

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
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
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.
Click Save to create the duplicate rule. The standard account duplicate rule created screen will look like the following:

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 or Field- Compare.
Enable triggers in Fullcast Setting
Click Setup and search for Custom Metadata types.
Click Manage Records against Fullcast Setting.
Click New and start creating the Fullcast Setting.
Select a Label for the setting.
Check the Account, Contact and Lead trigger flags.
Set a number for the Error log that needs to be displayed.
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.

Configuration of flow for BMA with fuzzy logic
Setup a flow in Salesforce environment 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.

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.




Case 2: Use picklist in Condition

Case 3: Use number field

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.



