Study guide
4.3 Prompt Template Types: Field Generation, Flex & More
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.3 Prompt Template Types: Field Generation, Flex & More
Key Takeaways Explain This Topic AI
A Field Generation template is tied to one object and one field and runs from a generative AI-enabled field on a Dynamic Forms Lightning record page.
Field generation works on writable text, text area, text area (long), and text area (rich) fields, but not read-only fields or rich text areas on knowledge objects.
A Flex template covers use cases other types don't, with custom resources such as objects, free text, and files, and runs from flows, Apex, REST, or agent actions.
Flex templates don't support Save as a New Template, and Prompt Builder documents metadata import and export limitations for flex-related artifacts.
Other types include Sales Email, Record Summary (used by Summarize Record), Knowledge Answers, Case Summary, and Work Summary.
Last updated: September 2026
4.3 Prompt Template Types: Field Generation, Flex & More
Quick Answer: The template type decides where a template can run and what inputs it gets. Field Generation templates are bound to one object and one field . Users click a button on a Dynamic Forms Lightning record page, review the draft, and click Use. Flex templates are for any use case the other types don't cover . You define custom resources (for example up to five inputs such as objects, free text, or files) and call the template from flows, Apex, the REST API, or agent actions .
Common Template Types
Type What it creates Where it runs
Field Generation Content for a specific record field (summaries, descriptions) Generative AI-enabled field on a Lightning record page
Flex Content for any business purpose, with resources you define Flow, Apex, Connect REST API, agent actions, custom UI
Sales Email Personalized customer email from record data Lightning Experience email composer (Einstein Sales Emails)
- Record Summary Summarized record data Summarize Record invocable and agent action
- Knowledge Answers How agents answer questions from knowledge Answer Questions with Knowledge agent action
Case Summary / Work Summary Summary, Issue, and Resolution for cases, voice calls, or messaging sessions Case and wrap-up components
Record Prioritization , Record Research , and others Specialized outputs for specific standard actions Their related features
For the exam, focus on the objective's two named types: field generation and flex .
- Field Generation Templates
- How they're created
Setup → Prompt Builder → New Prompt Template → type Field Generation .
Name the template and select the Object (for example Account).
Select the Object Field that Einstein will populate (for example Account_Health_Summary__c ).
Write and ground the prompt in the Prompt Template Workspace, then preview it against a record.
Activate the template.
How users get them
In Lightning App Builder , open the record page and use Dynamic Forms (Field Section components, or upgrade the Record Detail component).
Select the field and assign the template in the Einstein Generative AI section of the field properties.
Save and activate the page.
Considerations
- Consideration Detail
- Supported fields Writable text, text area, text area (long), and text area (rich) fields; not read-only fields
- Dynamic Forms Required. It supports most, but not all, LWC-enabled standard objects
- Mobile Users need Dynamic Forms on Mobile enabled to use generative fields in the Salesforce mobile app
Knowledge rich text You can't use Field Generation templates for rich text areas on knowledge entities ( __kav ). Use Flex, Flow, or Apex
User permission Prompt Template User to run the template
Human in the loop The draft appears in the Einstein panel. The user clicks Use , can ask Einstein to rewrite it (for example "make it shorter"), then saves the record
One field per template The template is bound to its selected object and field
- Flex Templates
- How they're created
Setup → Prompt Builder → New Prompt Template → type Flex .
Name the template and optionally add a description.
Define resources : click Add to create up to five resources, give each a unique name and API name, and mark it required if needed. Resources can be objects (for example Case as "Customer Case"), free text inputs, files, and other supported inputs.
Write the prompt and use Insert Resource to replace placeholders with merge fields.
In Preview Settings , choose values for each resource, then Save & Preview .
Activate the template.
How flex templates run
Flex templates have no single built-in UI location, so you call them where the use case lives:
Flow : run the template as an action and write the output to a field or pass it downstream. Unlike field generation, no human reviews the output before it populates the field unless you design a review step.
Apex / invocable action / Connect REST API : developers call the template programmatically.
Agent action : create a custom agent action with Prompt Template as the reference type.
Prompt template action : call it from another template.
Flex considerations
Consideration Detail
Flexibility Supports use cases that combine multiple objects, such as a newsletter from Product, Campaign, and Event records
Save as a New Template Not supported for flex templates (Save as a New Version still works)
Metadata limitations Prompt Builder limitations list flex templates as not supporting import or export of flex-related metadata, including Apex classes and flows that reference them and change sets that move flex-related artifacts, so plan deployment carefully
Deleting Remove flows and Apex resources from all versions, delete the flows and Apex classes that reference the template, then delete the template
- KnowledgeArticleVersion Supported as a resource only in Flex templates
- Permissions Builders need Prompt Template Manager; runners (users or agent users) need Prompt Template User
Loading diagram... Choosing between Field Generation and Flex
Scenario Practice
Scenario Best type
Account managers want a "Relationship Health" summary field they can regenerate and edit before saving Field Generation
When an order ships, automatically write a friendly status message into a custom field Flex template from a flow
An agent must generate a formatted quote explanation from Quote and Product records plus a free-text customer question Flex template used as an agent action
- Customize how an Agentforce agent answers from knowledge, including citation behavior Knowledge Answers
- Reps draft personalized prospecting emails in the email composer Sales Email
Populate a rich text area on a Knowledge article Flex template (or Flow/Apex), because Field Generation doesn't support __kav rich text areas
Exam Traps
Field Generation needs Dynamic Forms. No Dynamic Forms, no generative field.
Read-only fields can't host field generation.
Flex output from a flow can skip human review. Choose Field Generation when review is required.
Don't assume change sets move flex-related artifacts. Check Prompt Builder's documented limitations.