How to Test Agentforce | Salesforce

See how to test a Salesforce Agentforce agent built to handle product returns. The demo shows manual testing of single cases, then uses Testing Center to auto-generate 100 utterance variations, run them against the agent, and validate that it classifies topics correctly, executes actions in the right order, and produces the outcomes you want.
Chapters
Here I am inside agentforce where I've just given this agent the ability to handle product returns. I did this by defining this new topic and these natural language instructions that describe how the agent should do this job and these actions based on my business workflows that the agent can execute to do this job. Which means I'm ready to test this agent's ability to handle product returns, which I can do by typing I want to return this product because it's not what I expected. I'll give it a second and now I can validate this agent did the job in the way I expect by first confirming the topic classification is correct and then inspecting the actions and the order of those actions the agent executed to do this job. And finally I can inspect the response to ensure the agent followed all my instructions. And it all looks good to me. So I guess I'm ready to deploy, right? Well, this is where it gets tricky because inside this text box anything could happen. What if our customer types I want to return this product because it's giving me an error. In this case I would want the agent to help troubleshoot or what if the customer types I want to return this product because it doesn't fit well now I want the agent to initiate a product swap and what if the customer types I want to return this product because I am so frustrated with your company. In this case I I want the agent to immediately escalate and transfer to a human. These are just a few variations of this one job. Product returns and this agent can do many other jobs. And this is what makes testing agents so challenging. Many things could happen. Only some things should happen. And a good outcome, well, that's often subjective. So how can AgentForce help? Well, let's click into batch test and find out. So this is where you'll test your agents by typing a natural language description of what you want to test and providing your test cases which AgentForce will help you generate based on the description above. And when you click generate test cases, a lot is going to happen because what you're seeing here is AgentForce's testing center and it's testing that this agent is working as expected. And when it's finished, you'll have a report. But what just happened? Well, as you've seen, there are many ways to start a job. And testing center just generated 100 variations of jobs this agent might be asked to do. And it tested each of those utterances by interacting with the agent and inspecting all the metadata and variables for each interaction that testing center used to verify that each utterance was classified correctly by comparing the expected topic to the match topic. Testing center then verified that the right actions were executed and executed in the right order and used to produce the desired outcome. But not an outcome that is verified based on pattern matching, but rather an outcome that is validated based on description of the desired outcome. It would take you hours to generate a report like this manually, but Testing center makes this possible within a few minutes. And that is how AgentForce's testing center helps you automate the testing of your agents so you can confidently deploy. To learn more, visit agentforce.com thanks for watching.










