Anti-Patterns in Salesforce Agentforce: What to Avoid When Building AI Agents
Salesforce Agentforce is powerful because it allows teams to build AI agents that can understand user intent, retrieve grounded information, execute actions, and support business workflows across Salesforce. But like any powerful platform, the quality of the implementation matters.
A good Agentforce implementation does not start with “How many things can the agent do?" It starts with “What problem should the agent solve reliably?”
That is where anti-patterns come in. Anti-patterns are common implementation habits that look useful at first but eventually create confusion, poor user experience, inconsistent answers, or hard-to-maintain agents.
Below are some of the most common Agentforce anti-patterns and how to avoid them.
1. Trying to Build One Agent That Does Everything
One of the biggest mistakes is designing a single agent to handle every business process, every department, and every possible customer question.
At first, this feels efficient. One agent, many use cases. But in reality, it often creates confusion. The agent has too many topics, too many instructions, and too many possible actions. That makes it harder for the reasoning engine to choose the right path.
Salesforce guidance around context engineering recommends clearly defining the agent’s objective and limiting the number of subagents, topics, and actions so the agent has the right context for the job.
Better approach:
Start with a focused use case. For example:
- Order status
- Case summary
- Return request
- Appointment scheduling
- Knowledge-based customer support
Once that works well, expand gradually.
2. Instruction Bloat
Instruction bloat happens when teams keep adding more and more instructions to fix every edge case.
For example:
“Always greet the customer.”
“Never answer without checking the account.”
“Always ask for the order number.”
“Do not ask for the order number if already provided.”
“Use a friendly tone.”
“Do not sound too casual.”
“Escalate if the user is angry.”
“Do not escalate too early.”
Individually, these instructions may make sense. Together, they can become confusing or even contradictory.
Salesforce notes that agents tend to perform better when instructions are shorter and simpler, because long or excessive instructions can lead to slower or inconsistent behavior.
Better approach:
Keep topic instructions clear, short, and outcome-focused. Put action-specific rules inside the action configuration wherever possible, instead of loading everything into the topic instructions. Salesforce also recommends handling validation inside actions, such as Flow or Apex, rather than relying only on natural language instructions.
3. Using Instructions to Replace Real Business Logic
Another common anti-pattern is expecting instructions to enforce business rules that should be handled by Flow, Apex, APIs, or validation logic.
For example, telling the agent:
“Only issue a refund if the order was delivered within the last 30 days and the customer has not already received a refund.”
That may work sometimes, but it is risky if the decision depends on real data, policy checks, permissions, or financial rules.
Better approach:
Use Agentforce instructions to guide behavior. Use deterministic logic for important decisions.
For example:
- Use Flow to check refund eligibility.
- Use Apex to validate complex conditions.
- Use APIs to check external systems.
- Use permissions and execution context to control access.
- Use clear action outputs to tell the agent what happened.
Agentforce actions can call Flow, prompt templates, Apex, and other tools, which makes them better suited for controlled business execution than plain instructions alone.
4. Giving the Agent Too Many Actions
More actions do not always make an agent smarter. Too many actions can make action selection harder.
If an agent has several similar actions, such as:
- Get Order
- Retrieve Order
- Check Order Status
- Find Customer Order
- Order Lookup
…it may not consistently choose the right one.
Salesforce recommends limiting actions assigned to agents or subagents for better performance. One Salesforce consideration notes no more than 10 actions per subagent and 10 subagents per agent as a performance recommendation.
Better approach:
Design actions around clear business tasks. Use names and descriptions that make the purpose obvious.
Good examples:
- Verify Customer Identity
- Retrieve Latest Order Status
- Create Return Request
- Escalate to Service Representative
- Summarize Case History
Each action should have a clear input, clear output, and clear reason to exist.
5. Poor Topic Design
Topics are central to how Agentforce understands what the user wants. A weak topic design can cause the agent to route conversations incorrectly.
Common mistakes include:
- Topics that overlap too much
- Topics that are too broad
- Topics that are too narrow
- Topic names that are unclear
- Missing fallback or escalation guidance
For example, “Customer Help” is too broad. It could mean order status, returns, billing, warranty, complaints, or product support.
Better approach:
Create topics around specific business intents.
Better examples:
- Order Status Inquiry
- Return Request
- Billing Question
- Warranty Claim
- Product Troubleshooting
- Human Escalation
Salesforce documentation emphasizes that topic instructions help the agent select appropriate actions, define response behavior, and establish clarification or escalation strategies when information is ambiguous.
6. Not Grounding the Agent Properly
An agent without good grounding is like a support rep without access to the right knowledge, policies, or customer data.
If the agent is expected to answer questions from outdated articles, incomplete content, or generic instructions, the output will not be reliable.
This becomes a major issue in service scenarios where the agent needs accurate policy details, such as return windows, refund rules, subscription terms, warranty coverage, or escalation paths.
Salesforce describes Agentforce Data Library as a way to provide grounding information by indexing knowledge articles, fields, file uploads, or web sources so agents can retrieve relevant information for prompts.
Better approach:
Before launching the agent, review the quality of the content it can access.
Ask:
- Are the knowledge articles current?
- Are policies written clearly?
- Are duplicate articles causing confusion?
- Is the agent grounded on approved content?
- Are old documents excluded?
- Are permissions respected?
A good Agentforce experience depends heavily on clean, trusted, and well-structured data.
7. Skipping Testing with Real User Questions
Testing only with perfect prompts is another major anti-pattern.
Users rarely ask questions in the exact format we expect. They may say:
- “Where’s my stuff?”
- “I need help with my last order.”
- “This is not working.”
- “Can I return this?”
- “I was charged twice.”
- “Need a human.”
If testing only covers clean examples, the agent may look good in demos but fail in production.
Salesforce recommends testing with actual customer questions and varied phrasing, and testing the full conversation flow rather than only the first response.
Better approach:
Build a test set using real-world examples:
- Short questions
- Long questions
- Misspelled questions
- Angry customer messages
- Multi-intent questions
- Missing information
- Ambiguous questions
- Requests that should escalate
Also test the agent’s plan, action selection, and final response.
8. No Clear Escalation Strategy
Not every conversation should be solved by an AI agent. Some situations need a human.
A weak implementation either escalates too quickly or refuses to escalate when it should.
Examples where escalation may be needed:
- The customer is frustrated
- The request involves sensitive account changes
- The agent cannot verify identity
- The policy is unclear
- The action fails
- The customer asks for a person
- The issue involves legal, billing, or compliance concerns
Salesforce guidance around behavior issues highlights the importance of intentional escalation instructions, fallback topics, and clear routing logic.
Better approach:
Define escalation rules clearly.
For example:
“If the customer asks for a human agent, acknowledge the request and route to a service representative.”
“If identity verification fails twice, do not continue account-specific troubleshooting. Escalate.”
“If the agent cannot find a confident answer from approved sources, say that and offer escalation.”
9. Ignoring Security and Data Access
Agentforce is not just a chatbot. It can retrieve information and perform actions. That means security cannot be an afterthought.
An anti-pattern is assuming the agent should see everything or relying on instructions like:
“Do not show sensitive data.”
That is not enough.
Better approach:
Use Salesforce permissions, sharing rules, execution context, filters, and action-level controls properly.
Agentforce supports variables and filters that can control whether topics or actions execute based on conditions. This is important when different users, channels, or scenarios require different access.
Security should be built into the design, not added as a final instruction.
10. Building Without Observability
Many teams build the agent, test a few happy paths, and then deploy. But after launch, they do not closely monitor what the agent is doing.
That creates blind spots.
You need to know:
- Which topics are being triggered
- Which actions are failing
- Where users are dropping off
- Which questions are not answered well
- When escalation happens
- Whether the agent is using the right source
- Whether response quality is improving or declining
Better approach:
Treat Agentforce like a product, not a one-time configuration.
Review conversations. Analyze failures. Improve instructions. Tune actions. Update grounding content. Remove what is not working.
Agentforce implementations should go through continuous improvement, especially when business processes, products, and policies change.
11. Using AI Where a Simple Button Would Be Better
Not every workflow needs an AI agent.
Sometimes a quick action, guided Flow, form, or button is faster and more predictable.
For example, if the user only needs to update a phone number, download an invoice, or create a standard request, a guided action may be better than a conversational flow.
Better approach:
Use Agentforce where natural language adds value.
Good candidates include:
- Intent discovery
- Case summarization
- Knowledge-grounded answers
- Guided troubleshooting
- Multi-step service requests
- Context-aware recommendations
- Agent assist experiences
Avoid forcing AI into simple workflows just because it is available.
12. Launching Without Business Ownership
Agentforce is not only a technical implementation. It needs business ownership.
Without business involvement, teams may build agents that technically work but do not match real policies, service expectations, or customer language.
Better approach:
Involve the right stakeholders early:
- Service leaders
- Support agents
- Product owners
- Compliance teams
- Data owners
- Salesforce architects
- Integration teams
The best Agentforce implementations combine platform knowledge with real business process knowledge.
A Simple Checklist to Avoid Agentforce Anti-Patterns
Before launching an Agentforce agent, ask these questions:
- Does the agent have a clear business purpose?
- Are topics specific and non-overlapping?
- Are instructions short and easy to understand?
- Are business rules handled through Flow, Apex, APIs, or validation logic where needed?
- Are actions limited, well-named, and task-focused?
- Is the agent grounded in trusted and current data?
- Have we tested with real user questions?
- Is there a clear fallback and escalation strategy?
- Are permissions and data access properly controlled?
- Do we have a process to monitor and improve the agent after launch?
Final Thoughts
Agentforce can create a strong customer and employee experience, but only when it is designed with focus. The goal is not to build the biggest agent. The goal is to build an agent that is useful, trustworthy, and easy to maintain.
Most Agentforce problems do not come from the technology itself. They come from unclear scope, overloaded instructions, too many actions, poor grounding, weak testing, and lack of ownership.
Start small. Design carefully. Test with real questions. Keep improving.
That is how Agentforce moves from a demo to a reliable business capability.

Comments
Post a Comment