Back to exam

Certified Agentforce Specialist Cheatsheet

Salesforce Certified Agentforce Specialist

Download free PDF

Prompt Engineering (20%)

Choose the prompt template

  • **Prompt Builder** creates reusable instructions grounded in business data. Use it for drafting, summarizing and extraction; predictive scores and forecasts require a suitable predictive capability.
  • **Sales Email** drafts personalized outreach in an email workflow. **Field Generation** produces text for a record field with human preview, regeneration and editing before save.
  • **Record Summary** shapes record summarization. **Flex** supports custom tasks and multiple record inputs, including use from Flow, Apex or a custom Lightning experience.
  • Use direct record inputs for available context; use **Flow or Apex grounding** when data needs joins, filtering, calculations or external retrieval. A screen flow can collect inputs and invoke a template.

Task, context, constraints, format

  • State the **task**, relevant **context**, audience or role, **constraints** and output **format**. Specify tone directly, such as empathetic and professional, rather than expecting the model to infer brand voice.
  • Use **few-shot examples** for extraction or a strict schema. Require only the requested fields or headings; define length, plain-language requirements and what to say when information is missing.
  • Ground summaries in the supplied facts. Separate source content from instructions, request no invented values or URLs, and provide an explicit insufficient-information fallback.
  • Test representative and sparse records. Improve the instructions and grounding iteratively; prompt wording does not retrain a foundation model or guarantee deterministic output.

Record and related-list grounding

  • **Merge fields** insert CRM values. **Record Snapshots** assemble context using the user's underlying page layout and visible data; Dynamic Forms do not define the snapshot. Empty data is omitted.
  • **Related-list merge fields** depend on the parent layout and Read access to the related object. Missing layout entries or permissions can leave the prompt without that context.
  • Related-list field selection follows layout configuration; displayed list filters do not provide arbitrary query logic. **Activities** related lists are unsupported for this grounding mechanism.
  • For the latest three opportunities or other precise selection, retrieve and sort records in a **template-triggered prompt flow**. Use **Add Prompt Instructions** to contribute the retrieved content to the prompt.

Resolve, preview, activate

  • In preview, **Resolution** shows the prompt after dynamic resources are resolved; **Response** is the model's generated output. Inspect both to separate missing grounding from generation problems.
  • Select the required sample input records before previewing a Flex template. Test with the intended user's access; an administrator's successful preview does not prove runtime access.
  • For **Field Generation**, configure a supported field on a Dynamic Forms record page and associate the active template. Check page assignment, field access and template-use permissions if the generation icon is missing.
  • Treat an **activated template version** as immutable. Save a new version to revise it, or create a custom copy when adapting standard content; activate the intended version for use.
  • **Token limits** apply to the resolved input and generated output. Record sizes, related records and retrieved chunks vary, so the same template can exceed its limit only for some inputs.

Trust Layer and model controls

  • **Dynamic grounding** adds authorized business context. **Prompt defense** addresses malicious instructions; **data masking** protects supported sensitive values. These controls serve different purposes.
  • The **Einstein Trust Layer** provides protections such as secure model access, supported masking, toxicity detection and audit signals. Verify the protections applicable to the selected feature and model path.
  • Manage approved model availability centrally in **Einstein model-provider settings**. A natural-language instruction is not a model-access restriction.
  • Grant **Prompt Template Manager** to authors and **Prompt Template User** to consumers. Execution also needs access to the underlying records, fields and feature; model administration requires its own permissions.

Data 360 Fundamentals (20%)

From documents to grounded answers

  • **Retrieval-augmented generation (RAG)** finds relevant business content at request time and adds it to the prompt. Retrieval supplies evidence; the LLM composes the answer.
  • The preparation path is **ingest, map, chunk, embed and index**. A retriever searches the index and returns selected passages for grounding rather than modifying source records.
  • **Chunking** splits large documents into passages. Preserve headings, section boundaries and enough context for each passage to stand alone; poorly chosen boundaries can separate a rule from its exception.
  • **Vectorization** creates numerical embeddings representing meaning. It enables semantic similarity; it is neither encryption nor a substitute for access control.

Search strategy and retriever scope

  • **Keyword search** favors exact identifiers and clause numbers. **Semantic search** finds related meaning and paraphrases. **Hybrid search** combines literal matching with semantic recall.
  • A **custom retriever** selects a search index and data scope, applies filters and defines returned fields and result count. Fields needed for filtering or output must be available in the index.
  • Filter by **product line, publication status, source or recency** to reduce irrelevant passages. More returned chunks can add noise, latency and token cost; broad retrieval is not automatically better.
  • Use **Retriever Playground** to inspect chunks for representative queries. Evaluate retrieval separately from final answer quality before changing the generation prompt.
  • An **ensemble retriever** combines multiple retrieval sources. Keep source metadata through mapping and retrieval so conflicting passages can be traced to their origin.

Agentforce Data Library

  • A **data library** curates grounding content from Knowledge, uploaded files or supported custom retrievers. Data 360 provides the search index and retriever used by **Answer Questions with Knowledge**.
  • Use **Salesforce Knowledge** for governed article publication and versioning. Configure relevant identifying and content fields, audience visibility and **data category filters**.
  • Use **file upload** for approved text, HTML or PDF documents. File maintenance and successful indexing remain necessary; uploading a new policy does not itself prove older content is excluded.
  • **Identifying fields** help find the right article; **content fields** supply substantive grounding text. Keep both focused on useful, approved content.
  • Check ingestion and index readiness after content changes. Refresh or rebuild when required and retest retrieval; do not promise instantaneous freshness from an indexed knowledge source.

Relevance, access and data quality

  • For missing Knowledge answers, check the **assigned library**, article publication and audience, category visibility, index status and the agent user's Knowledge access.
  • When Prompt Builder succeeds but the deployed agent fails, compare the **runtime user**, permissions, selected template, data-space access and channel context.
  • For stale or conflicting results, inspect **retrieved chunks**, source metadata, filters and mappings. For invented links, inspect the resolved prompt and whether a trustworthy URL was actually retrieved.
  • Minimize **PII** before indexing and apply appropriate governance throughout retrieval. Preserve source identifiers for traceability; retrieved text must not become trusted executable instructions.
  • Use **structured DMOs** for mapped records such as resolved cases and **unstructured content models** for document passages. **Zero Copy** queries supported external data without a full ingestion copy; it does not automatically provide a document search index.

AI Agents (35%)

Agent, subagent and action

  • The **reasoning engine** interprets an utterance, selects a relevant subagent and available actions, and uses their results to respond. The configured scope and executable tools bound what the agent can do.
  • A **subagent**, also called a topic, groups a focused responsibility, classification description, scope, instructions and actions. Keep competing descriptions distinct to reduce semantic misrouting.
  • An **action** performs a task through a supported implementation, such as Flow, invocable Apex or a prompt template. Assign it to the relevant subagent and define clear input and output contracts.
  • **Employee Agents** assist internal staff; **Service Agents** handle customer or partner support. Choose by audience and process, then configure identity, permissions and channels for that use case.
  • When intent is ambiguous, ask for clarification. When approved information or tools are unavailable, use a defined fallback or escalation rather than inventing facts or claiming an action succeeded.

Make custom actions selectable

  • Use a meaningful **action name and instructions** that explain its purpose, when to use it and what it returns. Distinguish similar summaries or queries with precise scope and examples.
  • Define typed **inputs**, required values and collection shapes. Explain each input, collect missing user values, and map deterministic values directly rather than asking the LLM to recreate them.
  • Define useful **outputs** and whether they are available for reasoning or shown to the user. Convert raw technical output into the requested conversational format where appropriate.
  • Reuse an **autolaunched flow** for business logic or an external order lookup. Expose Apex through an **invocable method**; a trigger or a bare SOQL statement is not itself an agent action.
  • If the right subagent is selected but the wrong action runs, inspect **action instructions and input descriptions**. If the wrong subagent is selected, inspect classification descriptions and overlapping scope.

Hybrid reasoning with Agent Script

  • **Canvas and Script views** represent the agent definition. Key blocks include configuration, variables, system guidance, the entry point and subagents containing reasoning and actions.
  • **Prompt instructions** guide flexible LLM behavior. **Logic instructions** enforce control flow with conditions, action execution and transitions; use deterministic logic for required compliance steps.
  • In Agent Script, **|** introduces prompt text and **->** introduces logic. **run** executes an action, **with** binds inputs and **set** stores outputs; **if/else** controls branches.
  • **Subagent actions** can be called from logic. **Reasoning actions** expose tools for LLM selection. A tool's **available when** expression controls whether the model can select it.

Variables preserve exact state

  • Use **custom session variables** for preferences, order IDs, completion flags and computed fees. Explicit state is more reliable than expecting conversation history to preserve exact values.
  • Declare a changeable value with **mutable**, such as **order_id: mutable string = ""**. Without mutable, the value cannot be changed by the agent after initialization.
  • **Linked variables** read external context and cannot be assigned by the agent. Distinguish a value supplied by the authenticated channel from unverified text typed by the customer.
  • Bind action outputs to variables, then reuse those values as action inputs or through **{!@variables.name}** in instructions. Calculate money or eligibility in deterministic business logic.

Gate access and enforce sequence

  • For identity checks or restricted refunds, set **verified**, **account status** or **tier** from a trusted action and gate downstream tools with a filter such as **available when**.
  • Initialize verification as false and allow only successful verification logic to change it. An LLM-filled flag or a customer's claim of eligibility is not proof of authorization.
  • Use **procedural action chaining** for mandatory order: retrieve availability, verify eligibility, then book. A tool becoming available does not guarantee it will execute immediately.
  • Availability is evaluated for a reasoning cycle. Test state changes and follow-up calls in the actual runtime; use deterministic **run** logic when the next action must happen in the same workflow.
  • Close completion gates after success and handle failures explicitly. Recheck authorization in the backend action; model-visible filters complement object access and business-rule enforcement.

Runtime identity and least privilege

  • Identify the **actual running user**. Customer service automation uses its configured agent identity; employee scenarios use their applicable user context. Preview and channel execution can differ.
  • Grant only necessary **object permissions, field access and record sharing** through appropriate permission sets. A low role alone does not deny object access, and object Read alone does not expose private records.
  • Review the flow's **run context**. System-context execution can bypass some user restrictions; do not assume every agent-invoked flow enforces sharing and field access automatically.
  • In Apex, **with sharing** governs record sharing, not all object and field checks. Enforce the required data permissions and validate sensitive action inputs explicitly.
  • Grant required **flow and Apex execution access**. Use **Named Credentials** and appropriate external credentials for callouts rather than relying on an interactive Salesforce session ID.

Channels and human handoff

  • For web or **Experience Cloud** support, configure the messaging deployment, site access and routing to the Service Agent. Enforce authentication when the experience is restricted to partners or members.
  • Map supported **pre-chat or Messaging Session context** into the agent. The **Messaging End User** identifies the participant; the session groups the messaging interaction and its conversation context.
  • Use **Omni-Channel routing flows** for supported agent destinations and human queues. Match the **Messaging** service channel for messaging traffic and test the configured routing action in the target experience.
  • For escalation, configure an **outbound Omni-Channel flow**, destination queue and human availability. Pass the useful conversation context so the customer need not start again.
  • Connect **Slack** through the Salesforce workspace integration and supported agent deployment. Email and voice require their own channel setup; channel capabilities depend on the chosen agent type.

Match the productivity capability

  • **Query Records** retrieves matching CRM records. **Summarize Record** provides a concise overview; **Draft or Revise Sales Email** generates contextual outreach.
  • **Find Similar Opportunities** surfaces comparable deals; **Create Close Plan** provides closing guidance. Use available standard actions before building an equivalent custom implementation.
  • A **sales development agent** qualifies and nurtures leads and helps schedule meetings. A **sales coach** supports practice and feedback; verify the supported objects, permissions and outreach channels for the deployment.
  • **Einstein Service Replies** drafts grounded service responses. **Work Summaries** assists post-interaction summaries and case updates; recommendation and classification features serve different tasks.
  • **Einstein Conversation Insights** analyzes recorded sales conversations for products, competitors and other tracked terms. It requires an appropriate recording source, access and insight configuration.

Testing, Deployment, and Maintenance (10%)

Repeatable agent evaluation

  • Use **Builder preview** for interactive debugging and **Testing Center** for repeatable batch evaluation. Import the supported **CSV test template** and specify expected subagent or topic, actions and response criteria.
  • Include real phrasing, **synthetic utterance variations**, ambiguous requests, missing inputs, unauthorized actions, fallback and escalation. Keep expected names aligned with the agent's API names.
  • Run action-bearing tests in a **sandbox** with controlled records: tests can execute tools and change data. Account for relevant consumption rather than assuming testing is free.
  • Evaluate **selection accuracy**, answer relevance, completeness, coherence and resolution success. Add a **custom LLM-judge evaluation** for a defined brand-voice or quality rubric.
  • Store a regression suite and rerun it after instruction, action or retrieval changes. Compare subagent/topic and action pass rates, then extend coverage for every new business path.

Deploy the complete dependency set

  • Use supported **change sets** or **Salesforce CLI/Metadata API** deployment. Include the agent definition, subagents/topics, actions, prompt templates, flows, Apex and their dependencies.
  • **GenAiPlannerBundle** contains planner topics and actions in the applicable metadata model. **AiAuthoringBundle** represents Agent Script authoring; use metadata appropriate to the agent and target API support.
  • Production Apex deployment requires passing tests and Salesforce's **code coverage requirements**, including at least 75% overall Apex coverage. An agent action does not waive normal Apex deployment checks.
  • Align target **model API names**, provider availability and permissions for custom-model templates. Deploying template metadata does not provision the external model or its credentials.
  • Verify production **flow and template activation**, agent activation, channel configuration and data-library readiness. A successful metadata deployment alone does not make the complete experience operational.

Governance and Observability (10%)

Trace failures and measure outcomes

  • **Session Tracing** follows execution across reasoning, selected actions, inputs, outputs, errors and final responses. Use event logs or traces to find the step where a plan or tool call failed.
  • **Agent Analytics** reveals trends such as resolution, deflection, escalation and abandonment. Track response latency and user satisfaction alongside accuracy to assess customer experience.
  • **Agent Optimization** groups production intent patterns and quality issues to prioritize improvements. Use trace evidence to distinguish overlapping subagent definitions from poor retrieval or failed actions.
  • In the interaction data model, **AIAgentSession** is the session container; interactions and messages describe more granular activity. Keep reporting grain and metric definitions consistent.

Govern the improvement loop

  • Use **AI audit and feedback data** to investigate prompt quality and adoption. Treat detailed conversation capture as a governed setting with appropriate permissions and retention.
  • Analyze user utterances across sessions for recurring unmet intents. Refine **classification scope** for routing defects, **action instructions** for selection defects and **grounding** for unsupported answers.
  • Measure the change against a baseline, rerun the regression suite and monitor after rollout. Keep a recoverable prior configuration and assign owners for content, access and model policy.

Multi-Agent Orchestration (5%)

Agent API, MCP and A2A

  • Use the **Agent API** to integrate a custom client with agent sessions: authenticate, start a session, send messages with supported context and end the session.
  • **Model Context Protocol (MCP)** standardizes how an AI client discovers and accesses tools and context from servers. It fits an agent that needs a document-classification tool or another external capability.
  • **Agent-to-Agent (A2A)** supports collaboration between agents, including across vendors. Distinguish agent discovery and task exchange from calling an individual tool or exposing a chat interface.

Specialize behind one entry point

  • Use **multi-agent orchestration** when specialized responsibilities benefit from separate ownership, tools or scale. A central orchestrator can route internal HR, IT and procurement work without asking users to choose an agent.
  • Define each specialist's responsibility, input/output contract, failure behavior and escalation path. Keep ownership boundaries clear so orchestration does not reproduce ambiguous routing.
  • Map **verified identity and required context** explicitly across agent sessions. Use protected or read-only context where supported; never assume custom session variables automatically carry across agents or organizations.
  • Authenticate every handoff and authorize the downstream task. Read-only context prevents model edits but does not make an untrusted value authentic; preserve its trusted origin.