Every prompt from Salesforce's generative AI features to the large language models (LLMs) behind them passes through the Einstein Trust Layer first. Along the way it grounds the prompt, may mask data, checks for toxic language and writes everything to a log.
This is for the admin, architect or compliance lead who has to sign off on Einstein or Agentforce features. We follow one prompt through the Trust Layer, then split Salesforce's controls from the zero trust AI work that stays with you.
What is the Einstein Trust Layer?
Trailhead calls the Trust Layer a set of gateways and retrieval mechanisms between LLMs and users. It lists six parts: secure data retrieval, dynamic grounding, data masking, zero data retention, toxic language detection and an audit trail.
Some features in the module are still beta. Salesforce Help also lists Prompt Defense, a set of system policies meant to cut down hallucinations and harmful outputs, so check what your org has generally available before you plan around it.
Does the prompt leave Salesforce?
It does when the model is external. Trailhead's response journey has the prompt leave the Salesforce Trust Boundary through the Secure LLM Gateway, headed for connected LLMs such as OpenAI.
So find out which model each feature calls. Salesforce's in-house models run inside the Trust Boundary and may interact with the Trust Layer differently, so get your account team to confirm before you sign off.
How do a prompt and its response move through the Trust Layer?
Trailhead works through a Service Replies example, starting at the prompt template and ending with the reply an agent sends. Read together, its prompt and response units give this sequence:
- A Salesforce app calls a prompt template with instructions and placeholders for business data.
- Dynamic grounding fills the placeholders with page context, merge fields and knowledge articles from the record.
- Secure data retrieval pulls that data under the user's existing permissions on objects and fields.
- Semantic search adds relevant chunks from other sources, such as knowledge articles.
- Data masking swaps sensitive values, such as names and card details, for placeholder tokens.
- Prompt Builder guardrails add instructions that lower the chance of unintended or harmful output.
- The prompt passes through the Secure LLM Gateway, and the LLM generates one or more responses.
- Back inside Salesforce, toxicity detection scores the response, and the saved tokens demask it.
- The user accepts, edits or ignores the reply and can leave thumbs up or down feedback.
- Each step is logged as timestamped metadata in the audit trail.
Trailhead tells teams to keep data current, accurate and complete, because grounding pulls straight from those records. Old, stale records cause their own trouble, and our post on AI learning from the wrong data gets into that.
How does Einstein Trust Layer data masking work?
Per the prompt journey, masking turns each sensitive value into a placeholder based on what it represents. The LLM keeps the context but never sees a real name or card number.
To find that sensitive data, Salesforce leans on pattern matching plus machine learning. When the model replies, the Trust Layer reads the same tokenized data and puts the real names and numbers back.
Where masking is off for Agentforce agents
Agents are the gap. Data masking for LLMs is currently disabled for agents, though embedded features such as Einstein Service Replies and Work Summaries have it, configured in Einstein Trust Layer setup.
In Trailhead's example, the service rep asks her admin to confirm masking is on. If you're that admin, check each embedded feature yourself, and limit what an agent's user can read.
Our Agentforce security post goes into the agent user and least privilege. Don't mix up the two kinds of masking either, since Trust Layer masking only touches prompts and sandbox data masking is a separate job.
What does zero data retention cover?
Any external API-based LLM provider has to sign a zero data retention agreement. Trailhead's response journey spells out what the policy means: "no customer data including the prompt text and generated responses are stored outside of Salesforce."
Once the response is back in Salesforce, the provider forgets the prompt and the responses. With nothing kept on the provider's side, Salesforce does its own content and abuse moderation.
Read the fine print. It covers the LLM provider only, and Salesforce Help adds that agents may still result in data being stored even with zero retention at the provider.
The audit trail is one of those places, with prompts, responses and trust signals all sitting in Data 360. Bring it under your own data retention policy and give it an owner and a review date.
How do toxicity detection and prompt defense work?
Toxicity detection is a machine learning model that flags prompts and responses across five categories: violence, sexual, profanity, hate and physical. You get one combined score from 0 to 1.
Look at the verbs Trailhead uses: the Trust Layer identifies and flags that content. Someone on your side has to decide who reviews flagged responses and whether a flagged reply can still reach a customer.
Prompt injection tricks a model into acting in ways nobody intended, and OWASP lists it as LLM01. Prompt defense helps against it in Prompt Builder, the Prompt Template Connect API and Prompt Template Invocable Action.
That lowers the risk without removing it. Throw hostile inputs at your custom prompt templates before release, and keep the list of actions an agent can take short.
What does the Trust Layer audit trail record?
The audit trail is detailed. Every step of the prompt-to-response journey is there as timestamped metadata, including the prompt, the original unfiltered response, any toxic language scores and the feedback collected.
Lock that data down. Saved audit and feedback data can include personal, health and card details, and our agent audit trail guide covers Session Tracing and how to review agent activity.
What does Salesforce do and what does your team add?
The Trust Layer covers one stretch. That's the path between your org and the model, and the table below splits each control between what Salesforce provides and what your admins and security team add.
| Control | What Salesforce provides | What your team adds |
|---|---|---|
| Data access | Secure data retrieval respects existing object and field permissions | Least-privilege permission sets, field-level security and sharing for every user and agent user |
| Data masking | Masking for embedded features such as Service Replies and Work Summaries | Turn it on in Trust Layer setup; for agents, where it's disabled, limit what the agent user can read |
| Retention at the LLM | Zero data retention agreements with external LLM providers | Retention rules for audit data kept in Data 360 |
| Toxicity | Scores and flags toxic content in prompts and responses | A review process for flagged responses |
| Prompt injection | Prompt defense in Prompt Builder and prompt template APIs | Hostile-input testing of custom templates and narrow agent actions |
| Audit | Timestamped audit trail of prompts, responses, scores and feedback | Access controls on that data, regular review and retention |
| AI configuration changes | No change control listed among Trust Layer features | Version control, approvals and testing for prompt templates and agent metadata |
Secure data retrieval only ever enforces the permissions you set. If a role can see too much today, our guide to permission sets covers building them so AI features read only what each role needs.
Where does zero trust AI fit?
Our zero trust security checklist defines the model and maps each principle to Salesforce controls. Three of them line up with the Trust Layer.
Verify explicitly means authorizing each request on its merits, which is what secure data retrieval does with user permissions. Least privilege applies to users and agent users alike, while the audit trail and Session Tracing feed continuous monitoring.
Identity, segmentation, integrations and monitoring get the full treatment in the hub. For AI inside the release process, read our post on AI and zero trust deployment security.
What about HIPAA and FedRAMP?
According to our Agentforce compliance post, Salesforce's BAA requires masking for Agentforce Services and Prompt Builder, where within your control. Masking is disabled for agents, so check with your account team how that applies.
HIPAA's other duties still apply, HIPAA data backup rules included. Government orgs should confirm that each AI feature, and the LLM behind it, sits inside their FedRAMP authorization boundary.
Where does Flosum fit?
Prompt templates and agents are metadata, so they need release controls like any other change. The Flosum DevOps Cloud App puts agent metadata and AI-generated changes under the same version control, approval gates, testing and audit trail as everything else.
Setup Audit Trail stops at 180 days, and the Flosum DevOps Cloud App keeps change history beyond that, while Field Audit Trail covers field changes. Our post on deploying Agentforce agents walks through a safe release path.
On the monitoring side, Flosum Trust Center watches configuration changes, user activity and permission updates across production and sandboxes. Flosum DevOps runs in Flosum's cloud or in your own cloud.
FAQs
What is the Einstein Trust Layer?
It's the set of controls Salesforce puts between its generative AI features and their LLMs. They cover secure data retrieval, dynamic grounding, data masking, zero data retention, toxic language detection and an audit trail.
Does Salesforce send my prompts to an external LLM?
For external models, yes. The grounded, masked prompt goes out through the Secure LLM Gateway, and the provider's zero data retention agreement stops it from keeping the prompt.
Does the Einstein Trust Layer mask data for Agentforce agents?
Not right now. Trailhead says data masking for LLMs is disabled for agents, so your control is limiting what each agent user can read.
What does zero data retention mean in Salesforce?
The external LLM provider doesn't store your prompts or the responses. Salesforce still keeps both in its own audit trail, so write your retention rules to cover it.
What does the Trust Layer audit trail store?
Timestamped metadata for every prompt-to-response journey: the prompt, the original unfiltered response, toxicity scores and user feedback.
Is the Einstein Trust Layer enough for zero trust AI?
Not on its own. It enforces the permissions you set and logs activity, while least privilege, flagged-output review and prompt change control are still your team's job.
Book a demo to see how the Flosum DevOps Cloud App puts prompt templates and Agentforce changes under version control, approvals and audit.
Thank you for subscribing




