Study guide
4.1 When to Use Prompt Builder
Salesforce Certified Agentforce Specialist Exam
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Exam Overview & How Agentforce Agents Work
1.1 Agentforce Specialist (AI-201) Exam Facts & Spring '26 Blueprint 1.2 How an Agent Works & the Building Blocks of Agent Script 1.3 Hybrid Reasoning: Agent Script in Canvas View and Script View
2 Chapter 2: Deterministic Control, Topics (Subagents) & Actions
2.1 Deterministic Behavior: Filters, Variables & Template Expressions 2.2 Standard and Custom Topics (Subagents) 2.3 Standard and Custom Agent Actions
3 Chapter 3: Agent Types, Security Context, Channels & Agent API
3.1 When to Use an Employee Agent or a Service Agent 3.2 Security Context: Who the Agent Runs As and How It Affects Actions 3.3 Connecting Agents to Channels: Digital Experiences, Email, Voice & Slack 3.4 When to Use the Agent API
4 Chapter 4: Prompt Builder Fundamentals
4.1 When to Use Prompt Builder 4.2 Access Controls Governing Prompt Templates 4.3 Prompt Template Types: Field Generation, Flex & More 4.4 Creating, Activating & Executing Prompt Templates
5 Chapter 5: Grounding, Prompt Best Practices, Trust Layer & Model Access
5.1 Choosing the Right Grounding Technique 5.2 Best Practices for Writing Effective Prompts 5.3 Einstein Trust Layer Security and Privacy Features 5.4 Managing and Preventing Access to Specific Models
6 Chapter 6: Data 360 Fundamentals for Agentforce
6.1 Agentforce Data Library: Types and Concepts 6.2 Chunking: Breaking Content Into Retrievable Units 6.3 Indexing and Search Types: Vector, Hybrid & Keyword 6.4 Retrievers: Individual, Ensemble & Filtered Retrieval
7 Chapter 7: Testing Agents with Testing Center
7.1 Testing an Agent with Testing Center 7.2 How Testing Center Evaluations Work
8 Chapter 8: Deploying Agents and Prompt Templates
8.1 Deploying an Agent from Sandbox to Production 8.2 Deploying Prompt Templates from Sandbox to Production
9 Chapter 9: Governance and Observability
9.1 Managing and Monitoring Agents 9.2 Agent Analytics and Agent Optimization
10 Chapter 10: Multi-Agent Orchestration, MCP & A2A
10.1 When a Multi-Agent Architecture Is Appropriate 10.2 Open Multi-Agent Protocols: MCP and A2A
4.1 When to Use Prompt Builder
Key Takeaways Explain This Topic AI
Prompt Builder builds, customizes, and manages reusable prompt templates grounded in CRM data to power generative AI features and Agentforce agents.
Prompt templates contain instructions plus placeholders (merge fields) that are filled with current data at run time in a step called prompt resolution.
Choose Prompt Builder for repeatable generation such as summaries, drafts, field content, and classification text that must be consistent at scale.
Deterministic business rules belong in flows, Apex, or Agent Script logic, not in a generative prompt template.
Prompt templates can be run from record pages, email composers, flows, Apex, the Connect REST API, and agent actions.
Last updated: September 2026
4.1 When to Use Prompt Builder
Quick Answer: Use Prompt Builder when a business requirement calls for generated language that must be consistent, reusable, and grounded in Salesforce data , such as email drafts, record summaries, field descriptions, or custom content. A prompt template packages the instructions, constraints, and data placeholders once, so every user and process gets the same quality. Don't use Prompt Builder to enforce deterministic rules or run multi-step transactions. Those belong in flows, Apex, or agent logic.
What Prompt Builder Is
Salesforce defines Prompt Builder as the tool to build, customize, and manage AI prompt templates that incorporate your CRM data to power generative AI features and Agentforce agents . Four vocabulary terms appear throughout the exam:
- Term Definition
- Prompt The instructions, context, data, and constraints sent to an LLM; the output is the response
Prompt template A reusable, use-case-driven prompt with placeholders for information that changes, such as customer names and product prices
Grounding Connecting the prompt to relevant data (record fields, flows, Apex, retrievers, files) so the response is specific and accurate
Prompt resolution Replacing placeholders with real data at run time. The result is the resolved prompt
Salesforce's reasoning: writing one great prompt by hand is slow, designing dozens of original prompts is harder, and prompts from different people produce inconsistent output. A template gives consistent, data-driven output at scale with a unified brand voice.
Signals That Prompt Builder Is the Right Tool
Requirement signal Why Prompt Builder fits
"Every rep should get the same style of personalized follow-up email" A Sales Email template standardizes voice and grounding
"Populate the Account Summary field with a digest of open cases" A Field Generation template adds an AI-generated field on the record page
"Summarize a record for the agent to use" A Record Summary template powers Summarize Record
"Generate a product description from Product, Campaign, and Event records inside a flow" A Flex template accepts custom inputs and runs from Flow
"Customize how the agent answers questions from knowledge" A Knowledge Answers template customizes Answer Questions with Knowledge
"Give an agent a specialized writing skill with strict formatting" A template used as a prompt template agent action
- "Run the same generation across many records" Prompt template batch processing
- Signals That Something Else Fits Better
Requirement Better tool Reason
"Refunds are allowed only within 30 days" Flow, Apex, or Agent Script logic Business rules must run deterministically, not be interpreted by an LLM
"Update the case status and create a task" Flow or Apex (optionally exposed as an agent action) Transactions need predictable execution
"Hold a multi-turn conversation that looks up orders and processes returns" An Agentforce agent with subagents and actions Agents orchestrate turns, tools, and routing
"Show a list of the customer's open cases" Query action or report Retrieval without generation doesn't need an LLM
"Answer questions from 5,000 policy PDFs" Agentforce Data Library + retriever, often through a template Retrieval-augmented generation needs a search index
Prompt Builder in the Agentforce Picture
Prompt templates and agents complement each other:
Agents decide what to do across a conversation (routing, tools, clarifying questions).
Prompt templates decide how a specific piece of content is generated (instructions, grounding, format).
An agent often calls a prompt template as an action . Summarize Record uses a Record Summary template, Answer Questions with Knowledge uses a Knowledge Answers template, and you can build custom prompt template actions for tasks such as drafting a warranty explanation. Keeping the generation logic in a template makes it reusable outside the agent too, for example on a record page or in a flow.
Where Prompt Templates Run
Invocation point Typical template type Human review?
- Lightning record page field (Dynamic Forms) Field Generation Yes. The user reviews the draft and clicks Use
- Email composer Sales Email Yes. The rep edits before sending
- Flow Flex (or others) Not necessarily; a flow can write output directly to a field
- Apex or Connect REST API Flex and others Depends on your code
Agent action Flex, Record Summary, Knowledge Answers, and others The agent uses the output in its reasoning or reply
Another prompt template (prompt template action) Any active template No. The output is inserted into the calling template
Standard Templates First
Prompt Builder includes standard prompt templates for common use cases (for example, Case Summary, Work Summary, Sales Emails, and Contextual Service Replies). You can copy a standard template to customize it, and some standard templates can be overridden with your own version that runs in their place. The Example Prompt Template Library also provides sample instructions and writing-style language you can reuse.
Decision Walkthrough
A service manager asks for three things:
"When a case closes, write a customer-friendly resolution summary into a field." → Flex template run from a record-triggered flow (no human review), or a Field Generation template if an agent or rep should review it first.
"Only allow goodwill credits under USD 50 without approval." → Flow logic , not a prompt.
"Let customers chat about case status and request a callback." → Service agent with subagents and actions, possibly calling a template to phrase the summary.
Exam Traps
"Consistent generated content at scale" points to Prompt Builder. "Must always enforce a rule" points to deterministic automation.
Prompt templates don't hold conversations. Multi-turn tool use is an agent's job.
Responses vary between runs. Each run is a new LLM call, so review output and design for variability.
Templates must be activated before users, flows, or agents can use them (section 4.4).