4.2 Access Controls Governing Prompt Templates
Key Takeaways
- The Prompt Template Manager permission set (Manage Prompt Templates and Execute Prompt Templates) lets users create and manage templates in Prompt Builder.
- The Prompt Template User permission set (Execute Prompt Templates) lets users access and run prompt templates outside Prompt Builder.
- Secure data retrieval grounds prompts only with data the executing user can access, preserving field-level security and sharing.
- Creating and managing retrievers needs Data Cloud permissions, and running prompts that use retrievers needs the Data Cloud User permission set.
- Agentforce Service agent users get Prompt Template User through the AgentforceServiceAgentUserPsg permission set group.
4.2 Access Controls Governing Prompt Templates
Quick Answer: Two permission sets do most of the work. Prompt Template Manager (Manage Prompt Templates + Execute Prompt Templates) is for people who build and manage templates in Prompt Builder. Prompt Template User (Execute Prompt Templates) is for people, or agent users, who run templates in Salesforce features. Customize Application is an alternative for both. Beyond that, the executing user's data access controls what grounding data appears, and Data Cloud permission sets control retrievers.
The Two Core Permission Sets
| Permission set | Included permissions | Who gets it | What it allows |
|---|---|---|---|
| Prompt Template Manager | Manage Prompt Templates, Execute Prompt Templates | Admins and builders | Create, edit, version, activate, and preview templates in Prompt Builder |
| Prompt Template User | Execute Prompt Templates | Business users, and agent users running template-based actions | Access and run templates outside Prompt Builder (generative fields, sales emails, agent actions) |
Customize Application can substitute for either. To be assigned Prompt Template Manager, a user must have access to Setup, because Prompt Builder lives there.
Enabling Prompt Builder
- Set up Einstein generative AI (turn on Einstein in Einstein Setup).
- For sales email templates, turn on Sales Emails in Einstein for Sales and assign the related permission set to reps.
- Assign Prompt Template Manager to builders.
- Assign Prompt Template User to end users who run templates.
- Refresh so Prompt Builder appears in Setup.
Access for Specific Template Scenarios
| Scenario | Access requirement |
|---|---|
| A user needs to click the generate icon on a field generation field | Prompt Template User. The admin must also assign the template to the field in Lightning App Builder (Dynamic Forms) |
| A custom permission set is used instead of the standard ones and field generation templates don't appear | Grant object access to prompt templates plus the ExecutePromptTemplate and ManagePromptTemplate permissions |
| Reps use sales email templates | Sales Emails turned on in Einstein for Sales, the related permission set assigned to reps, and access to run templates |
| A template uses an Einstein Search retriever | Data Cloud permission set to create and manage retrievers; Data Cloud User to run prompts with Einstein search. Retriever data access follows Data Cloud permissions and the default data space |
| A builder wants the View this model link in Template Settings | Data Cloud Admin permissions to open model configuration in AI Models |
| An agent action runs a template for a Service agent | The agent user needs Prompt Template User, which it gets through the AgentforceServiceAgentUserPsg permission set group |
| An Employee agent runs a template action | The logged-in user needs Prompt Template User |
| Packaging a Lightning page that references a template | Manage Prompt Templates, or the template isn't included in the package |
| Creating a 2GP package version with templates | The build user needs the Prompt Template Manager permission set (EinsteinGPTPromptTemplateManager) through packageMetadataAccess |
Grounding Respects the Running User
The Einstein Trust Layer's secure data retrieval means a prompt is grounded only with data the executing user has access to:
- Merge fields for records, related lists, flows, and Apex resolve using the permissions of the user executing the prompt.
- Standard role-based controls and field-level security are preserved when grounding from CRM or Data 360.
- Grounding is dynamic. It happens at run time and depends on who is running the template.
Two users running the same template on the same account can get different resolved prompts. If a field is hidden from one user by FLS, it never enters that user's prompt. That's a feature, not a bug.
The same principle applies to retrievers. Access checks on results ensure a user or agent can reach the underlying records, and records the caller can't access don't appear in results.
Where Access Mistakes Show Up
| Symptom | Likely cause | Fix |
|---|---|---|
| Admin sees Prompt Builder, but a rep gets no generate icon on the field | Rep lacks Prompt Template User, or the template isn't assigned to the field on the Dynamic Forms page | Assign the permission set and configure the field in Lightning App Builder |
| A template action works in preview for the admin but fails for a Service agent | The agent user lacks Prompt Template User, or access to the objects and fields the template reads | Check the agent user's permission set group and object and field permissions |
| Retriever-grounded responses come back empty for service reps | Reps lack Data Cloud User or access to the default data space, or Knowledge permissions | Assign Data Cloud User, including the default data space, and Knowledge access |
| A new template version is ready, but users still get the old behavior | The new version isn't activated | Activate the new version (an access-adjacent control over which version users get) |
| A custom field just created isn't available as a resource | Prompt Builder doesn't show new custom objects or fields immediately | Log out and log back in |
Least Privilege for Template Builders
- Give Prompt Template Manager only to people who should change what the LLM is told. Template instructions shape customer-facing output.
- Keep Prompt Template User broad enough for the teams that need generative features, and no broader.
- Changes to templates aren't tracked in the Setup Audit Trail, so use version history, sandbox testing, and deployment controls for governance.
Exam Traps
- Manager builds; User runs. Don't pick Prompt Template Manager for reps who only run templates.
- Grounding follows the executing user, not the template author.
- Retrievers need Data Cloud permissions in addition to the prompt template permission sets.
- Service agent users already include Prompt Template User through the default permission set group, but they still need object and field access for grounding.
Service reps need to click the generate icon on an AI-enabled Description field, but they should not create or edit prompt templates. Which permission set should they receive?
Two users run the same field generation template on the same Account. One user's response includes an annual revenue figure, and the other's doesn't. What explains the difference?
A prompt template grounded with an Einstein Search retriever works for an admin, but service reps receive empty grounding. Which permission is most likely missing for the reps?
An admin tries to assign the Prompt Template Manager permission set to a user, but the assignment fails. What prerequisite does Salesforce document?