Testing, Deployment, and Optimization
Testing and deployment
Agentforce Testing Center lets you define test cases (utterance, expected topic or action, expected outcome) and run batch tests. Conversation preview is for interactive debugging; analytics and session tracing show topic selection, action calls, latency, and guardrail events. Deploy through sandboxes and metadata change sets or DevOps, version agents, and activate only after regression tests pass. After release, monitor containment, escalation rate, CSAT, and error rates.
Concepts to know
- Test paraphrases, ambiguous requests, and adversarial prompts.
- Test slot filling and missing-input handling.
- Validate permissions in the target org, not just sandbox.
- Plan rollback and versioning.
Traps
Testing only the happy path hides misclassification. Testing in production risks customer exposure. Ignoring latency and cost per session is common. Another trap is assuming a passing preview equals a passing batch test. Do not forget guest-user and channel-specific behavior.
Worked example
Before launching a service agent, create 30 test cases across five topics, including “cancel my order” (out of scope) and a prompt-injection attempt. Require at least 90% topic accuracy and zero unauthorized actions, then deploy to sandbox, run again, and activate in production with a fallback to human. Rule of thumb: test the edges, not the demo.