How to use Salesforce Prompt Templates to draft Service Emails?
Mar 26, 2026
Show More Show Less
View Video Transcript
0:06
Hello everyone. In this video, we are
0:09
going to see how to make use of
0:11
Salesforce prompt template to generate
0:16
emails.
0:18
For service representatives in
0:20
Salesforce, they usually work on cases
0:23
and then they will be responding back to
0:25
the customers via emails. Let's say you
0:29
wanted to make use of generative AI to
0:32
produce the uh content with the relevant
0:35
context sent to the generative AI so
0:38
that it will generate a right email that
0:42
can be sent uh to the uh end users.
0:49
The prerequisite for this is you need
0:53
Einstein service email assistant
0:55
permission set uh so that the service
0:59
representatives can see draft with the
1:02
AI
1:04
uh option. So if I'm a service rep on
1:07
the email composer once I click compose
1:11
in order to see this draft with AI
1:16
the user need Einstein service email
1:20
assistant user permission set. So make
1:22
sure this permission set is available.
1:24
If it is not available then you should
1:26
get the add-on SQU so that you will be
1:29
able to assign this permission set. Once
1:32
this is done, as a Salesforce system
1:34
admin,
1:36
go to setup, go to prompt builder,
1:40
you can also find some pre-made email
1:43
templates that are available.
1:46
For example, if I click uh draft with
1:49
AI,
1:52
I will be able to see some standard uh
1:55
prompt templates that are already
1:57
available so that I can select so that
2:00
it will generate the
2:02
email. Let's say you are not comfortable
2:05
with the standard ones, you want to add
2:07
more context, then you can make use of
2:10
custom prompt template.
2:13
So service email is the template type
2:16
when you create the
2:19
prompt template for service emails. So
2:23
you you will be able to find multiple.
2:26
These are all the standard ones.
2:32
Okay.
2:34
I created case email generation. It's a
2:38
custom uh prompt template of type
2:41
service email template type.
2:44
Here I have given a role what what what
2:48
should be the task customer context
2:52
for grounding. I'm making use of
2:53
Salesforce data library and some
2:56
instructions and constraints.
3:00
I have given this uh sample prompt
3:03
template in my blog post. You can use
3:07
this as a reference.
3:11
Let's say you wanted to add more
3:13
context. Then you can make use of this
3:16
insert resource and then you should be
3:18
able to invoke flow. you should be able
3:21
to invoke apex uh and then you will be
3:23
able to get additional context and then
3:26
you should be able to um insert those
3:29
context before doing the uh calls to the
3:33
generative uh AI models. You you will be
3:37
also able to select the models so that
3:42
uh you will be very comfortable um in
3:46
generating the content. If you are not
3:48
happy with open a GPT4 omni mini model
3:51
which comes as a default, you will be
3:53
able to select um other models also
3:56
which are available here.
3:59
You can also bring your own model. Uh
4:02
for that you have to go to Salesforce
4:04
Einstein studio and then you should be
4:06
able to add your uh um model. Uh please
4:10
check what are all the supported models
4:12
so that you can bring your own model
4:14
into Salesforce.
4:17
Now the customer is uh requesting for
4:20
reject order and let's see the
4:24
description. They need help to reject
4:27
the order. So now if I'm a service rep,
4:30
I usually go here um and then I generate
4:34
uh the content. Um I will type the
4:36
content and then I will send. But let's
4:39
see how we can improve the productivity
4:41
here. So here I'm going to select the
4:44
case email generation custom prompt
4:46
template.
4:54
So it was quickly able to generate the
4:57
email as a service rep. I will go over
5:00
this. If I wanted to do some changes, I
5:03
can definitely do some changes and then
5:05
I should be able to click done and then
5:08
I will be able to send the email.
5:14
So now I I will be able to send it.
5:21
So this particular content I was able to
5:24
get it from the knowledge article
5:28
through uh through this agent force data
5:31
library.
5:38
you can uh refer multiple agent force
5:42
data libraries in one single prompt
5:44
template. So if you have some file based
5:47
content, if you have some web- based uh
5:49
retriever, then you will be able to
5:51
refer multiple uh uh retrievers in this
5:54
prompt template and then you you will be
5:56
able to add additional context so that
5:59
the emails getting generated are
6:00
accurate and they are not getting
6:03
hallucinated.
6:12
Please check the video description. In
6:13
the video description, I have shared my
6:15
blog post. From the blog post, you will
6:18
be able to get the sample prompt
6:20
template and other steps, some best
6:23
practices and recommendations that you
6:25
have to follow when setting up this
6:27
Einstein service emails feature.
6:40
I hope it was helpful.
6:53
Thank you for watching.
#Internet Software
