Sub topic 11
What the Einstein Trust Layer adds
This chapter assumes you know how permission sets, sharing, and field-level security limit what an agent user can read, and that you know what topics and actions are. The Einstein Trust Layer works at a different point from those controls. It sits between Salesforce and the large language model (LLM) that powers the agent. It does not decide which records the agent can see. It controls what leaves Salesforce in a prompt and what comes back.
Where the Trust Layer sits
Permissions decide which data the agent can retrieve. The Trust Layer then treats that retrieved data as sensitive before and after it reaches the model.
What it provides
The main protections are these:
- Secure data retrieval and grounding. The prompt is filled with CRM data that the running user is allowed to see. Grounding respects the same permissions you set up earlier.
- Data masking. Detected sensitive values, such as names, email addresses, and card numbers, are replaced with placeholders before the prompt goes to the LLM. After the model responds, the placeholders are swapped back for the real values.
- Zero data retention. For models hosted by Salesforce's LLM partners, the agreement is that prompts and responses are not stored by the provider and are not used to train the model.
- Toxicity detection. The response is scored for harmful content before the user sees it.
- Audit trail. Salesforce records the prompt, the masked version, the response, and the toxicity scores, so you can review activity later.
Masking is pattern-based. It covers the data types Salesforce detects and the settings your admin turns on. It will not catch every sensitive value, so do not use it as a replacement for access control.
Trust Layer versus your own guardrails
The two layers answer different questions.
| Control | Question it answers | Who configures it |
|---|---|---|
| Permission sets, sharing, FLS | Which data can the agent retrieve? | You |
| Topics, instructions, actions | What is the agent allowed to do or say? | You |
| Trust Layer | What happens to the data on its way to and from the LLM? | Salesforce, with some admin settings |
Suppose the agent user has read access to Order.Status. The Trust Layer does not remove that access. It makes sure that if an order record contains a customer name, the model sees a placeholder, not the name.
Common mistakes
- Treating the Trust Layer as an access control. If the agent user can read a field, the field can be grounded into the prompt. Masking only changes how the value is sent to the model. Restrict access with permission sets.
- Assuming masking covers free text perfectly. Sensitive values buried in long text fields may not match a detection pattern. Keep unneeded text fields out of the agent user's field permissions.
- Skipping the audit data. The audit trail only helps if someone reads it. The testing chapter covers how to review it.
- Expecting the toxicity check to enforce business rules. It flags harmful language. It does not know that your agent must never offer refunds. Your instructions handle that rule.
A worked check
Take the order status agent from earlier chapters. Its permission set grants read access to Order and Order.Status only. Trace one request:
- The customer asks about order 00001234.
- The Apex action runs in user mode and returns the status.
- The prompt is built with that status and the customer's message.
- The Trust Layer masks any detected personal data, sends the prompt, and checks the response.
- The placeholders are replaced and the reply is shown. The exchange is written to the audit trail.
The permission set limited step 2. The Trust Layer protected steps 3 to 5. Neither one replaces the other.
Exercise
An agent user can read a Contact's Email field. A teammate says the Trust Layer's data masking means you can safely leave that field permission in place for an agent that never needs email addresses. Is that reasoning sound? What should you do instead?
Show answer
No. Masking only replaces detected values with placeholders in the prompt sent to the LLM. It does not stop the field from being retrieved, and detection is not guaranteed to catch every value. Under least privilege, remove read access to Contact.Email from the agent user's permission set, and treat masking as a second layer, not a substitute.
Exercise
Name two things the Trust Layer audit trail records that help you review agent behavior.
Show answer
Any two of: the original prompt, the masked prompt, the model's response, and the toxicity scores.