Sub topic 2
How the Reasoning Engine Picks Topics and Actions
Assume you know Salesforce objects, records, permission sets, and the basics of Flow or Apex. You should also know that a large language model generates responses from context, but does not automatically have permission to change Salesforce data.
How the Reasoning Engine Picks Topics and Actions
An Agentforce agent uses a reasoning engine to interpret a user message and plan the next step. It compares the message with each topic's classification description. After choosing a topic, it follows that topic's instructions.
An action is a defined operation the agent can call, such as retrieving an order status or creating a case. The engine selects an action when the instructions and the user's request require one. It can then use the action's result to form a response or choose another step.
A topic should have a narrow scope. Clear instructions reduce incorrect topic selection and prevent an action from being used for an unrelated request.
Service Agents: Customer-Facing Support
A service agent communicates with customers through supported service channels. Its topics might cover order status, returns, or appointment scheduling. The agent can ask for missing information, call an action, and escalate when the request exceeds its scope.
For example, an Order Status topic can instruct the agent to request an order number, call Get Order Status, report the returned status, and offer a human agent when no matching order exists.
Employee Agents: Assistants for Internal Users
An employee agent supports people inside the organization. Its topics might summarize open cases, find an account record, or explain an internal process. The instructions should assume that the employee's access determines which records the agent may discuss.
The same action can therefore produce different results for different employees. The agent should not disclose records that the current employee cannot view.
Agent Identity and Access
The agent user is the Salesforce identity used when the agent performs actions. Its permission sets, object permissions, field permissions, and sharing access limit what the action can retrieve or change.
A service agent often uses a dedicated agent user. An employee agent may need to respect the running employee's access model, depending on its configuration and action design. with sharing in Apex helps enforce record-sharing rules, but it does not replace object or field permissions.
> callout note > Treat topic instructions as behavior rules and Salesforce permissions as security boundaries. Instructions cannot grant access that permissions do not allow.
Grounding with Knowledge and CRM Data
Grounding supplies relevant, trusted context to the model. Knowledge articles can provide approved explanations, while CRM records can provide current, user-specific facts. Actions should retrieve only the data needed for the request. The response should distinguish retrieved facts from general guidance.
Exercise
An employee asks for cases assigned to another team that they cannot access. Should the agent summarize them?
Show answer
No. It should state that the records cannot be shown and suggest contacting an administrator.