Grounded prompts, protected data
Prompt Builder brings live CRM data into prompts; the Trust Layer keeps that data safe on its way to and from the model. Strong answers cover both the template design and the data-protection story.
- TemplatesSales Email, Field Generation, Record Summary and Flex.
- GroundingMerge fields, Flow, Apex and retrievers.
- TrustMasking, zero retention, toxicity checks and audit.
Prompt Builder lets Salesforce teams create reusable, grounded prompts without code, and the Einstein Trust Layer makes generative AI safe for business data. Expect questions on template types, grounding and how customer data is protected when it reaches a large language model.
1. What is Prompt Builder?
A Salesforce tool for creating prompt templates: reusable instructions that pull in live CRM data through merge fields, related lists, Flow or Apex, then call a large language model. Templates are previewed against real records, versioned, and used across the platform — in record pages, Flows, Apex and as Agentforce actions.
2. What prompt template types are there?
- Sales Email — drafts personalised emails.
- Field Generation — fills a field, such as a case summary, from a button on the record.
- Record Summary — summarises a record for agents and users.
- Flex — custom inputs (one or more objects) for any other use, including agent actions.
3. What is grounding and how do you ground a template?
Grounding means filling the prompt with trusted, relevant business data so the model answers from facts, not guesses. In Prompt Builder you ground with record merge fields, related lists, Flow (for filtered or calculated data), Apex (for complex retrieval or external data) and Data Cloud retrievers for unstructured content such as knowledge articles.
You are a support specialist at {!$Organization.Name}.
Summarise this case for the next agent in 4 bullet points: issue, steps taken, customer mood, next action.
Case subject: {!$Input:Case.Subject}
Description: {!$Input:Case.Description}
Priority: {!$Input:Case.Priority}
Recent emails: {!$Flow:Get_Recent_Case_Emails.Prompt}
Use only the information above. If the next action is unclear, say "Next action: confirm with customer".4. How do you call a prompt template from Apex?
Use the Connect API for Einstein: build the input with the template's inputs and call ConnectApi.EinsteinLLM.generateMessagesForPromptTemplate with the template's API name. The Trust Layer applies just as it does in the UI.
ConnectApi.EinsteinPromptTemplateGenerationsInput input = new ConnectApi.EinsteinPromptTemplateGenerationsInput();
ConnectApi.WrappedValue caseValue = new ConnectApi.WrappedValue();
caseValue.value = new Map<String, String>{ 'id' => caseId };
input.inputParams = new Map<String, ConnectApi.WrappedValue>{ 'Input:Case' => caseValue };
input.isPreview = false;
ConnectApi.EinsteinPromptTemplateGenerationsRepresentation output =
ConnectApi.EinsteinLLM.generateMessagesForPromptTemplate('Case_Summary', input);
String summary = output.generations[0].text;5. What is the Einstein Trust Layer?
A set of protections between Salesforce and the language model: secure data retrieval that respects user permissions, dynamic grounding, data masking of sensitive values before the prompt leaves Salesforce, zero data retention agreements so model providers do not store or train on your data, toxicity detection on responses, and an audit trail of prompts and responses (stored in Data Cloud) for review and compliance.
6. How do you write good prompt templates?
The same rules as any prompt: a clear role and audience, one task, grounded data clearly labelled, explicit format and length, and what to do when data is missing. Preview against several real records — including messy ones with blank fields — and keep templates small and focused rather than one giant template for everything.
7. Who can use and edit prompt templates?
Access is controlled with permission sets: managers create and edit templates in Prompt Builder; users get permission to run templates. Activated template versions are what users see, so you can draft and test a new version safely before activating it.
8. What are the risks of generative AI in CRM, and how do you manage them?
Wrong or invented facts, exposure of sensitive data, biased or inappropriate wording, and over-reliance on drafts. Manage them with grounding, Trust Layer masking and toxicity checks, keeping a human review step for outbound communication, monitoring the audit trail, and training users on what the AI can and cannot do.
Remember
Key points
- Ground with Flow or Apex
When merge fields are not enough.
- Preview on messy records
Blank fields reveal weak prompts.
- Permissions still apply
Retrieval respects the running user.
- Humans review outbound text
Especially customer emails.
Interview drill
Follow-up questions
What the interviewer asks after your first answer. Turn on practice mode, answer each one aloud, then reveal.
-
1 What is the difference between Prompt Builder and Agentforce? Basic
Prompt Builder creates single, grounded generation steps. Agentforce builds agents that reason over many steps and actions — and can use prompt templates as one of those actions.
-
2 Can you use a model other than the default? Intermediate
Yes. Model choices are configured in Einstein Studio, including Salesforce-managed models from several providers and, where licensed, bringing your own model.
-
3 Why might a Field Generation template produce empty results? Intermediate
The running user cannot see the grounded fields, the related data is empty, or the template version is not activated. Preview as that user to check.
-
4 How is a prompt template different from an email template? Basic
An email template fills fixed text with merge fields. A prompt template sends instructions plus data to a model, which writes new text each time.
-
5 How do you keep prompts consistent across a large org? Advanced
Create shared, versioned templates owned by a small team, deploy them through sandboxes and source control like other metadata, and test with a fixed set of records before activation.