Sub topic 3
Writing Descriptions That Steer Agentforce Action Choice
Assume you know basic Salesforce objects, records, and Setup, and have seen Flow or Apex. This chapter focuses on how an Agentforce agent chooses and safely runs an action.
Write descriptions that steer the choice
An action description tells the reasoning engine what the action does and when it applies. Use specific business language. State the input, the result, and important limits.
A weak description is “Gets order information.” A stronger description is “Looks up the current shipping status of an existing order by order number. Use for delivery questions, not returns or order changes.”
Topic descriptions and scopes provide another boundary. The topic identifies the area of responsibility. The scope prevents an action from being used for a neighboring request.
Action inputs, variables, and conversation context
An action input is a value the action needs, such as an order number. The agent can obtain it from the current message or earlier conversation context. Describe each input clearly so the agent knows what value to extract.
For example, “The order number the customer provided” is more useful than “Identifier.” Mark required values as required when the action cannot work without them. If a value is missing, instruct the topic to ask for it instead of guessing.
Ground answers in Salesforce data
Grounding means basing an answer on trusted Salesforce records or other configured sources. An order-status action should query the order record and return its current status. The agent should not invent a status from conversational clues.
Return a clear result for missing data, such as Not Found. Topic instructions should tell the agent to say that the record was not found and avoid making a claim.
Trust Layer and guardrails
The Einstein Trust Layer helps apply protections around data access and model use. Still, configure least-privilege permissions, validate inputs, and limit each topic to its intended work. Guardrails should define what the agent must not do, such as changing an order when the topic only reads status.
Test and trace the decision
Test normal requests, ambiguous wording, missing inputs, and requests outside the topic. Use Agentforce testing and tracing tools to inspect the matched topic, selected action, extracted variables, and returned result. If selection is wrong, first improve overlapping descriptions and scopes.
Channels and deployment
After testing, deploy the agent to approved channels such as a website, messaging channel, or supported Salesforce interface. Confirm that the channel identity, permissions, authentication, and visible actions match the tested configuration.
Exercise
A customer asks, “Where is order 1042?” Which description is better: “Handles orders” or “Looks up the current shipping status of an existing order by order number”?
Show answer
The second description is better because it names the intent, required value, and result.