BMA fuzzy logic Pre-requisites
- Create Fullcast Policy rule in Custom metadata type.
- Enable Standard Account Duplicate rule in Salesforce.
- Enable triggers in Fullcast Setting or call BMA using Process builder to fetch clean domain functionality or BMA.
If the rules don't create a single best match account, the BMA logic will select the oldest created account.
Fullcast policy rules are configured in the Salesforce instance.
- Log in to the Salesforce account.
- Click on the Setup and search for Custom Metadata types
- Click on Manage Records against Fullcast Policy Rules.
- Click New and start creating the rules.
- 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.
- The Fullcast Policy Rules Name is automatically picked which is the unique name used by the API and managed packages.
- Pick Criteria as Fuzzy Logic and AND or OR Condition fields from the drop-down menu available.
- String field needs to be updated only if the Criteria field picked is LITERAL.
- Field 1 Object is Lead or Contact which needs to be compared with the Account.
- Field 1 is the API field of the Field 1 object which needs to be compared API field of the Account.
- Field 2 Object should always be Account which is compared with Field 1 object.
- Field 2 is the API field of Field 2 Account which is compared with the API field of the Field 1 object.
- 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.
- 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.
- Module name carries the name of your choice. It is an optional field.
- Click Save to trigger and call the policy rule whenever necessary.
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.
- Search for Duplicate Rule in the Quick find tab in the Salesforce environment.
- Select Account from the dropdown menu for which the rule has to be created. Create New Duplicate Rule by clicking the New rule tab.
- Enter the Rule Name. Description field which describes the rule is an optional field.
- Object for which the rule is created is displayed in the object field.
- 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.
- 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.
- In the Matching Rules fields select from the drop-down menu to define how duplicate records are identified.
- 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.
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.
- Select the Matching rule required for comparison. In this particular example, it is the Standard Account Matching Rule.
- Select the fields that need to be mapped. The below example shows the fields that are mapped in the Standard Account Matching Rule.
- 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.
Click Save to create the duplicate rule.
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. More than one rule can be added if needed. It can be removed as well if not necessary.
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)
Triggering the BMA function
After setting up the rules, it is essential to trigger the process either by enabling the flags in Fullcast setting or by calling BMA in Process builder.
- Click on the Setup and search for Custom Metadata types
- Click on 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.
- The process builder needs to be created in order to sync the domain and call the BMA.
- Once the lead is triggered BMA should be fetched.
- BMA will be fetched based on the BMA rules.
- We can call both Clean domain and BMA functionality through Process builder. We can execute both the functionalities based on the inputVal1 and inputVal2.
(i) If inputVal1 is Yes, it will call clean domain functionality.
(ii) If inputVal1 is No, it will not call clean domain functionality.
(iii) If inputVal2 is Yes, it will execute BMA functionality.
(iv) If inputVal2 is No, it will not execute BMA functionality.
The Best Matched Account for the Lead Account is displayed in the BMA field if there is any record found. Below is an example of Lead detail with a best matched account.
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
Field 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.
Updated 3 months ago