Agentforce Specialist prompt engineering

Updated September 20, 2026

Prompt Engineering is worth 20% of the Salesforce Agentforce Specialist exam — around 12 of the 60 scored questions. It covers Prompt Builder, the templates you create in it, and the Trust Layer that sits between your data and the model.

When Prompt Builder is appropriate

The first judgement the exam tests. Prompt Builder suits generating content from Salesforce data — a summary, a draft email, a field value. It is not the answer when the requirement is to do something, which is an agent action, or to run deterministic logic, which is a flow.

Read the requirement for a verb. Generate, summarise, draft → prompt template. Perform, update, create a record → action.

Template types

The outline names field generation and flex templates specifically, and asks for the considerations of each — meaning when to use one over another, and what each can access.

Know what distinguishes them and what each is intended for. Questions present a scenario and expect you to pick the appropriate type rather than describe all of them.

Creating, activating and executing

A three-step lifecycle, and the middle step is the one that appears in questions.

A prompt template must be activated before it can be executed. A template created and tested but never activated is unavailable to users — and “it works for me but users cannot see it” is precisely how the exam frames this.

Access controls

Who can create, edit, view and use prompt templates. Standard Salesforce permission thinking applied to a new object type, and the recurring principle is that access to a template does not override access to the underlying data.

Grounding

Given a scenario, identify the appropriate grounding technique — one of the more heavily weighted skills in the section.

Grounding means giving the model relevant, trustworthy context so its output is based on your data rather than its own assumptions. Sources include record data, related records, and retrieval from a Data Library.

The judgement is which grounding fits the requirement: a specific record’s fields, related records, or retrieved unstructured content.

Writing effective prompts

Best practices, examinable at a practical level: be specific about the task, state the desired format, supply the relevant context rather than assuming, constrain what the model should not do, and instruct it what to do when the grounding does not contain an answer.

The Trust Layer

Salesforce’s security and privacy layer between your org and the model. Know its features and what each protects against — data masking, zero retention, auditing and toxicity handling are the themes.

The exam angle is consistent: the Trust Layer is what makes sending business data to a model acceptable, and questions about protecting sensitive data in prompts generally point here.

Managing model access

Explain how to manage and prevent specific models from being accessed. A governance capability: an organisation may permit some models and forbid others, for compliance, residency or policy reasons. Know that this is configurable rather than fixed.

Sample questions

Question 1. A requirement asks for a concise summary of a case's related records to appear on the case page. Which capability fits?

  • A. A prompt template in Prompt Builder, grounded on the case and its related records
  • B. A custom agent action
  • C. A record-triggered flow
  • D. The Agent API
Show answer

Answer: A

Generating text content from Salesforce record data is what a prompt template in Prompt Builder is for. An agent action performs an operation rather than generating content, a flow runs deterministic logic, and the Agent API exposes an agent programmatically.

Question 2. Legal requires that certain personal data fields are not sent to the model, and that no prompt content is retained by the model provider. Which capability addresses this?

  • A. Activating the prompt template
  • B. Prompt template access controls
  • C. The Trust Layer
  • D. Multi-agent orchestration
Show answer

Answer: C

The Trust Layer provides the security and privacy controls governing what reaches the model and how it is handled, including masking and retention. Template activation makes a template usable, access controls govern who may use it, and multi-agent orchestration concerns agent-to-agent communication.

Question 3. An organisation must ensure that a specific third-party model is never used by any prompt template or agent in its org. What should be configured?

  • A. Deactivate all prompt templates using that model
  • B. Remove the relevant Data Library
  • C. Add a filter to each agent
  • D. Model access management, preventing that model from being accessed
Show answer

Answer: D

Managing and preventing access to specific models is a named capability in the outline, and it is the direct way to forbid a particular model org-wide. Deactivating templates is indiscriminate, a data library governs grounding content, and a filter controls agent behaviour rather than model availability.

What to practise

Create a prompt template, ground it on a record, test it, and then deliberately forget to activate it and try to use it as a normal user. That single experience makes the activation question permanent.

Then look at what the Trust Layer reports about a prompt run. Seeing what is masked and logged converts it from a marketing phrase into a control you understand.