- Home
- /
- Salesforce Testing
- /
- Agentforce Testing
- /
- Topic Testing
Agentforce Topic Testing
Agentforce topic testing validates that a Salesforce AI agent classifies each request to the correct topic and routes it there, so the agent operates with the right instructions and the right set of permitted actions. It asserts the expected topic for every request before anything else happens.
An emerging, active-roadmap capability, available today for demonstration and proof-of-concept validation with Salesforce testing teams.
Why topic routing is the first thing to get right
In Agentforce, a topic groups the instructions, business rules and permitted actions the agent uses for a particular kind of request. When a message arrives, the agent first classifies it to a topic; everything that follows, from tone to which actions are even available, depends on that choice. If the request is routed to the wrong topic, the agent may apply the wrong instructions or reach for an action it should never have had access to.
Topic testing owns that routing decision. It asserts, for each request, which topic the agent should select, then confirms the classification matches. Because routing is a discrete choice, it can be judged as a clean pass or fail: the selected topic either equals the expected topic or it does not. This makes topic testing one of the most deterministic and highest-leverage checks in the whole Agentforce testing practice.
The leverage comes from how early routing sits in the chain. A response can be well written and an action can execute flawlessly, but if the request was routed to the wrong topic, all of that effort was applied to the wrong problem. Fixing routing therefore prevents a whole class of downstream failures at once. It also tends to be the most stable thing to test, because a topic assignment is a clear label that either matches the expectation or does not, which makes routing results easy to trend and easy to defend in an audit.
The routing problems topic testing is designed to catch include:
Misrouting to a neighbor
A request lands on a similar but wrong topic, applying the wrong instructions and actions.
Overlapping topics
Two topics compete for the same requests, so routing becomes unpredictable.
Missing coverage
A valid request matches no topic and falls through to a generic or fallback response.
Out-of-scope acceptance
A request the agent should decline is routed to a topic and acted on anyway.
Ambiguity mishandling
A genuinely ambiguous request is routed confidently instead of prompting for clarification.
Drift after edits
Adding or renaming a topic silently reroutes requests that used to land correctly.
These problems cluster at the boundaries between topics, which is why the strongest topic tests deliberately probe the edges rather than the obvious center of each topic. A request that clearly belongs to one topic rarely misroutes; the risk lives in the requests that could plausibly belong to two. Concentrating test cases on those overlaps, and on the requests that should route nowhere at all, is what makes topic testing catch the failures that matter before they reach a user.
How SyntraFlow is designed to test topic routing
SyntraFlow is designed to assert the expected topic for each request and score routing accuracy across the whole topic model, running on Salesforce's native Testing API underneath and adding expected-topic assertions, coverage analysis and evidence around it.
Map the topic model
Enumerate every topic the agent supports and the kinds of requests each should own, so routing has a complete reference to test against.
Define expected-topic assertions
For each test request, state the topic it must route to, including cases that should route to a fallback or trigger a clarifying question.
Test the boundaries
Include requests that sit near the edges between similar topics, since misrouting is most likely where topics overlap.
Score routing accuracy
Compare the selected topic to the expected topic for every request and report routing accuracy per topic, so weak spots are visible.
Re-check after every change
Re-run the routing assertions whenever a topic is added, merged or renamed, so changes do not quietly reroute existing requests.
Expected-topic assertions in practice
Each request carries an expected topic that the agent's classification must match. Fallback and clarification cases are assertions too.
| Request | Expected topic | Why it is a routing test |
|---|---|---|
| "I want to return this item." | Returns & refunds | Must not route to order status or billing. |
| "I was charged twice." | Billing dispute | Sits near returns and payments; a common misroute. |
| "Can you invest my refund for me?" | Fallback / decline | Out of scope; must not be routed to any action topic. |
| "It's broken." | Clarify first | Too ambiguous to route; should ask what is broken. |
| "Update my shipping address." | Account details | Must not route to returns despite mentioning an order. |
Getting the topic right is what makes the rest of the agent's behavior possible. Once a request is on the correct topic, the agent still has to pick the right action, which is verified by action testing, and it has to route correctly across every phrasing, which is where utterance testing feeds many variants into these same assertions.
Correct routing protects downstream systems
A misrouted request can trigger the wrong action against Oracle, SAP, Workday or NetSuite, so routing errors do not stay inside Salesforce. SyntraFlow is designed to tie topic assertions to the end-to-end outcome across application boundaries, pairing topic testing with Oracle ERP testing so a routing mistake is caught before it writes to the wrong system.
Outcomes
Reliable topic routing is the foundation of a trustworthy agent. SyntraFlow is designed to support these outcomes.
Accurate routing
Confirm requests reach the right topic and its correct instructions and actions.
Fewer misroutes
Catch overlaps and boundary confusions between similar topics.
Scope enforcement
Verify out-of-scope requests fall to a fallback rather than an action topic.
Coverage visibility
See which topics are weak so instructions can be sharpened where it matters.
Safe topic edits
Re-verify routing after adding or renaming a topic to prevent silent drift.
Deterministic evidence
Record routing pass or fail results as clean, defensible audit evidence.
Topic testing FAQs
What is Agentforce topic testing?
It is the practice of validating that a Salesforce AI agent classifies each request to the correct topic and routes it there. Because a topic determines the instructions and permitted actions the agent uses, topic testing asserts the expected topic for every request and confirms the classification matches.
What is a topic in Agentforce?
A topic groups the instructions, business rules and permitted actions the agent uses for a particular kind of request. When a message arrives, the agent classifies it to a topic, and that choice governs how it responds and which actions are available.
What is an expected-topic assertion?
It is a statement, attached to a test request, of which topic the agent should route it to. The test passes only if the agent's selected topic matches, and assertions also cover requests that should reach a fallback or trigger a clarifying question.
Why do topics get misrouted?
Misrouting usually happens where topics overlap, where coverage is missing so a request falls through, or after a topic is added or renamed and existing requests silently reroute. Testing the boundaries between similar topics is the most effective way to catch these.
How does topic testing relate to action testing?
Topic routing comes first and determines which actions are even available. Once a request is on the correct topic, action testing verifies the agent then selects and executes the right action. Both are needed for correct behavior.
Does SyntraFlow replace Agentforce Testing Center?
No. Agentforce Testing Center and the Testing API are Salesforce's native tools for defining and running agent tests. SyntraFlow is designed to complement them by structuring expected-topic assertions, scoring routing accuracy across the topic model and keeping the results evidence-backed and versioned.
Make sure every request lands on the right topic
See how SyntraFlow is designed to assert expected topics and score routing accuracy with repeatable, evidence-driven Agentforce testing. Available today for demonstration and proof-of-concept validation.