2.3 Standard and Custom Agent Actions
Key Takeaways
- Standard agent actions include Answer Questions with Knowledge, Query Records, Get Record Details, Summarize Record, Update Record, Draft or Revise Email, and Create Case.
- Custom actions can reference invocable and REST Apex, external services, autolaunched flows, MuleSoft APIs, or prompt templates.
- Input settings include Collect data from user and Require input; output settings include Include in agent context and Show in conversation.
- Require user confirmation makes the agent ask the user to confirm before running an action that changes a record.
- Access to a custom action follows the referenced functionality, so the user or agent user needs permissions such as Run Flows, Apex class access, or Prompt Template User.
2.3 Standard and Custom Agent Actions
Quick Answer: Actions are how agents get things done. Standard actions are prebuilt for common jobs, such as Answer Questions with Knowledge, Query Records, Summarize Record, Draft or Revise Email, and Create Case. Custom actions wrap your own functionality: invocable or REST Apex, external services, autolaunched flows, MuleSoft APIs, or prompt templates. Configure each action's description, inputs, outputs, and confirmation settings so the agent knows when and how to use it.
Standard Agent Actions
Salesforce provides a large Standard Action Reference organized by product area. These Agentforce Platform actions appear often in scenarios:
| Standard action | What it does |
|---|---|
| Answer Questions with Knowledge | Answers questions using the content in an assigned Agentforce Data Library, with citations |
| Query Records / Query Records with Aggregate | Finds records, or aggregates across them, based on the request |
| Identify Record by Name | Resolves a record the user mentions by name |
| Get Record Details | Retrieves details of a specific record |
| Summarize Record | Summarizes a record, using a Record Summary prompt template |
| Update Record | Updates fields on a record |
| Draft or Revise Email | Drafts or revises an email grounded in Salesforce data |
| Create Case / Create Case with Enhanced Data | Creates a case, optionally with generated subject and description |
| Get Cases for Verified Contact | Looks up cases scoped to the verified customer ID |
| Verify Customer / Send Email with Verification Code | Supports identity verification |
| Get Activities Timeline | Retrieves activity history for a record |
Some standard actions are reference actions backed by an editable flow or prompt template, so you can customize their behavior by editing the underlying asset. Many industry and cloud-specific actions (Field Service, Financial Services, Health, and others) require add-on licenses.
Custom Agent Actions
When no standard action fits, create a custom action. You choose a Reference Action Type and then the specific reference action:
| Reference action type | Best for | Example |
|---|---|---|
| Flow (autolaunched) | Declarative multi-step logic, record updates, deterministic business rules | Check return eligibility and create a return order |
| Apex (invocable methods and REST Apex classes) | Complex calculations, heavy logic, or programmatic integrations | Calculate a loan payoff amount |
| Prompt template | Generative output grounded in data | Draft a personalized follow-up message |
| External service | Calling a registered REST API declaratively | Check warehouse stock in an external system |
| MuleSoft API | Governed APIs from MuleSoft | Retrieve an invoice from an ERP through a MuleSoft process API |
MCP server tools that an admin allowlists in Agentforce Registry or API Catalog also appear in the asset library as agent actions (see section 10.2).
Requirements for the underlying functionality
- Flows must be autolaunched. Variables the agent passes in or reads must be marked Available for input or Available for output.
- Apex must expose an
@InvocableMethod(or a REST Apex class). Clear labels and descriptions on the method and its@InvocableVariablefields become the action and parameter descriptions. - Prompt templates must be active to be used as actions.
- When you create the action, the descriptions for the action and each input and output are copied from the reference action. Review and improve them, because the LLM relies on them.
Action Settings That Change Agent Behavior
| Setting | Level | Effect |
|---|---|---|
| Collect data from user | Input | The parameter must come from the user, so the agent asks for it instead of inferring it |
| Require input | Input | The action can't run unless this input is present. It's on and read-only when the reference action requires the input |
| Include in agent context | Output | The output is added to conversation history and is available for reasoning. At least one output must be used |
| Show in conversation | Output | The output appears in the agent's response, and some channels render structured content such as records. If off for all outputs, the LLM summarizes them in natural language |
| Require user confirmation | Action | The agent asks the user to confirm before running an action that changes a record |
| Show loading text | Action | Custom text while the action runs. Enhanced messaging channels need additional configuration |
In Agent Script, these settings appear as properties such as require_user_confirmation and include_in_progress_indicator on the action definition, with a target such as flow://Get_Order.
Where You Create the Action Matters
| Created from | Availability | Sync behavior |
|---|---|---|
| Inside an agent in Agentforce Builder | That agent's subagent and version only | Changes apply only to that version |
| Asset library (Setup → Agentforce Assets → Actions → New Agent Action) | Can be added to multiple agents, versions, and subagents | Later asset library edits don't sync to copies already added |
A newly created action is automatically added to the subagent's reasoning actions, so the LLM can select it. To run it deterministically instead, reference it with run in the reasoning instructions. You can also keep an action defined but remove it from reasoning actions so only logic can call it.
Permissions for Running Actions
Access to a custom action depends on the functionality it references. A flow-based action follows the permissions, field-level security, and sharing configured in that flow. Salesforce lists these common requirements, assigned to the end user for Employee agents or to the agent user for Service agents:
| The agent uses… | Required access |
|---|---|
| Prompt templates, including through actions | Prompt Template User permission set |
| Flows | Run Flows permission, or access to individual flows |
| Apex classes | Apex Class Access for the specific classes |
| Knowledge and Data 360 (Data Library, Answer Questions with Knowledge) | Allow View Knowledge, Access Conversation Entries, Data Cloud User permission set, data category visibility, and least-privilege Knowledge object access |
To create custom actions, you need Manage AI Agents plus the permissions for your agent type. Creating or modifying the underlying prompt templates requires Prompt Template Manager, and flows require Manage Flow. Don't assign agent-creation permissions to end users or to the agent user.
Choosing the Right Action: Scenario Table
| Requirement | Best choice |
|---|---|
| Answer policy questions from knowledge articles with citations | Answer Questions with Knowledge + Data Library |
| Enforce "refunds only within 30 days" reliably | Custom flow action that evaluates the rule, not an instruction |
| Generate a tailored apology email draft | Prompt template action (or Draft or Revise Email) |
| Call a third-party REST API with an OpenAPI spec, no code | External service action |
| Reuse a governed enterprise API across systems | MuleSoft API action |
| Prevent accidental cancellation of a subscription | Turn on Require user confirmation |
Exam Traps
- Descriptions drive tool selection. A vague action description causes wrong or missed invocations.
- Record-triggered and screen flows aren't reference actions for agents. Use autolaunched flows.
- An output that isn't included in agent context can't inform reasoning.
- Standard action copies don't auto-update. Re-add updated asset library actions to agents.
A support agent must cancel subscriptions, and the business wants the customer to explicitly approve every cancellation before it happens. Which action setting meets this requirement?
Which type of Salesforce functionality can be selected as the reference for a custom agent action?
An action returns an internal risk score that the agent should use for reasoning but never display to the customer. How should the output be configured?
A Service agent's custom flow action fails with an access error, although the same flow works for administrators. What should be checked first?