AGENTFORCE TESTING

Agentforce Testing for Trusted Salesforce AI Agents

Agentforce testing validates how a Salesforce AI agent understands requests, selects topics, executes actions, uses enterprise data and completes real business outcomes. SyntraFlow gives teams a repeatable, evidence-driven way to evaluate agent behaviour before and after every change, so autonomous agents can be trusted in production.

An active-roadmap capability, available today for demonstration and proof-of-concept validation with Salesforce testing teams.

Why Agentforce testing is different

Traditional Salesforce UI and integration tests compare a deterministic action to an expected outcome: click a button, verify a field, assert a record state. That model still matters for the Flows, Apex and APIs an agent triggers, but it is not enough for an autonomous agent. Agentforce agents interpret natural language, choose how to respond and decide which actions to run, so the surrounding behaviour must be evaluated with broader techniques than a single pass or fail assertion.

This does not mean agent output is always nondeterministic or unpredictable. With grounded data, clear instructions and constrained actions, a well-designed agent should behave consistently. The point is that natural-language input arrives in many forms, and model-driven reasoning introduces variation in wording and phrasing that a strict string comparison cannot fairly judge. Robust Agentforce testing therefore combines deterministic checks on the actions an agent takes with evaluation methods that judge intent, meaning, grounding and outcome quality.

Alongside the deterministic action checks you already run, Agentforce testing must also validate the following behaviours:

Intent recognition

Whether the agent correctly understands what the user is actually asking for, across informal, ambiguous and multi-part requests.

Topic selection

Whether the request is routed to the right topic so the agent operates with the correct instructions and permitted actions.

Action selection

Whether the agent chooses the appropriate action, Flow or API call, and avoids running actions it should not.

Response correctness

Whether the natural-language answer is accurate, complete and appropriate for the request and the audience.

Grounding quality

Whether responses are grounded in approved Salesforce data and knowledge rather than unsupported or invented claims.

Data-access boundaries

Whether the agent respects the running user's permissions, sharing rules and field-level security when reading and writing data.

Business-process completion

Whether the agent actually finishes the task end to end, not just produces a plausible-sounding reply.

Consistency across utterances

Whether varied phrasings of the same request produce equivalent, correct behaviour and outcomes.

Escalation & human handoff

Whether the agent escalates or hands off to a human at the right moment, with the right context transferred.

Safety & guardrails

Whether the agent resists prompt injection, refuses out-of-scope actions and avoids exposing sensitive information.

Latency

Whether the agent responds within an acceptable time for the channel and use case under realistic load.

Failure recovery

Whether the agent recovers gracefully when an action, integration or data lookup fails, rather than stalling or misleading the user.

The table below contrasts what traditional Salesforce testing covers with what Agentforce testing must add on top of it.

Dimension Traditional Salesforce testing Agentforce testing adds
InputFixed clicks, fields and API payloads.Open-ended natural language in many phrasings.
What is judgedA deterministic result matched to an expected value.Intent, topic routing, action choice and grounding, plus the deterministic result.
Evaluation methodPass or fail assertions on state.Assertions on actions, combined with meaning- and quality-based evaluation of responses.
Success criterionThe step executed as configured.The business outcome completed correctly across every system involved.
Security focusProfiles, permission sets and sharing on the UI or API.The same controls plus prompt injection, tool misuse and unsupported disclosure by the agent.

This broader scope is why Agentforce testing sits alongside, and reuses the discipline of, established Salesforce test automation and release intelligence practices rather than replacing them. It treats the agent as a new layer of behaviour to verify, not a reason to abandon the deterministic checks your Salesforce org already depends on.

The Agentforce testing framework

A trustworthy agent has to be evaluated at every layer of its behaviour, from the first word a user types to the business outcome recorded weeks later in production. SyntraFlow structures Agentforce testing across twelve layers so that no part of the agent lifecycle is left unverified.

1

Utterance testing

Exercise the agent with many real-world phrasings of each request, including slang, typos, abbreviations and multi-intent messages, to confirm it handles the language users actually send.

2

Intent & topic routing

Verify that each utterance is classified to the correct intent and routed to the intended topic, so the agent applies the right instructions and the correct set of permitted actions.

3

Instruction compliance

Check that the agent follows its topic instructions, tone, business rules and constraints, and does not stray beyond the scope it was configured to handle.

4

Action selection

Confirm the agent selects the correct action for the task, chooses appropriate inputs, and refrains from invoking actions that are irrelevant, premature or unauthorised.

5

Flow & Apex execution

Validate that the Flows and Apex behind each action execute correctly, update the expected records and produce the deterministic results the business process depends on.

6

External tool & API invocation

Test the external tools, connectors and APIs an agent calls, verifying request payloads, responses, error handling and the downstream effect in connected systems.

7

Grounding & data validation

Assess whether answers are grounded in approved Salesforce records, knowledge articles and retrieval sources, and detect unsupported or fabricated claims.

8

Response quality

Evaluate accuracy, completeness, relevance, tone and helpfulness of the natural-language reply against defined quality criteria for each topic.

9

Security & permissions

Confirm the agent honours user context, object and field access, sharing rules and sensitive-data controls, and cannot be steered into unauthorised actions.

10

Human handoff

Verify escalation triggers fire at the right time and that context, history and case data transfer cleanly to a human agent or service queue.

11

End-to-end business outcome

Confirm the agent completes the full business task, such as a resolved case, a placed order or an updated opportunity, across every system involved.

12

Regression & production monitoring

Re-run the full suite after every prompt, action, topic, model or release change, and monitor live behaviour so regressions are caught before they reach users.

Works with Salesforce-native testing

Salesforce provides its own tooling for evaluating Agentforce agents, and SyntraFlow is designed to build on top of it rather than compete with it. SyntraFlow is positioned as a complementary enterprise testing and orchestration layer that adds repeatable regression, cross-application outcome validation and enterprise-grade evidence around the native capabilities.

Agentforce Testing Center

Salesforce's native environment for defining test cases and evaluating agent responses at scale. SyntraFlow complements it and does not replace it.

Testing API

A programmatic interface for submitting utterances and evaluating agent behaviour, enabling automated and repeatable test execution.

Agentforce DX

Developer tooling for building, configuring and shipping agents as part of a Salesforce development lifecycle.

CLI-based testing & batch execution

Command-line workflows and batch test runs that let teams execute large sets of agent tests from their pipelines.

Where SyntraFlow adds value

SyntraFlow is designed to wrap enterprise governance around these native capabilities. Rather than replacing Agentforce Testing Center or the Testing API, SyntraFlow can be configured to orchestrate them and to extend agent testing across the wider business process.

  • Repeatable regression: maintain versioned agent test suites that re-run automatically on every prompt, action, topic, model or release change.
  • Cross-application outcomes: validate what happens after an agent acts, following the transaction into ERP, order management and other connected systems.
  • Enterprise evidence: capture consistent, auditable records of what was tested, what passed and what changed, suitable for governance and compliance review.
  • Unified orchestration: run agent tests within the same framework used for Salesforce testing and broader enterprise application testing.

The SyntraFlow Agentforce testing workflow

A repeatable, twelve-step workflow takes an agent from a business scenario to production evidence, and back again every time something changes. Each step is designed to be automated and re-run so that agent quality does not drift between releases.

1

Import or define business scenarios

Capture the real tasks the agent must complete, such as qualifying a lead or resolving a service case, as testable business scenarios.

2

Generate utterance variants

Produce many phrasings of each request, covering formal, informal, ambiguous and multi-intent language, to test the agent the way users speak.

3

Define expected topic & action

Specify which topic each utterance should route to and which action or actions the agent should select in response.

4

Define expected business outcome

State the end result that proves success, such as a created record, an updated status or a completed transaction in a downstream system.

5

Provision relevant data

Set up the accounts, contacts, cases and related records the scenario needs, using governed test data management for consistent, repeatable runs.

6

Execute against the agent

Send each utterance to the agent through the appropriate interface and capture the full interaction, including topic, actions and response.

7

Validate agent routing

Confirm the utterance was recognised, routed to the expected topic and interpreted with the correct intent.

8

Validate Flow, Apex & external actions

Verify the deterministic actions the agent triggered ran correctly and produced the intended changes in Salesforce and connected systems.

9

Assess response quality & grounding

Evaluate whether the reply is accurate, complete, appropriately worded and grounded in approved data rather than unsupported claims.

10

Confirm permissions & data access

Check the agent respected the running user's permissions, sharing and field-level security, and exposed no data it should not.

11

Record evidence

Store the utterance, routing, actions, response, outcome and pass or fail judgement as auditable evidence for governance and review.

12

Repeat after every change

Re-run the suite whenever a prompt, action, topic, model version or Salesforce release changes, so behaviour is re-verified continuously.

What to measure

Agentforce quality is not captured by a single score. SyntraFlow is designed to track a spread of behavioural and outcome metrics so teams can see exactly where an agent is strong and where it needs work. Target thresholds are set by each team against its own risk tolerance.

Topic accuracy

How often utterances are routed to the correct topic.

Action accuracy

How often the agent selects the right action and correct inputs.

Task completion

How often the agent finishes the task it set out to do.

Business-outcome success

How often the full business result is achieved across all systems.

Grounding accuracy

How well responses stay anchored to approved data and knowledge.

Unsupported-claim rate

How often the agent states something not supported by its sources.

Escalation accuracy

How reliably the agent escalates or hands off at the right moment.

Permission-violation rate

How often the agent crosses a data-access or authorisation boundary.

Average response latency

How long the agent takes to respond under realistic conditions.

Repetition rate

How often the agent loops, repeats itself or fails to progress.

Error recovery

How well the agent recovers when an action or lookup fails.

Consistency across paraphrases

How equivalent the behaviour is across different phrasings of one request.

Agentforce scenarios we test

SyntraFlow is designed to evaluate the everyday agent scenarios enterprises deploy across sales, service and operations. Each of these can be modelled as a business scenario, exercised with varied utterances and validated end to end.

Sales qualification agent
Customer service agent
Employee service agent
Order-status agent
Appointment scheduling
Case summarisation
Refund / return request
Quote assistance
Customer onboarding
Knowledge response
Salesforce-to-ERP action
Human-agent handoff

Agentforce security testing

An autonomous agent that reads data and takes actions is a new and sensitive part of your security surface. SyntraFlow is designed to test the agent as a first-class security subject, verifying that it stays inside the boundaries defined by your Salesforce permission model. Explore the wider program on the SyntraFlow security page.

User context

Confirm the agent operates strictly as the running user and inherits that user's access, not a broader system context.

Object access

Verify the agent can read and write only the objects the user's profile and permission sets allow.

Field access

Check that field-level security is respected so restricted fields are never surfaced or updated by the agent.

Sharing rules

Confirm record-level sharing is enforced, so the agent cannot reveal records outside the user's visibility.

Sensitive-data exposure

Test that personal, financial and other sensitive data is not disclosed in responses when it should be masked or withheld.

Prompt injection

Attempt to manipulate the agent through crafted input and confirm it resists instructions that try to override its rules.

Tool misuse

Verify the agent cannot be coaxed into calling actions or tools outside the scope of the current topic or task.

Unauthorised actions

Confirm the agent refuses to perform actions the user is not entitled to trigger.

Cross-user data leakage

Check that data from one user's session or context never leaks into another user's interaction.

Audit evidence

Capture defensible records of every security test and its result to support compliance and governance review.

SYNTRAFLOW DIFFERENTIATOR

Test the agent across every system it touches

The moment an Agentforce agent takes a real action, its impact rarely stops inside Salesforce. An agent that places an order, issues a refund or updates a record often triggers a transaction in Oracle, SAP, Workday, NetSuite or another enterprise system. Testing only the agent's Salesforce reply confirms what it said, not what actually happened to the business.

This is where SyntraFlow's enterprise heritage matters. An agent that fires an action into an ERP must be validated end to end: the utterance was understood, the correct action ran, the Salesforce record updated, and the corresponding transaction posted correctly in the downstream system. A convincing chat response means little if the order never reached fulfilment or the refund never hit the finance ledger.

SyntraFlow is designed to follow the business outcome across application boundaries, so an agent's action is verified in the system of record where it truly completes. Pair Agentforce testing with Oracle ERP testing to prove that every agent-initiated transaction lands correctly on both sides.

Recommended next steps

Agentforce testing is a fast-moving, active-roadmap area. These deeper guides explore each layer of the framework in detail and are being expanded as the capability matures.

Outcomes

A disciplined Agentforce testing practice is what lets an organisation move autonomous agents from pilot to production with confidence. SyntraFlow is designed to support these outcomes.

Trustworthy agents in production

Deploy agents that have been evaluated for intent, action, grounding and outcome, so teams can trust them with real customers and real work.

Repeatable agent regression

Re-verify the whole agent automatically after every prompt, action, topic, model or release change, so quality does not silently drift.

Security assurance

Prove the agent respects permissions, sharing and sensitive-data controls, and resists prompt injection and tool misuse.

Business-outcome validation

Confirm the agent completes real tasks end to end, across Salesforce and every connected system involved.

Audit evidence

Maintain defensible, consistent records of what was tested and what passed, ready for governance and compliance review.

Faster, safer iteration

Change prompts, topics and actions with the confidence that regressions will be caught before they reach production.

Agentforce testing FAQs

What is Agentforce testing?

Agentforce testing is the practice of evaluating a Salesforce AI agent to confirm it understands requests, routes to the right topic, selects the correct actions, grounds its responses in approved data and completes the intended business outcome. It combines deterministic checks on the Flows, Apex and APIs an agent runs with evaluation techniques that judge intent, meaning and grounding, because natural-language input and model-driven reasoning cannot be assessed by string comparison alone.

How does Agentforce Testing Center work?

Agentforce Testing Center is Salesforce's native environment for defining agent test cases and evaluating responses at scale, supported by a Testing API and CLI-based, batch execution. SyntraFlow is designed to complement these native capabilities, not replace them, by adding repeatable regression, cross-application outcome validation and enterprise-grade audit evidence around them.

What should be tested in an Agentforce agent?

Test intent recognition, topic routing, instruction compliance, action selection, the Flows and Apex behind each action, external tool and API calls, grounding and data validation, response quality, security and permissions, human handoff, the end-to-end business outcome and ongoing regression. SyntraFlow structures this across a twelve-layer framework so no part of the agent lifecycle is left unverified.

How do you test Agentforce topics and actions?

Define the topic each utterance should route to and the action the agent should take, then send varied phrasings of the request and check that routing and action selection match expectations. The deterministic actions the agent triggers, such as Flows, Apex and external APIs, are then validated for their downstream effect on records and connected systems.

Can Agentforce tests be automated?

Yes. Using native interfaces such as the Testing API and CLI, agent tests can be scripted and run in batches from a pipeline. SyntraFlow is designed to orchestrate these runs into versioned, repeatable regression suites that execute automatically whenever a prompt, action, topic, model or release changes.

How do you test multiple user utterances?

Generate many phrasings of each request, including formal, informal, ambiguous, misspelled and multi-intent forms, then confirm every variant is understood, routed correctly and produces equivalent, correct behaviour. Measuring consistency across paraphrases shows whether the agent is robust to the language real users send rather than only the wording it was demonstrated with.

How do you validate Agentforce grounding?

Grounding validation checks that responses are anchored to approved Salesforce records, knowledge articles and retrieval sources rather than invented. Provision known data, ask questions with verifiable answers and confirm the agent's reply matches the source, while tracking an unsupported-claim rate to surface responses that are not backed by the underlying data.

How do you test Agentforce security?

Test the agent as a running user and confirm it honours object access, field-level security and sharing rules, never exposes sensitive data it should withhold, resists prompt injection and tool misuse, and cannot be steered into unauthorised actions or cross-user data leakage. Every test and result should be recorded as audit evidence. See the SyntraFlow security page for more.

Can Agentforce be tested across Salesforce and ERP applications?

Yes, and it should be. When an agent takes an action that posts a transaction in Oracle, SAP, NetSuite or another system, the outcome must be validated end to end, not just in the agent's Salesforce reply. SyntraFlow is designed to follow the business outcome across application boundaries, pairing Agentforce testing with Oracle ERP testing.

When should Agentforce regression tests run?

Run regression tests whenever anything that shapes agent behaviour changes: a prompt or instruction edit, a new or modified action, a topic change, an updated model version or a seasonal Salesforce release such as Spring, Summer or Winter. Continuous production monitoring complements scheduled regression so live regressions are caught before they affect users.

Put your Agentforce agents to the test

See how SyntraFlow is designed to evaluate topics, actions, grounding, security and business outcomes with repeatable, evidence-driven Agentforce testing. Available today for demonstration and proof-of-concept validation.