Find Similar Salesforce Cases fast with Data Cloud
Oct 22, 2025
Blog Post:
https://www.infallibletechie.com/2025/10/find-similar-salesforce-cases-fast-with-data-cloud.html
Show More Show Less View Video Transcript
0:04
Hello everyone. In this video, we are
0:07
going to see how to help Salesforce
0:11
service representatives to find similar
0:14
cases whenever they work on a case.
0:17
Let's say I'm a service representative
0:20
and I joined uh a company and I started
0:24
working on uh case management. As a
0:27
service representative, whenever I
0:29
receive a case, I can search similar
0:32
cases using global search. But if I
0:35
wanted to make use of agent force to
0:38
help me find out similar cases, I can
0:42
open those cases and then I can see how
0:46
other service representatives
0:49
were able to resolve the similar cases.
0:53
First, let's see a demo.
0:56
As a service representative, I got this
0:58
case which is related to reject order
1:01
and uh the order number is 1 2 3 4 5 and
1:04
the customer is looking for help to
1:06
reject this order. As a service
1:09
representative,
1:11
I can make use of agent force employee
1:14
agent. Here I can ask
1:21
find
1:22
similar cases for
1:26
reject order.
1:31
So now agent force will try to find
1:35
similar cases
1:38
which are related to reject order issue.
1:46
It is finding the similar cases and then
1:50
once it finds
1:53
it will display
1:55
the related
1:57
cases. So I can see very similar cases
2:01
which are very close to this particular
2:04
reject order case where I'm currently
2:06
working. So I can click this case.
2:16
Okay. Looks like there was some issue.
2:28
Okay. So the issue is here.
2:31
I was using two times in developer.
2:36
Let me create a new version of this.
2:42
Activate it.
2:48
So here if I open it,
2:53
it is
2:56
instead of URL direct, it should be
2:58
view.
3:00
So I can see the similar case and uh I
3:02
should be able to see how it was
3:05
resolved.
3:12
So let's clear this history.
3:19
We can ask the same question again. Find
3:22
the similar cases for
3:26
reject order.
3:47
Okay, there was some issue with the data
3:50
cloud. So it is not retrieving the cases
3:53
but it it will display the cases like
3:57
this and then you should be able to
3:58
select the case and then you should be
4:00
able to um view the existing case. In
4:04
order to achieve it, first step is uh we
4:08
have to create a data stream for case
4:10
object. So in order to create a data
4:13
stream, go to data streams in Salesforce
4:15
tab and uh
4:20
create a new data stream
4:23
and select the fields using which you
4:27
wanted to search similar cases. I have
4:30
selected uh
4:32
subject description and the case number.
4:37
I have selected the case number so that
4:39
it will be very helpful for me to uh
4:42
have a hyperlink to the case number.
4:46
Okay. So once uh you create the data
4:50
stream. So when you create the data
4:52
stream
4:55
you have to click new data new select
4:59
Salesforce CRM
5:02
instead of view bundles
5:05
use view objects and then select the
5:08
standard case object.
5:12
Okay, once that is done
5:15
in the case home data stream you will
5:18
have start here instead of review in the
5:22
start you have to map the fields
5:27
here select the standard case object for
5:30
the DMO when you create a data stream it
5:34
creates a data lake object we have to
5:36
map it to the data uh uh model object
5:40
the DMO should be mapped So map it to
5:44
the Salesforce standard DMO case for
5:47
case DMO. So once that is done,
5:51
you have to create
5:54
a search index. Okay. After the mapping,
5:57
yeah, you have to create a search index.
5:59
So here when you go to the search index
6:03
tab, you can click new, select advanced.
6:10
So here you have to select case which we
6:14
created. Uh this is the DMO
6:17
and uh
6:19
here you have to select the fields
6:25
and then uh
6:28
here also you can select the fields.
6:33
You have to select case case ID, case
6:36
number, description and subject also.
6:38
and then you can click save. Whenever we
6:41
create a search index, Salesforce
6:43
creates default retriever.
6:46
Instead of making use of the default
6:49
retriever, you can delete the default
6:51
retriever which got created because we
6:53
won't be able to add or manage
6:56
additional fields. So you have to go to
6:58
Einstein studio
7:02
go to retrievers
7:04
and then delete the standard uh default
7:08
retriever which is Salesforce creates.
7:10
It is optional to delete. If you want to
7:12
leave it like that, you can leave it
7:13
like that. But uh in order to keep it
7:16
clean uh and tidy, you can delete it.
7:19
Once that is deleted, click the new
7:21
retriever button. Select individual
7:23
retriever
7:27
here. Select data cloud.
7:30
Select your data space. In the DMO, we
7:33
have to select case. In the search
7:35
configuration, you can select all cases.
7:38
So this is the search index which we
7:41
created.
7:44
So I created a search index called all
7:47
cases.
7:50
And this is the configuration for it. I
7:53
have selected uh case number,
7:56
description, subject and data source.
8:01
So you have to once the search index is
8:04
created, you have you can refer that in
8:06
the retriever you can click next. Um and
8:10
then uh
8:13
you have to select the fields here. So
8:16
you can select all documents.
8:18
Next you have to select the fields. So
8:22
select uh
8:24
case ID, case number, description and
8:26
subject. If you want you can also
8:27
include data source. Once that is done,
8:30
click next. Save it. So your retriever
8:33
will look like this.
8:40
So I have selected case ID, case number,
8:42
description and subject.
8:46
Number of results I have set it to five.
8:50
Um
8:52
here you can give higher number also but
8:56
make sure
8:58
uh you are having a good
9:02
uh model selection in your prompt
9:03
template so that if you add more number
9:06
of uh results it is not uh hitting the
9:11
uh token limit. So once that is al once
9:15
this retriever is also created
9:18
you have to create a flex prompt
9:21
template in when you create the flex
9:24
prompt template
9:26
use search string as an input and the
9:29
source type should be free text and you
9:32
can make use of this prompt um as a
9:37
reference.
9:40
So this is the prompt template I'm using
9:49
and then I am making use of the search
9:51
string and then I have selected uh the
9:55
custom retriever which I created and
9:58
then I have instructed it and and then I
10:00
have added the instruction. Once this is
10:03
done, activate it.
10:06
Open the agent force agent.
10:10
Add an instruction like this.
10:13
Use find a similar case action if user
10:16
requests to find similar cases. Display
10:18
the result in rich text format only. So
10:22
this is in instruction.
10:24
I created find the similar cases uh
10:29
agent action.
10:33
The type is uh prompt template.
10:39
Make sure the output rendering is rich
10:42
text so that uh the hyperlink and
10:45
everything works as expected. If you
10:47
don't select rich text, it will display
10:49
the URL and uh it will be a manual uh
10:53
effort for the service representatives
10:55
to copy that URL and open it. Make sure
10:58
the output rendering is rich text so
11:00
that hyperlink and other uh formatting
11:03
whatever we have instructed in the
11:05
prompt and as well as in the instruction
11:07
are uh applied.
11:11
Yeah, once uh this action is added, you
11:14
should be able to test it. So this is
11:17
the prompt template and this is the
11:20
agent action.
11:27
So without any uh code with the help of
11:31
agent force and data cloud service
11:34
representatives will be able to find a
11:36
similar cases whenever they get a case
11:38
and then whenever they work on it.
11:42
Please check the video description. In
11:44
the video description, I have shared my
11:46
blog post. From the blog post, you
11:48
should be able to get the prompt
11:50
template, prompt instruction, and
11:54
stepbystep instructions on how to
11:56
implement this use case.
12:02
I hope it was helpful.
12:09
Thank you for watching.
#Data Management
#Business & Productivity Software
#Internet Software
#Customer Relationship Management (CRM)
