Use Case: Formula In Matching Rule With Before-Save Trigger

Have you one of the voters of this idea and is disappointed that you haven’t heard about any updates? Well, let’s stop waiting and do something! We might not be able to use a formula field in the matching rule yet, but there is a very easy workaround and is working like a charm. Let’s dive into how to set this up!

Lulu Mobile uses the standard Lead object to track their new prospects. Whenever a sales rep outreaches to a potential customer by call, a Call ID will be generated. They then need to register that lead together with the Call ID. This Call ID has a format of 9 numbers. The first four is the date of the call and the rest is a unique auto number. For example, 0317-24468 means the call was from Mar. 17th and it was the 24468th call the company has made. The company notices there are a lot of duplicates for various reasons. Mostly because the sales reps will easily forget if they have registered the leads and whether they use 5 or 9 digits for the Call ID. Thus, they want to configure a duplicate rule to check only the last 5 digits of this Call ID.

We can easily get the last 5 digits by using the RIGHT() function. However, the matching rule does not allow us to use a formula field as a criterion. To solve this, we can use a before-save triggered flow to populate another field that extracts the last 5 digits from the Call ID. Since the flow executes before the record is saved, we can alert the sales reps while they are still on the Lead Creation page.

Record-TriggeredAssignment
DecisionFormulaFormula

Does the solution solve your problem? If not, write us what your problem is and we will build the flow for you!

Official Salesforce Help Article On Flow

Subscribe
Notify of
guest

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Richard

Thank you Melody! Where/How do you even learn these things. It’s either this solution or I’d have to use code. I choose this!