How does Best Match Account work?

IN THIS ARTICLE

Creating Fullcast Policy Rules for Best Match Account                   

Criteria and Condition Setting                  

Calling BMA from Process Builder

The best match account process is a filtering mechanism based on the rules configured in a specific order to get a record (lead/opportunity/cases/contact) to match to one account.  

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. 

  5. 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.
  6. The Fullcast Policy Rules Name is automatically picked which is the unique name used by the API and managed packages. 
  7. Pick Criteria and Condition fields from the drop-down menu available. 
  8. String field needs to be updated only if the Criteria field picked is LITERAL.
  9. Field 1 Object is Lead or Contact which needs to be compared with the Account.
  10. Field 1 is the API field of the Field 1 object which needs to be compared API field of the Account.
  11. Field 2 Object should always be Account which is compared with Field 1 object.
  12. Field 2 is the API field of Field 2 Account which is compared with the API field of the Field 1 object. 

Criteria and Condition Setting

Criteria Fields Compared Conditions Supported
Field Compare Field 1 on the Field 1 Object (Eg. Lead/Contact) to Field 2
on the Field 2 Object (which should always be an account)
AND, OR
Literal Field 2 on the Field 2 object(Account) to String value provided
on the Custom Metadata.
AND, OR
Tie Breaker 2 best match accounts MAX, MIN, EXIT
Fuzzy Logic Unsure data fields AND, OR

Field Compare Example

Literal example

Tie-Breaker Criteria

‘TIE BREAKER’ - Using the Field compare or Literal criteria if we get more than 1 Account, the TIE between the records has to be broken to find a single record. 
  • More than one tie-breaker criteria could be used. 
  • MIN is used to order the records in ascending order.
  • MAX is used to order the records in descending order.
  • EXIT is used if the user does not want to choose any from the tied (similar) records, instead prefers a null value for the BMA.

Tie-breaker Example

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

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 

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 order for that as 2  

BMA Logic

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

13. Choose which operation to be performed from the drop-down menu for the field Operator. Use the below table to pick the correct operator based on the Field type being used in Field 1 and Field 2 in the rules.
Data Types Operators Supported
PICKLIST
Not Equal To
MULTIPICKLIST
Equals To, Contains All, Contains Any,
Does not contain
URL
Not Equal To
STRING
Equals To
EMAIL
Contains All, Contains Any, Does not contain
BOOLEAN
Not Equals To, Equals to
CURRENCY
Not Equal To
PERCENT
Equals To
DOUBLE
Greater than, Greater than or equals to,
Less than, Less than or equal to
DATE
Not Equals to
DATETIME
Greater than, Greater than or equals to,
Less than, Less than or equal to, Equals to
14. 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. 
15. Module name carries the name of your choice. It is an optional field.
16. Click Save to trigger and call the policy rule whenever necessary.  

The below table gives an idea about the supported basic logical expressions and setup 

Calling BMA from Flow Builder

The process builder needs to be created in order to sync the domain and call the BMA. 

Configure the flow builder by following the link. 

The apex variables for BMA is as follows:

  1. RecordID : Use field reference in the type to select AccountID
  2. PolicyType: Set the Type to string with value "CleanDomain" (case sensitive) 
  3. If inputVal1 is Yes, it will call clean domain functionality.
  4. If inputVal1 is No, it will not call clean domain functionality.
  5. If inputVal2 is Yes, it will execute BMA functionality.
  6. If inputVal2 is No, it will not execute BMA functionality. 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us