Testing Salesforce Agent Script Multi Turn Workflows with Agentforce Testing Center
Sep 17, 2026
Show More Show Less
View Video Transcript
0:06
Hello everyone.
0:08
In this video, we are going to see
0:10
how to make use of Agent Force Agent
0:13
Force Testing Center
0:15
to test
0:17
Agent Force Agent
0:20
for
0:21
multi-turn conversations.
0:24
First,
0:27
let's test my Agent Force Agent.
0:31
I'm going to manually test it. I'm going
0:34
to ask my Agent Force Employee Agent
0:39
that I would like to
0:41
update a case.
0:45
It is asking me to enter an email
0:47
address.
0:48
I'm giving this
0:50
as my email address.
0:53
It found a multiple cases.
0:56
I'm going to say this is the case for
0:58
which I wanted to update.
1:03
It is asking me to add a comment.
1:08
I'm going to give a comment as uh
1:12
shared
1:14
debugging details to the customer.
1:20
So, it went and updated the
1:24
case.
1:25
Let's
1:27
check whether the case got updated.
1:32
So, it added a comment just now.
1:37
So, it took
1:39
one, two,
1:41
three, and four turns for me to
1:45
test a specific use case
1:47
manually. I wanted to automate this
1:50
using Agent Force Testing Center.
1:53
Whenever I do any changes to my Agent
1:56
Force Agents, I can make use of uh
1:59
the testing center to test my
2:01
Agent Force agents.
2:03
And then I can do some smoke testing,
2:05
and then I can further work on UAT and
2:08
uh go live.
2:09
In order to
2:11
do this, what we can make use of it is
2:14
in the Agent Force Studio
2:17
app,
2:18
go to tests,
2:20
and then you should be able to create a
2:22
new test this suit.
2:24
In order to
2:25
test multi-turn,
2:28
this is the CSV file I have created.
2:32
The first, it will contain the
2:34
conversation.
2:37
Next, expected actions. The first action
2:39
it is going to get the cases with the
2:42
help of email address I have shared.
2:45
And the expected sub-agents, I have only
2:48
one sub-agent uh called the support
2:50
cases management.
2:53
From in in that sub-agent, I have
2:56
two actions, one to get the cases
2:58
matching the email address,
3:00
and other is to update a case.
3:04
So, I have configured this.
3:06
If you wanted to look at what I have
3:08
done,
3:11
in the conversation, the user asks
3:13
support cases agent to update a case.
3:15
So, I have given the scenario. Whenever
3:18
it is asking the email, the user replies
3:20
with this email.
3:22
Whenever they are saying whenever the
3:24
agent says that it found so many cases,
3:26
I'm going to
3:27
give this is the case record.
3:30
Whenever the agent confirms,
3:33
it should ask for uh resolution comment.
3:36
And for the resolution comment,
3:38
within single quote, I have given this
3:40
is the resolution comment.
3:42
And these are all the
3:45
expected actions, and this is this is
3:46
the
3:47
expected sub-agent.
3:51
So,
3:52
I have given the full scenario in the
3:54
conversation.
3:56
What actions the agent should pick, I
3:59
have given.
4:01
And the sub agent expected also I have
4:04
given.
4:06
When the Agent Assist Testing Center
4:08
test using this uh
4:10
CSV file, it will make use of this
4:13
utterance alone.
4:14
And then,
4:16
it will compare whether the expected
4:18
actions and expected sub agents are
4:22
uh matched with the runtime.
4:25
Once it is matched, it will it will be a
4:27
pass. If it is failed, it will be
4:30
failed.
4:32
Mm, one more important thing is
4:35
based on this uh
4:37
and based on the manual testing,
4:40
it took four turns for us to test it.
4:43
We can verify whether the Agent Assist
4:45
Testing Center is also taking the same
4:47
number of
4:49
uh turns to test it out.
4:51
So, let me close this.
4:56
I'm going to quit this.
4:58
Now, go to tests.
5:02
Select agent.
5:04
Select conversational level testing
5:06
because we are going to test
5:07
multi-turns.
5:09
I'm going to give
5:11
employee agent testing.
5:14
I'm going to select the employee agent
5:17
Assist agent.
5:19
Active version is selected.
5:22
If you wanted to include any context
5:24
variables, you can make use of include
5:26
context variables.
5:28
For data, you can generate with the help
5:31
of uh
5:32
in the LLM, which uh for that, you can
5:35
make use of generate test cases button.
5:38
But, I'm going to upload my test cases.
5:44
So, this is my
5:48
CSV file.
5:54
Next,
5:55
I wanted to evaluate whether the
5:57
sub-agent and actions are also
6:00
correct.
6:01
So, I have enabled it.
6:04
Once you click save, the testing suit
6:07
will be getting created.
6:09
Do not click run test
6:11
until the values are populated.
6:18
Okay.
6:19
So, we provided three columns, one
6:22
conversation, expected actions, and
6:23
expected sub-agents.
6:25
Now, if I click run test, the agent will
6:28
respond. It will see
6:32
the expected sub-agent. It will evaluate
6:34
the sub-agent.
6:36
It will see what
6:38
what the sub-agent was actually invoked.
6:42
It also check what
6:44
action was evaluated, what action what
6:47
actual action was executed. It also do
6:50
the task resolution evolution for us.
6:54
Now, let let's click the run test.
7:02
So, in the test case, I have given the
7:04
same email ID and the same case.
7:08
And
7:14
for
7:15
the comments, I have given updated the
7:17
customer with resolution steps, shared
7:19
the debugging details.
7:21
Let's go to the case. Okay.
7:23
The sub-agent evaluation is successful.
7:28
It got passed.
7:31
It should also give us the turn, but
7:33
let's give some time for the agent
7:37
for the testing result to
7:39
Okay. It gave the turns also four. So,
7:42
when we tested, okay, so this is how the
7:44
testing happened.
7:50
The same way however we tested manually,
7:53
we are able to automate it.
7:56
And it is a multi-turn
7:58
agent force agent script testing.
8:03
So, here you can find out how many turns
8:06
it took.
8:08
It is very similar to how we
8:10
we tested manually.
8:14
So, I was able to see all the four
8:16
turns.
8:19
Next, let's verify.
8:23
Okay. So, it also added
8:26
the information to the case.
8:30
So, make use of agent force testing
8:33
center
8:34
for conversational multi-turn
8:38
test
8:39
testing of your agent force agents.
8:46
Please check the video description. In
8:48
the video description, I have given my
8:50
blog post. From the blog post, you can
8:52
download the sample CSV file for your
8:55
reference.
8:56
If you wanted to see which agent force
9:00
agent script I tested for your
9:02
reference, you can check it get it from
9:05
here. So, from this, you will be able to
9:07
get the sample agent script
9:10
the testing center tested for your
9:13
reference.
9:19
I hope it was helpful.
9:27
Thank you for watching.
9:41
>> Mhm.
Internet Software
Science
