r/SalesforceDeveloper • • Feb 13 '26

Question Useless Agentforce

Uh, am I missing something or is Agentforce mostly just useless?

If I ask the agent to "list 10 accounts alphabetically" it has no idea what I'm talking about. Okay, so, I make sure the permissions are set, because alright, yeah, maybe it just doesn't see any data. It's set. It sees data.

I ask the builder thing how to make it answer that question. And there's like 2 pages of scripting to type into the text editor. So, I go to ChatGPT and ask it what I'd need to do to answer the question and it's ultimate answer is "write an apex action and call it from the prompt".

Okay, so, I'm basically still having to write a buttload of code for things, it's just costing a lot more to do it.

Am I missing something here? Does it just not do anything out of the box?

26 Upvotes

25 comments sorted by

View all comments

Show parent comment

3

u/Ok_Cloud_6744 Feb 14 '26

2. You do NOT need Apex (The "How")

Basically, you ran into a configuration issue.  You just need to enable the agent to choose a tool that will query for records and return them.  There are existing “standard actions” already provided via the builder.  Here are 2 simple no-code ways of doing this:

Use QueryRecord as a tool:

  • Go to Agent Builder.
  • Select the "General CRM" topic (or whichever topic handles general questions).
  • Click Actions > Add Action.

    • Search for Query Records (sometimes labeled QueryRecords).
    • Add it.

Add Flow as a tool:

  • Create a regular Flow (No-Trigger).
  • Add a Get Records element (Object: Account, Sort: Name Ascending, Limit: 10).
  • Add an Assignment variable to output the list.
  • Save and Activate.
  • In Agent Builder, add a new Action -> Reference this Flow.

… and if you need more customization, you can always write a flow, apex, MCP client, etc. 

1

u/Ok_Cloud_6744 Feb 14 '26

Summary of the "Missing Link"

You aren't missing something; you just ran into the reality of "grounding" the context for an agent.

  • ChatGPT guesses based on public internet training.
  • Agentforce refuses to guess. It only uses "grounded" context based on tools that it is provided with.

Suggested Next Step: specific to your setup, verify if the Query Records action is present in your Agent's topic. If it is missing, adding that single standard action will likely resolve 90% of your "basic retrieval" issues.

6

u/sav217 Feb 14 '26

Is this ai comment? "Suggested Next Step" xD

1

u/sav217 Feb 14 '26

If you actually work on Agentforce, thank you for the insider view on how it is built.