Case Management – Duplicate Search
In this blog article, we will see in detail about duplicate search in case management.
Pega provides some OOTB case work step that can automatically does the duplicate search functionality.
Let’s take the insurance claim example.
I have a business requirement like, the same insurance policy CANNOT have more than one claim. This is an obvious requirement.
Now think how can we determine a case as a duplicate?
We have to check if a case is already present in the system with the same attributes.
In Pega, we refer properties as attributes.
So we come to a conclusion, that properties can be used to search and check if a duplicate case is already available in the system.
Now there comes a certain situation, where some properties may not be available ( not mandatory), then how can we identify the duplicate?
We can use some group of properties and use some weighted calculation to determine the duplicate.
For example: XYZ is an Insurance company that provides policies to customers. They face certain situation that they receive same request multiple times and end up creating duplicate insurance policy cases for customers. To avoid this, they designed some duplicate search requirement.
Below is their requirement: Same customer cannot have multiple policies in same insurance type, say Insurance type = home.
Their business say, Use the 4 customer attributes – Name, date of birth, Phone number & address.
So if any existing case that matches Insurance type and 3 out of 4 customer attributes, then the existing case can be considered duplicate
How to implement a Duplicate Search scenario??
Case match rule can be used to identify the duplicate case
What is a case match rule?
Case match rule can be used to fetch the duplicate cases present matching the criteria specified.
It is kind of more or less like a Obj-Browse.
Duplicate Search smart shape uses case match rule to identify the duplicate case.
You add it in Case step or from the flow rule
First, let see how to use a case match rule
For testing purpose, create a new case match rule
Records -> Decision -> Case match rule
The rule contains a single main tab.
Note: Prior to Pega 7, you get a retrieval tab where you can specify a activity to fetch the duplicate.
Case Matching type
It was originally designed as dropdown with two values
a) Seek cases – Fetches all the duplicate cases that match the conditions specified
b) Seek first case – fetch only the first case ( this is deprecated in pega 7)
You have two matching conditions block
- Must match conditions
- Weighted match condition
Must match condition
Specify the conditions that must evaluate to true for the case to be considered duplicate.
Potential duplicates – Select the property name.
Relationship – Specify the relation
You can add multiple must match conditions and use filter logic.
Weighted match conditions
You can use weighted condition to determine the potential duplicate.
You can look at the picture again.
As per the business requirement, out of 4 customer attributes, 3 have to match to identify it as a potential duplicate.
Let’s do simple math. We can give 25% as the weight for each attribute and overall, it should score 75% (Just like the CSA, CSSA, LSA cut off scores :D)
You can specify the weight for each condition and the overall weight should be greater than or equal to the Pass mark 🙂
Note: Weighted condition is always mandatory, where must match condition is optional
Let’s configure this from case designer.
As usual, the case designer accepts some input and creates the Case match at the back end.
How do configure duplicate search from the case designer?
You can now configure the duplicate search in a more low-code way.
Step 1: Open the case designer and go to the Settings tab.
Step 2: Click on track duplicates.
Step 3: Scroll up and configure the weighted conditions and must match conditions.
In this claims case, I can have the Insurance ID as the only required property to identify if there is already a claim is requested for the same insurance.
Since the weighted condition is mandatory, I am treating weighted as must match ( tweaking!)
Uncheck must match condition.
Now let’s see the case match rule created at the back end. pyDefaultCaseMatch
Now we have configured the duplicate search business logic with the Claims case
The next step is to decide where to invoke this duplicate search!
Ideally, it should follow the step where we collect the Claim request details
Step 1: Go to case designer – workflow tab
Click add new step in stage 1. Select more.
Step 2: from utilities select ‘Duplicate search’.
Step 3: Drag the step to the second place after collect information.
Step 4: Save the case and check the ‘ClaimRequest’ flow.
You can see ‘Duplicate search cases’ shape is added automatically.
Now let’s test the duplicate search
Step 1: create a new case C-13 and enter Insurance ID as “A-1234”
Step 2: now create another case C-14 providing same Insurance ID. ( 2 people are raising the claim for same Insurance)
Step 3: click submit and proceed.
Now you will get an assignment listing all the duplicate cases.
You select and mark the current case C-14 as duplicate.
You also have the option to continue without resolving the duplicate case.
Step 4: Select resolve as duplicate.
Technically, pega uses the flow pyDuplicateSearchCases to search and display the duplicate cases.
This flow is in an available state and can be extended to your application class!
We are at the end of the duplicate search functionality article.