Cert++
Close

Agent execution context and data access

Key Takeaway

To predict what an agent can see or do, first ask who the running user is. By default, a Service agent runs as a dedicated agent user, not as the customer, so you must limit each customer's data access yourself.

Execution context means which user an Agentforce agent runs as. When an agent runs an action, it runs as a specific Salesforce user. That user's profile, permissions, field-level security, and sharing rules decide what data the agent can read and edit, so the agent's data access is the same as that user's access. Which user it runs as depends on the agent type, the channel, and whether credential-based user verification is turned on. An app builder must get this right so the agent can do its job without exposing records to the wrong person.

Who each agent type runs as
Works withChannelsRuns as
Agentforce Employee agentsInternal usersLightning Experience, the Salesforce mobile app, Slack, or Enhanced Web Chat on an Experience Cloud siteThe logged-in end user
Agentforce Lead Nurturing agentsProspects, for top-of-funnel lead engagementOutbound emailA dedicated EinsteinSDRAgent User
Agentforce Service agentsExternal customers and partnersEnhanced Messaging channels, such as Enhanced Chat v1 and v2By default, the agent user

Employee agents are not for unauthenticated external customers. The logged-in end user's profile, permission sets, and sharing rules or role decide the agent's actions and responses. Because the agent already runs with the end user's own access, you don't need to explicitly scope its queries and actions to user-specific data.

You must give users access to each individual Employee agent through permission sets or profiles. You also assign the permissions the agent's actions need to individual users or user profiles.

A Lead Nurturing agent can work 24/7, sending customized emails, booking meetings, and answering prospect questions. Its EinsteinSDRAgent User gets system-level permissions during agent setup. Assignment rules, automated actions, or individual sales users assign prospects to the agent.

Platform App Builder Study Guide

Checklist progress

0/340Learned

Describe the capabilities and use cases for using Agentforce to automate business processes

0/10

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform App Builder studiers. 757 members and growing.