Business Logic and Process Automation · Topic 7 of 7

Agentforce Automation Capabilities

Agentforce for app builders: agents, subagents, instructions and actions built from flows, Apex and prompt templates, Prompt Builder and the Trust Layer.

  • 4 min
In a nutshell
  • Agents combine subagents (topics), instructions and actions.
  • Actions come from flows, Apex, prompt templates and standard actions.
  • Autolaunched flows with input and output variables are the typical declarative action.

What it is

Agentforce lets an org build AI agents that understand natural-language requests and take actions in Salesforce. For an app builder, the important part is that agents act through the automation you already build: flows, Apex and prompt templates become actions the agent can choose.

Generative AI also appears in automation outside agents, for example a flow that calls a prompt template to draft an email or summarize a record.

User requestAgentchooses subagentInstructionsActionflow, Apex, prompt templateResponse

How it works

Building blocks of an agent

PartWhat it is
AgentAn AI assistant for a purpose, such as service or sales, for employees or customers
SubagentsThe jobs the agent handles, each with a description and scope; called topics in older documentation and in the exam guide
InstructionsPlain-language guidance that tells the agent how to behave within a subagent
ActionsWhat the agent can do: standard actions, or custom actions built from flows, Apex or prompt templates

Agents are built and tested in Agentforce Builder, previously called Agent Builder.

Turning automation into agent actions

  • An autolaunched flow with input and output variables can become an agent action. The agent passes inputs, the flow does the work, and outputs return to the agent.
  • An invocable Apex method written by a developer can also become an action.
  • A prompt template can become an action that generates text grounded in Salesforce data.
  • Clear names and descriptions on actions and their inputs help the agent choose the right one.

When to use AI and when to use rules

TaskBest fit
Understand a free-text request and decide what to doAgent
Draft or summarize text from record dataPrompt template
Apply exact rules, such as eligibility or pricingFlow or Apex, exposed to the agent as an action
Run every time a record changes, whatever the user saysRecord-triggered flow

AI reasoning is not deterministic. When a rule must always be applied exactly, put it in a flow or Apex and let the agent call it.

Prompt Builder and prompt templates

Prompt Builder creates reusable prompt templates that merge Salesforce data into instructions for a large language model. Templates can be used by agents, in flows through an action, and in some cases directly on record pages to fill in or draft text for users.

Trust and security

  • Agents only reach data that their running user and actions allow. Employee agents generally act with the permissions of the user talking to them; customer-facing agents run as a dedicated agent user that you grant only what it needs.
  • The Einstein Trust Layer protects data sent to large language models, for example with zero data retention agreements with model providers.
  • Test agents in Agentforce Builder before activating changes, and review conversations after launch.

A worked example: customers ask a service agent to return items. Returns are allowed within 30 days for unused items, and the rule must be applied exactly. The builder creates an autolaunched flow that takes an order number, checks eligibility and creates a return record, and adds it to the agent as an action with clear input descriptions. The agent handles the conversation, and the flow applies the rule.

Exam tip

When an exam answer gives "let the agent decide" versus "a flow action the agent calls", choose the flow for anything that must follow exact business rules.

How the exam asks about this

  • "Expose existing automation to an agent." Add an autolaunched flow as an agent action.
  • "Generate a personalized summary of a record." A prompt template from Prompt Builder.
  • "The agent picks the wrong action." Improve subagent and action descriptions and instructions.

What to remember for the exam

  • Agents combine subagents (topics), instructions and actions.
  • Actions come from flows, Apex, prompt templates and standard actions.
  • Autolaunched flows with input and output variables are the typical declarative action.
  • Prompt templates ground AI output in Salesforce data and can be used in flows.
  • Deterministic rules belong in flows or Apex; agents call them.
Watch out

Adding an action does not give the agent data access. The user the agent runs as still needs object and field permissions.

Common mistakes

Relying on the agent to apply strict rules. Give it a flow action.

Vague action descriptions. The agent uses them to choose actions.

Forgetting the agent user's permissions. An action fails if the user it runs as cannot reach the records.

Check yourself

  • Which kind of flow is typically used as an agent action?

    An autolaunched flow with input and output variables.

  • Where are reusable prompts that use Salesforce data created?

    In Prompt Builder, as prompt templates.

  • Why should eligibility rules be built in a flow rather than left to the agent?

    Flows apply rules exactly every time, while AI reasoning is not deterministic.

Topic 7 of 7 in Business Logic and Process Automation

Test yourself on Business Logic and Process Automation

The full Salesforce Platform App Builder question bank has 648 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Salesforce. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.