Prompt Builder: Prompt Template Types, Merge Fields and Grounding
5 minutes
5 Questions
Prompt Builder is a Salesforce tool that lets administrators create reusable AI prompt templates powered by generative AI within the Einstein/Agentforce platform. It has three core concepts: Prompt Template Types, Merge Fields, and Grounding.
Prompt Template Types define the purpose and context of…Prompt Builder is a Salesforce tool that lets administrators create reusable AI prompt templates powered by generative AI within the Einstein/Agentforce platform. It has three core concepts: Prompt Template Types, Merge Fields, and Grounding.
Prompt Template Types define the purpose and context of a prompt. The main types include: Sales Email, which generates personalized emails tied to a record such as a Contact or Lead; Field Generation, which populates a specific field on a record with AI-generated content; Record Summary, which summarizes information about a record for quick review; and Flex templates, which are flexible and can be linked to multiple objects or used across various scenarios. Choosing the correct type ensures the prompt aligns with the business use case and available data.
Merge Fields allow you to insert dynamic Salesforce data into your prompt text. Instead of static wording, you reference fields from records, related objects, or flows using resource pickers. For example, a merge field might pull a customer's first name or an Opportunity amount so the generated output is personalized for each record. This makes templates reusable across many records while keeping content relevant.
Grounding is the process of supplying the large language model with trusted, relevant Salesforce data so responses are accurate and contextual rather than generic. Grounding sources include record fields, related lists, flows, Apex, Data Cloud, and retrieval augmented generation. By grounding a prompt in real CRM data, you reduce hallucinations and improve trust and quality of the output.
Together, these elements let admins build powerful, secure, and personalized AI experiences. You select a template type suited to the task, add merge fields for dynamic personalization, and apply grounding to anchor responses in reliable data. The Einstein Trust Layer further protects data privacy and masks sensitive information during processing, supporting responsible AI within Agentforce.
Prompt Builder: Prompt Template Types, Merge Fields and Grounding
Prompt Builder is a powerful tool within Salesforce Agentforce that allows administrators to create reusable, generative AI prompt templates. These templates connect your CRM data to large language models (LLMs), producing tailored, trustworthy content that helps users work faster and smarter.
Why It Is Important
Understanding Prompt Builder is essential because it bridges the gap between raw AI capabilities and real business value. By grounding AI responses in your actual Salesforce data, you ensure that generated content is relevant, accurate, and safe. This reduces the risk of hallucinations and delivers consistent results across your organization. For administrators, mastering Prompt Builder means you can empower teams to automate content generation, personalize customer interactions, and boost overall productivity.
What It Is
Prompt Builder is a low-code environment where you design and manage prompt templates. A prompt template is a reusable set of instructions sent to an LLM, combined with dynamic data pulled from your Salesforce records. Instead of typing the same instructions repeatedly, you build a template once and reuse it across flows, record pages, and more.
Prompt Template Types
Salesforce offers several template types, each suited to a specific use case:
• Sales Email: Generates personalized email drafts based on a contact or lead record, helping sales reps communicate quickly. • Field Generation: Populates a specific field on a record with AI-generated content, such as a summary or description. • Record Summary: Creates a concise summary of a record and its related data, giving users quick context. • Flex: A flexible, general-purpose template type that can accept multiple resource inputs and be used in flows or custom scenarios.
Choosing the correct template type is a common exam focus, so know which type maps to which business need.
Merge Fields
Merge fields are placeholders that pull dynamic data into your prompt at runtime. When you insert a merge field, it references a record, object, or resource, and the actual value is inserted when the prompt runs. For example, a merge field might pull a customer's name, account details, or a related opportunity amount. This makes each generated response unique and personalized, rather than generic. Merge fields are how you feed CRM context into the prompt.
Grounding
Grounding is the process of supplying the LLM with relevant, trusted data so its output is based on facts from your organization rather than only its training data. Grounding is achieved through merge fields, related lists, flows, Apex, and other data sources connected to the template. Well-grounded prompts produce more accurate and reliable content because the model has the correct context to work with. Grounding is a core reason Agentforce delivers trustworthy AI results.
How It Works
1. You select a prompt template type based on your goal. 2. You write natural-language instructions describing what you want the AI to produce. 3. You insert merge fields to ground the prompt with live Salesforce data. 4. You preview and test the response to confirm quality. 5. You activate the template so users can access it in the flow of work.
Behind the scenes, the prompt is assembled with resolved merge field values, sent through the Einstein Trust Layer for security and masking, processed by the LLM, and returned as usable content.
Exam Tips: Answering Questions on Prompt Builder: Prompt Template Types, Merge Fields and Grounding
• Match the template type to the scenario: If a question describes generating a personalized email, choose the Sales Email type. If it describes filling a single field, choose Field Generation. • Remember the purpose of grounding: When a question asks how to make AI output accurate and based on real data, grounding is the key concept to select. • Know that merge fields inject data: If an answer option discusses pulling live record values into a prompt, merge fields are the correct mechanism. • Recall the Trust Layer: Questions about data security or masking during prompt processing point toward the Einstein Trust Layer working alongside grounding. • Watch for the Flex type: When a scenario needs flexibility across flows or custom inputs, the Flex template is often the intended answer. • Focus on business outcomes: Exam questions frequently frame the value of Prompt Builder around personalization, productivity, and trustworthy results, so keep those benefits in mind.
By understanding these concepts and practicing scenario-based reasoning, you will be well prepared to answer exam questions on Prompt Builder confidently.