How to Enable Event Monitoring in Salesforce: A Step-by-Step Guide
Event Monitoring in Salesforce is a powerful feature that helps administrators and developers track user activity and performance across an organization. It provides valuable insights into security, compliance, and performance optimization by logging events such as logins, data exports, and API usage. This guide will walk you through the process of enabling Event Monitoring in Salesforce.
What Is Event Monitoring in Salesforce?
Event Monitoring is part of Salesforce’s Shield platform. It logs and provides visibility into user interactions with Salesforce. Key use cases include:
- Monitoring User Behavior: Track who accessed specific records or exported data.
- Security and Compliance: Detect and prevent suspicious activity, ensuring compliance with regulations.
- Performance Insights: Analyze API usage, page loads, and other metrics for optimization.
Prerequisites for Enabling Event Monitoring
Salesforce Shield License:
Event Monitoring is part of Salesforce Shield. Ensure your organization has the required Shield Event Monitoring add-on.
Permissions:
Assign the View Event Log Files permission to administrators or users who will access event logs.
API Access:
Event Monitoring logs are accessed via APIs, so API access must be enabled.
Steps to Enable Event Monitoring in Salesforce
1. Verify Your Salesforce Edition
Event Monitoring is available in the following editions:
- Enterprise
- Performance
- Unlimited
- Developer (with Shield add-on)
If you don’t have the required edition or license, contact Salesforce support.
2. Assign the Required Permissions
To access Event Monitoring, you need the View Event Log Files permission:
- Go to Setup:
- Navigate to Setup in Salesforce.
- Create or Update a Permission Set:
- Go to Permission Sets in the Quick Find box.
- Click New to create a permission set or select an existing one.
- Enable Event Monitoring Permissions:
- Under the System Permissions section, enable View Event Log Files.
- Save and assign the permission set to users who need access.
3. Enable Event Log File Storage
Salesforce stores event log files for up to 30 days by default. To access these files:
- Navigate to Event Log File Settings:
- In Setup, search for Event Log File in the Quick Find box.
- Enable File Storage:
- Ensure that log storage is active and specify the retention period (default is 30 days).
4. Access Event Monitoring Logs
Event Monitoring logs are accessible via:
- Salesforce UI (Download):
- Go to Setup > Event Monitoring > Event Log File.
- Select the event type and download logs in
.csv
or.json
format.
- API Access:
- Use the REST API or Event Log File API to programmatically retrieve logs.
Example API Query:
GET /services/data/vXX.X/sobjects/EventLogFile/<LogID>
5. Use Event Monitoring Analytics (Optional)
Salesforce provides prebuilt Event Monitoring Analytics apps for deeper insights.
- Install Event Monitoring Analytics:
- Go to AppExchange and install the Event Monitoring Analytics app.
- Configure Dashboards:
- Customize dashboards to visualize metrics such as login trends, data exports, and page performance.
Event Types in Event Monitoring
Salesforce tracks over 40 event types, including:
- Security Events:
Login
: Tracks user logins.Logout
: Logs user logout events.TransactionSecurity
: Records triggered security events.
- Data Access Events:
ReportExport
: Tracks data export from reports.Api
: Logs API calls made to Salesforce.
- Performance Events:
PageView
: Captures page load performance.VisualforceRequest
: Tracks Visualforce page requests.
- Compliance Events:
ContentDocumentLink
: Monitors access to files and content.