Overview
Prompt Engineering is one of six sections on the Salesforce Certified Agentforce Specialist (AI-201) exam and carries eight objectives, the joint-highest count. It starts with judgment: deciding when Prompt Builder is the right tool for a business request, and which prompt template type fits, such as Sales Email, Field Generation, Record Summary or Flex.
From there the section moves into building. You need to know the Prompt Template Manager and Prompt Template User permission sets, how merge fields, related lists, flows, Apex and Data 360 retrievers ground a template, and the lifecycle of saving, previewing, activating and invoking a template version. The last two objectives are about safety and control: the Einstein Trust Layer features (secure data retrieval, data masking, zero data retention, toxicity scoring and the audit trail) and how administrators limit which large language models are available. The current guide is aligned to the Spring '26 release and replaced the five-section 2025 outline.
How it's tested
Scenarios describe a business user who wants generated text somewhere in Salesforce: a reply email, a summary on a record page, a value in a custom field. You decide whether Prompt Builder fits, which template type and grounding method to use, who needs which permission set, and which Trust Layer control answers a stated concern.
-
Template type fit
A requirement names where output appears, and you match it to Sales Email, Field Generation, Record Summary or Flex templates.
-
Grounding choice
The needed data sits on a record, in related records, across objects or in unstructured content, and you pick merge fields, flow, Apex or a retriever.
-
Trust and control
A security or compliance worry is raised, and you identify the Trust Layer feature or model access setting that addresses it.
A service manager wants a two-paragraph case resolution note written into a custom Case field when agents click a button on the record page. The output lands in one specific field on one object, so a Field Generation template is the natural fit. Case fields come in through merge fields, and the last five case comments come from a related list. Flex would work but adds configuration without benefit.
Objectives 8
Official objectives from the Salesforce outline, in outline order.
1.1 Given business requirements, identify when it's appropriate to use Prompt Builder.Recognizing problems that a prompt template solves.
- What it means
- Prompt Builder creates reusable prompt templates that combine instructions with Salesforce data and send them through the Einstein Trust Layer to a large language model. It suits tasks where generated language adds value: drafting, summarizing, classifying text or filling a field with a written value.
- What to understand
- Use Prompt Builder when the output is generated text that a person reviews or an agent uses, and when the same prompt runs repeatedly against different records. It is not the answer for deterministic calculations, record updates that a formula or flow handles, or multi-step conversations that need an agent. A strong signal is a request that repeats a writing task across many records and needs consistent tone and grounding.
- How it shows up
- A team describes a manual writing or summarizing task, and you decide whether a template, a flow, a formula or an agent is the right tool.
- Common confusion
- Choosing Prompt Builder for a rule-based field update that a formula or record-triggered flow handles exactly.
1.2 Identify access controls governing prompt templates.Permission sets for building and running templates.
- What it means
- Access to Prompt Builder is controlled by permission sets. Prompt Template Manager lets a user create, edit and activate templates; Prompt Template User lets a user run templates that have been made available to them. Users also need access to the records and fields a template reads.
- What to understand
- Separate builders from consumers. Admins and designers get Prompt Template Manager, while sales or service users get Prompt Template User so they can invoke templates from record pages or actions. Grounded data still follows the running user's object and field permissions and sharing, so a template cannot reveal data the user cannot already see. Agents that call templates run under their own user context.
- How it shows up
- A user can see a generate button but gets an error, or a designer cannot activate a template, and you pick the missing permission.
- Common confusion
- Assuming Prompt Template User allows editing or activating templates, which requires Prompt Template Manager.
1.3 Identify the considerations for using a prompt template type such as field generation and flex types.Choosing among standard prompt template types.
- What it means
- Each template type defines where a prompt can be used and which inputs it accepts. Sales Email templates draft emails from a contact or lead, Field Generation templates write into a specific field on a record page, Record Summary templates summarize a record, and Flex templates accept custom inputs for use in flows, Apex or agent actions.
- What to understand
- Field Generation templates are bound to one object and field and appear on Lightning record pages that use Dynamic Forms. Flex templates are the most adaptable: they take up to several defined inputs of different object types and are invoked programmatically or from agents, but they have no fixed place in the UI. Pick the most specific type that matches where the output goes, and fall back to Flex only when no standard type fits.
- How it shows up
- A requirement states where generated text must appear or what inputs it needs, and you choose the matching template type.
- Common confusion
- Using Flex for everything because it is flexible, even when a Field Generation template places output exactly where required.
1.4 Given a scenario, identify the appropriate grounding technique.Merge fields, related lists, flows, Apex and retrievers.
- What it means
- Grounding adds trusted business data to a prompt at run time so the model works from facts rather than guesses. Prompt Builder supports record merge fields, related lists, template-triggered prompt flows, Apex classes, and Data 360 sources such as retrievers over unstructured content and data graph or DMO fields.
- What to understand
- Pick the simplest technique that reaches the data. Fields on the input record use merge fields; child records use related lists; filtered, aggregated or cross-object data uses a template-triggered prompt flow; complex logic or external callouts use Apex; and knowledge articles, PDFs or other unstructured text use a Data 360 retriever. Grounded data passes through the Trust Layer, where masking and auditing still apply.
- How it shows up
- The data needed for the prompt is described in detail, and you choose the grounding resource that supplies it with the least effort.
- Common confusion
- Writing Apex to fetch a field that a merge field or related list already provides.
1.5 Explain the process for creating, activating, and executing prompt templates.Template lifecycle from draft to invocation.
- What it means
- A template is created in Prompt Builder by choosing a type, naming it, writing instructions and adding resources. It is saved as a version, tested with Preview against a sample record, and activated so users and automations can call it. Only the active version runs.
- What to understand
- Know the order: create, add grounding, preview the resolved prompt and response, then activate. Editing an active template means saving a new version and activating it. Execution paths include the Lightning record page (field generation and email drafting), flows using the prompt template action, Apex through the Connect API, and Agentforce agents through a prompt template action. Preview shows the fully resolved prompt, which is the quickest way to check grounding.
- How it shows up
- A template works in preview but users cannot run it, or changes do not show, and you identify the missed lifecycle step.
- Common confusion
- Expecting a saved draft or a new version to run before it has been activated.
1.6 Explain how to implement best practices for writing effective prompts.Clear instructions, role, format and guardrails.
- What it means
- Effective prompts state the model's role, the task, the audience, the format and length of the answer, and what to avoid. They place grounded data clearly, separate instructions from data, and give examples when tone or structure matters.
- What to understand
- Expect questions that compare a vague prompt with a structured one. Good practice includes specific, positive instructions, explicit output format, limits such as word counts, telling the model to use only the provided data and to say when information is missing, and iterating with Preview against several records. Overly long or contradictory instructions reduce reliability, and the model cannot follow rules that are only implied.
- How it shows up
- Two template drafts are shown, or outputs are inconsistent, and you choose the revision that improves the instructions.
- Common confusion
- Adding more and more text to a prompt instead of making each instruction specific and testable.
1.7 Identify the security and privacy features of the Trust Layer.Einstein Trust Layer protections on each request.
- What it means
- The Einstein Trust Layer sits between Salesforce and the model. Its features include secure data retrieval that respects user permissions, dynamic grounding, data masking of sensitive values before the prompt leaves Salesforce, prompt defense, zero data retention agreements with model providers, toxicity scoring of responses, and an audit trail stored in Data 360.
- What to understand
- Map each feature to the risk it addresses. Masking protects personal data sent to external models; zero data retention means the provider does not store or train on the prompt; toxicity detection flags harmful output; the audit trail and feedback data support compliance reviews. Data 360 must be provisioned for audit and feedback storage. Masking can be configured by data type and may be handled differently for agents, so read the scenario carefully.
- How it shows up
- A compliance officer raises a specific concern about prompts or responses, and you name the Trust Layer feature that addresses it.
- Common confusion
- Believing zero data retention also masks personal data; it controls provider storage, while masking is a separate feature.
1.8 Explain how to manage and prevent specific models from being accessed.Controlling which LLMs templates and agents can use.
- What it means
- Salesforce provides standard Salesforce-managed models and lets customers add their own models or configured model versions through Einstein Studio. Administrators decide which models are available to builders and which model a template or feature uses.
- What to understand
- Model choices are governed in setup and Einstein Studio rather than in each prompt. Admins can configure models with specific settings, register bring-your-own-LLM connections, and disable or withhold models that do not meet policy, such as a provider not approved by legal. Templates then reference only approved models. Changing the model can change output quality, so retest templates in Preview after any switch.
- How it shows up
- Legal approves only certain model providers, and you choose how to stop builders from selecting other models.
- Common confusion
- Telling builders in the prompt text not to use a model, which is not an access control.
High-yield concepts
The terms, rules and formulas this domain turns into questions most often.
-
Prompt Builder
Salesforce tool for building reusable, grounded prompt templates.
- Remember
- Templates combine instructions, merge fields and grounding resources.
- Tested as
- Core tool for every objective in this section.
- Trap
- Using it where a formula or flow gives an exact answer.
-
Field Generation template
Template bound to a specific field on an object, run from the record page.
- Remember
- Requires a Lightning record page with Dynamic Forms for the field.
- Tested as
- Requirements that name one field to fill.
- Trap
- Choosing Flex when this type fits.
-
Flex template
Template with custom inputs used from flows, Apex and agent actions.
- Remember
- No fixed UI location; called programmatically.
- Tested as
- Scenarios with several input objects or agent use.
- Trap
- Expecting it to appear on a record page by itself.
-
Sales Email and Record Summary
Standard types for drafting emails and summarizing records.
- Remember
- They have predefined inputs and placement.
- Tested as
- Questions about drafting outreach or summaries.
- Trap
- Building a Flex template to replicate them.
-
Prompt Template Manager
Permission set for creating, editing and activating templates.
- Remember
- Builders need it; end users do not.
- Tested as
- Access-control questions.
- Trap
- Giving it to every user who runs templates.
-
Prompt Template User
Permission set for running available templates.
- Remember
- Running users still need record and field access.
- Tested as
- Errors when users cannot generate output.
- Trap
- Assuming it grants edit rights.
-
Template-triggered prompt flow
Flow that gathers and formats data for a template at run time.
- Remember
- Use it for filtered, cross-object or aggregated data.
- Tested as
- Grounding scenarios beyond simple fields.
- Trap
- Using Apex for something a flow can do.
-
Retriever grounding
Using a Data 360 retriever to add relevant unstructured passages to a prompt.
- Remember
- Brings in knowledge articles or documents by semantic search.
- Tested as
- Questions about policies, manuals or PDFs.
- Trap
- Trying to merge-field unstructured content.
-
Preview
Resolves a template against a sample record and shows the prompt and response.
- Remember
- Best way to confirm grounding before activation.
- Tested as
- Troubleshooting template output.
- Trap
- Activating without previewing several records.
-
Activation and versions
Only the active version of a template runs.
- Remember
- Edits create a new version that must be activated.
- Tested as
- Questions where changes do not appear.
- Trap
- Assuming a saved draft is live.
-
Data masking
Trust Layer replacement of sensitive values before the prompt leaves Salesforce.
- Remember
- Configured by data type; values are restored in the response.
- Tested as
- Personal data concerns.
- Trap
- Confusing it with zero data retention.
-
Zero data retention
Model providers do not store or train on prompts and responses.
- Remember
- A contractual and technical commitment with partner models.
- Tested as
- Questions about provider use of customer data.
- Trap
- Assuming it hides data from the model during processing.
-
Audit trail
Record of prompts, masked data, responses and toxicity scores stored in Data 360.
- Remember
- Requires Data 360 for storage and reporting.
- Tested as
- Compliance and review scenarios.
- Trap
- Expecting it without Data 360.
Side by side
Concepts candidates mix up, compared on the point that decides the answer.
Prompt template types
| Concept | Meaning | Key difference | Common trap |
|---|---|---|---|
| Sales Email | Drafts emails for contacts and leads | Fixed inputs, used from email composer | Building a Flex copy |
| Field Generation | Writes generated text into one field | Tied to object and field on the record page | Forgetting Dynamic Forms |
| Record Summary | Summarizes a record | Standard summary placement | Using it to fill a field |
| Flex | Custom inputs for flows, Apex and agents | Most adaptable, no default UI placement | Choosing it when a specific type fits |
Grounding techniques
| Concept | Meaning | Key difference | Common trap |
|---|---|---|---|
| Merge fields | Fields from the input record | Simplest; no code | Overlooking related records |
| Related lists | Child records of the input | Quick multi-record context | Expecting filters and aggregation |
| Prompt flow | Flow-built data at run time | Filtering and cross-object logic | Using Apex instead |
| Apex | Code-built grounding | Complex logic or callouts | Overengineering simple needs |
| Data 360 retriever | Relevant unstructured passages | Semantic search over documents | Merging long documents into prompts |
Trust Layer protections
| Concept | Meaning | Key difference | Common trap |
|---|---|---|---|
| Data masking | Hides sensitive values from the model | Protects personal data in transit | Confusing with retention |
| Zero data retention | Provider keeps nothing | Stops storage and training | Expecting masking |
| Toxicity detection | Scores harmful output | Flags responses, logged for review | Thinking it blocks every response |
| Audit trail | Stores prompt and response records | Needs Data 360 | Expecting it in standard reports only |
Exam traps
Each trap is an answer that looks right. Learn the clue that should change your mind.
-
Flex for everything
- What candidates pick
- Build every template as Flex.
- Why it looks right
- Flex accepts any inputs and seems future-proof.
- Why it's wrong
- Flex has no built-in record page placement, so a field-specific requirement needs extra wiring that a Field Generation template provides natively.
Clue to watch for The scenario names one field on a record page.
-
Code first grounding
- What candidates pick
- Write an Apex class to supply related data.
- Why it looks right
- Apex can do anything.
- Why it's wrong
- Merge fields, related lists and prompt flows reach most Salesforce data with less maintenance; Apex is for complex logic or callouts.
Clue to watch for The data sits on the record or its child records.
-
Saved means live
- What candidates pick
- Expect edits to appear after saving the template.
- Why it looks right
- Saving is the usual final step elsewhere in Setup.
- Why it's wrong
- A new template version must be activated before users, flows or agents run it.
Clue to watch for Users still see old output after edits.
-
Retention equals masking
- What candidates pick
- Answer zero data retention for a personal data masking requirement.
- Why it looks right
- Both relate to privacy with external models.
- Why it's wrong
- Zero data retention stops providers storing data; it does not hide values inside the prompt, which is what masking does.
Clue to watch for The concern is personal values being sent to the model.
-
Prompt as policy
- What candidates pick
- Add a line telling builders not to use a model.
- Why it looks right
- It looks like a quick, visible fix.
- Why it's wrong
- Instructions in a prompt are not access controls; model availability is managed through setup and Einstein Studio.
Clue to watch for Legal or security restricts which models are allowed.
-
Manager for all
- What candidates pick
- Assign Prompt Template Manager to every sales user.
- Why it looks right
- It guarantees users can run templates.
- Why it's wrong
- It also lets them edit and activate templates, breaking least privilege; Prompt Template User covers running them.
Clue to watch for Users only need to generate output.
Answer framework
Use these steps when a scenario asks how to deliver generated text with Prompt Builder.
- Confirm the output is generated language that benefits from a model, not a deterministic value a formula or flow can produce exactly.
- Identify where the output must appear or who calls it, then choose the most specific template type that matches that placement.
- List the data the prompt needs and pick the simplest grounding resource that reaches it, moving to flows, Apex or retrievers only when needed.
- Write structured instructions with role, task, format and limits, preview against several records, then activate the version.
- Assign Prompt Template Manager or User correctly and check which Trust Layer feature or model setting covers any stated risk.
Practice question
Want more like this? The AI-201 practice test has questions for every domain.
Checklist
0 of 12
Tick each one you can do without notes. Your ticks stay in this browser.
Study strategy
Work hands-on in a Developer Edition org with Agentforce and Prompt Builder enabled, or a Trailhead playground that includes them. Build one template of each standard type against sample records, then rebuild one of them as a Flex template so you feel the difference in placement and inputs. For grounding, create the same prompt three ways: merge fields only, a related list, and a template-triggered prompt flow that filters child records. Preview each and compare the resolved prompts.
Next, study the Einstein Trust Layer as a table of risk, feature and limitation, using Salesforce Help pages rather than older blog posts, since masking behavior and audit storage have changed across releases. Add a row for model access, noting where models are configured and how unapproved ones are kept out of reach.
High-priority areas are template type selection and grounding choice. The underestimated objectives are access controls and model management, which appear as short questions with one precise answer. In practice tests, ask where the output lands first; it eliminates half the options.
FAQ
How much of the Agentforce Specialist exam is Prompt Engineering?
Prompt Engineering is 20% of the exam per third-party copies of the current guide, about twelve of the 60 scored questions as a planning estimate, across eight objectives.
Is the Einstein Trust Layer in this section?
Yes. In the Spring '26 guide, Trust Layer security and privacy features and model access sit under Prompt Engineering rather than in a separate section.
Do I need to write Apex for this section?
No coding is required, but you should know when Apex grounding is justified, such as complex logic or external callouts, and when simpler options suffice.
What is the difference between Prompt Template Manager and Prompt Template User?
Manager lets a person create, edit and activate templates. User lets a person run templates. Both still depend on the person's access to the underlying records and fields.
Can an agent use a prompt template?
Yes. A prompt template, often a Flex template, can be added as an agent action, so the same grounding and Trust Layer rules apply when an agent calls it.
Is Prompt Builder the same as Einstein Copilot prompts?
Einstein Copilot was renamed Agentforce. Prompt Builder remains the tool for prompt templates, and templates can be called by agents, flows, Apex or record pages.
Which official resources cover this section?
The Agentforce Specialist certification prep module and trail on Trailhead, the Prompt Builder and Einstein Trust Layer Trailhead modules, and the Prompt Builder pages in Salesforce Help.
Other Artificial Intelligence & Machine Learning certifications
Where the same subject shows up in other exams. Cards marked "Same subject" open the matching domain.
Test your Domain 1 knowledge
You have covered Prompt Builder fit, template types, access, grounding, activation, prompt writing and Trust Layer controls. Check how quickly you can choose the right template and grounding method.
Keep going
- Training Training Built on your Weak areas
- Practice test Questions by domain, with explanations
- Mock exam Full length, timed like the real exam
- Readiness test Find your weakest domain in minutes
- Cheat sheet Key terms and formulas on one page
- Ask the AI-201 AI tutor Get any concept explained your way