Einstein Trust Layer Explained — Agentforce Module 2 | 2026
Einstein Trust Layer
AI Safety, Security & Governance
Understand how Salesforce ensures your AI is safe, private, and compliant — and configure it in your Developer Org before building your first agent.
1. What is the Einstein Trust Layer?
The security foundation that makes enterprise AI safe
Without Trust Layer: Full prompt with "Rahul Sharma" and "9876543210" sent to OpenAI/LLM → PII exposed to external service!
With Trust Layer: PII masked → LLM receives "Summarize relationship with [PERSON_1] at ABC Pharma, phone [PHONE_1]" → LLM responds → Trust Layer re-inserts real values → Rep sees correct response. PII never left Salesforce.
2. How Einstein Trust Layer Works — Step by Step
The exact flow for every single AI request in Agentforce
3. The 6 Key Features of Einstein Trust Layer
What each feature does and why it matters for your agent
4. PII Masking in Action — Real Examples
See exactly what the LLM receives vs what the user sees
Sent to LLM: "Draft a follow-up email to [PERSON_1] at [ORG_1] ([PHONE_1])"
LLM response: "Dear [PERSON_1], Following up on our recent discussion at [ORG_1]..."
User sees: "Dear Rahul Sharma, Following up on our recent discussion at ABC Pharma..."
✅ LLM never knew the real name. User gets the correct personalized response.
5. Configure Einstein Trust Layer in Your Dev Org — Step by Step
Hands-on: Follow these exact steps in your Developer Org
6. Viewing AI Audit Logs — Practical
How to review every AI interaction in your org
7. Grounding Security — AI Respects Salesforce Permissions
How Agentforce ensures AI only accesses what users are allowed to see
| Security Layer | How It's Applied in Agentforce | XYZ Company Example |
|---|---|---|
| Object-level | Agent can only query objects user has Read access to | Sales rep can't query Payroll__c — no object access |
| Field-level | Agent can only see fields user has FLS Read access to | Agent can't reveal Opportunity Margin if rep can't see it |
| Record-level | Agent respects OWD + role hierarchy + sharing rules | Agent only shows agent's own Opportunities by default |
| Profile/PSets | Agent runs with the current user's permission set | Admin user's agent sees more than standard user's agent |
The agent queries Opportunities using Raj's session — his sharing rules only allow him to see his own territory. Agent returns only Raj's Indian Opportunities, not the entire India region. No extra code needed — Salesforce sharing model handles it automatically.
8. Common Trust Layer Issues & Fixes
Problems you'll hit in real projects and how to solve them
| Issue | Root Cause | Fix |
|---|---|---|
| Agent returns [PERSON_1] in response instead of real name | PII re-insertion failed — usually a parsing issue in the response template | Check your Prompt Template — ensure it uses the correct merge fields. Test with a simpler prompt first. |
| Agent blocks a legitimate user question as "toxic" | Toxicity threshold set too aggressively (LOW) for your use case | Setup → Einstein Trust Layer → Toxicity → Raise threshold for specific categories. Test with edge cases. |
| AI Interaction Logs not appearing | Audit Trail not enabled OR user doesn't have View All Data permission to see logs | Enable Audit Trail in ETL settings. Grant "View AI Interactions" permission to admin users. |
| Agent sees data the user shouldn't access | Action running in System Mode instead of User Mode | Check your Apex Action — use with sharing keyword. Flow Actions: run in User Mode. Never System Mode for security-sensitive data. |
| Einstein Generative AI toggle is greyed out | Org doesn't have Agentforce license OR you're not System Administrator | Verify your org has Agentforce in: Setup → Company Information → Licenses. Contact Salesforce support if missing from Dev Org. |
9. Einstein Trust Layer — Interview Questions & Answers
These questions are asked in every Agentforce interview
| Interview Question | Best Answer |
|---|---|
| What is the Einstein Trust Layer? | Security layer between users and AI LLMs — masks PII before LLM, checks toxicity on input/output, logs every interaction, enforces data residency, and guarantees zero data retention with external providers. |
| How does Salesforce ensure customer data doesn't reach external AI providers? | Einstein Trust Layer masks PII with tokens (e.g., [PERSON_1]) before sending to LLM. LLM never sees real data. Zero data retention agreements with providers ensure no data is stored for model training. |
| Can the AI access records a user doesn't have permission to see? | No. Agentforce respects Salesforce's full security model — OWD, role hierarchy, sharing rules, FLS, and profiles all apply to any data the agent accesses. Grounding Security ensures this. |
| Where can you view AI interaction audit logs? | App Launcher → AI Interaction Logs, or query AIInteractionLog object via SOQL. Contains: user, timestamp, masked input/output, model used, Trust Layer actions applied. |
| What happens if a user sends a harmful message to the agent? | Einstein Trust Layer's toxicity detection scans the input. If it exceeds the configured threshold, the message is blocked before reaching the LLM and user receives a polite decline message. The blocked interaction is still logged in audit trail. |
10. Module 2 Summary
What you learned — check before Module 3
- ✅Einstein Trust Layer = security layer between users and AI — PII masking, toxicity, audit, data residency, zero retention, grounding security
- ✅PII Masking = real data replaced with tokens ([PERSON_1]) before LLM, re-inserted after → LLM never sees actual PII
- ✅Zero Data Retention = Salesforce's LLM providers contractually cannot store or train on your data
- ✅Audit Trail = every AI interaction logged in AIInteractionLog — queryable via SOQL, viewable in UI
- ✅Grounding Security = AI data access follows standard Salesforce security model (profiles, FLS, sharing rules)
- ✅Setup = Setup → Einstein Trust Layer → Enable PII, Toxicity, Audit Trail → Save
- ✅Key interview answer = Two security layers: Trust Layer (AI-level) + Salesforce security model (data-level)
🚀 Ready for Module 3?
Next: Setting Up Your Developer Org for Agentforce — Step-by-step guide to get a free Developer Org, enable Agentforce, configure all required settings, and verify everything is ready before we build our first agent.
Module 3: Dev Org Setup →