Real-Time Events Show Who Looked at Whose Record
यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।
Module 2 of 6 in the chapter Monitoring: Real-Time Events, Log Files and Transaction Security, chapter 19 of Securing Salesforce: Sharing and Visibility. Each module stands on its own.
The question this module answers: Event log files arrive hours to a day late. How do you see who looked at a record while it still matters, and what does Salesforce detect for you?
Event logs are late; real-time events are not
Section titled “Event logs are late; real-time events are not”Module 1 ended on a hard fact: event log files are hours to a day behind. That’s fine for a monthly review. It’s not fine when someone is downloading your customer list right now.
So there’s a difference between events and real-time events, and this is the cool stuff. With Real-Time Event Monitoring, Salesforce publishes the events as they happen, and you can catch them and take action. Salesforce describes it as a way to “monitor and detect standard events in Salesforce in near real-time” (Manage Real-Time Event Monitoring Events (opens in a new tab), Salesforce Help, checked 2026-11-26).
Like most of module 1, this needs a license. Every one of these pages says the same thing: “Requires Salesforce Shield or Salesforce Event Monitoring add-on subscriptions” (same page). The one exception Salesforce names: “You don’t need this add-on to view streaming logout events” (same page).
Streamed and stored
Section titled “Streamed and stored”Each real-time event can go two ways, and you choose which in Setup, in the Event Manager, one event at a time (same page).
Streamed. “Data is streamed using a publish-subscribe model. Salesforce publishes streaming data to an event subscription channel, and your app subscribes, or listens, to the event channel to get the data close to real time” (Real-Time Event Monitoring Data Streaming (opens in a new tab), Salesforce Help, checked 2026-11-26). The subscriber can be an outside system using the Pub/Sub API, or an event relay to a cloud event service; Salesforce’s example is Amazon EventBridge (same page). Inside Salesforce, Apex triggers and flows can subscribe to many of them (LightningUriEventStream (opens in a new tab), Platform Events Developer Guide, checked 2026-11-26). Two numbers, dated 2026-11-22: “Streaming events are retained for up to three days,” and “Salesforce delivers a maximum of 50 million real-time events per day” (streaming page). A stream is for acting now, not for keeping.
Stored. “Many of the storage events are Salesforce big objects, which are ideal for storing large volumes of data for up to six months” (Real-Time Event Monitoring Data Storage (opens in a new tab), Salesforce Help, checked 2026-11-26). A few are kept longer: the same page lists LoginEvent and IdentityVerificationEvent at up to 10 years. The Threat Detection events are standard objects instead. One thing to plan for: you can query a big object on only a couple of fields, “EventDate or EventIdentifier” (same page), with ReportEvent adding the user as a beta filter. So a stored event answers “what happened on this day?” well, and “everything this one person did” less well, unless you send it somewhere that can.
So the design question is the same one as module 1, just faster: who catches the stream, and where does the stored copy end up after six months?
The events that show who looked
Section titled “The events that show who looked”Here’s what makes real-time events matter for sharing and visibility. They don’t only log what custom code does. They apply across Salesforce, on standard pages, which is where your users actually work.
Salesforce lists the events and their storage objects (Real-Time Event Monitoring Objects (opens in a new tab), Platform Events Developer Guide, checked 2026-11-26), and describes what each one stores (Real-Time Event Monitoring Data Storage (opens in a new tab)). The ones that answer “who viewed what”, in Salesforce’s words:
| The question | The event | What it stores |
|---|---|---|
| Who opened this record? | LightningUriEvent | “when entities are created, accessed, updated, or deleted in Lightning Experience” |
| Who opened it in Salesforce Classic? | UriEvent | “when entities are created, accessed, updated, or deleted in Salesforce Classic” |
| Who looked at this list? | ListViewEvent | “when users interact with a list of records, such as contacts, accounts, or custom objects” |
| Who ran or exported this report? | ReportEvent | “how many times a sensitive report was downloaded or viewed and by whom” |
| Who pulled it through the API? | ApiEvent | “all API activity that occurred for particular objects” |
| Who downloaded this file? | FileEventStore | “file-related event data, such as when a user downloads a file” |
| Who exported it in bulk? | BulkApiResultEventStore | “Bulk API activity that occurred for particular objects” |
Read the fine print on the first one. LightningUriEvent “doesn’t track Setup events,” and “If the user navigates away from the page while creating, accessing, updating, or deleting a record, the event will not capture the operation” (LightningUriEventStream page). Close to complete is not complete. Know the gaps before you promise an auditor anything.
And these events are sensitive themselves. “Real-Time Event Monitoring objects sometimes contain sensitive data. Assign object permissions to Real-Time Events accordingly” (Real-Time Event Monitoring Objects). Viewing them takes the View Real-Time Event Monitoring Data permission (LightningUriEventStream page). A log of who looked at a famous patient’s record is itself something only a few people should see.
The login events, LoginEvent, LoginAsEvent and LogoutEvent, are the door’s side of this. The Identity and Access course covers them (Who Did What: Audit During and After Login).
The nurse and the famous patient
Section titled “The nurse and the famous patient”Here’s the example I use in class. A famous patient is admitted to a hospital that runs on Salesforce, on one floor. A nurse on a completely different floor, with a completely different specialty, say pediatrics, searches for that patient and opens the record.
Why does “famous” matter? Because it’s the reason people go beyond their duties. Nobody searches for a stranger on another floor. A famous name is a temptation: curiosity, or something worse, like a story for a friend or a reporter. It’s not that person’s job, and it isn’t appropriate.
Ask yourself: did sharing do anything wrong? Maybe not. The nurse has the permission sets, the record-level access, everything this course has taught you to design. In a hospital, you often can’t lock every nurse out of every other floor’s patients, because in an emergency they need to see them. So the access was allowed. The question is why a nurse on another floor, with a different specialty and no part in this patient’s care, is looking at that file.
That’s the gap monitoring fills. Sharing decides who can look. Monitoring records who did look, so that someone can ask why.
HIPAA asks for exactly this. Its Security Rule has an audit controls standard: “Implement hardware, software, and/or procedural mechanisms that record and examine activity in information systems that contain or use electronic protected health information” (45 CFR 164.312, quoted and cited in chapter 18, module 6). Record and examine. In Salesforce, that’s a LightningUriEvent when the record is opened, stored so you can examine it later, and streamed so someone can be alerted today: the privacy officer, a case in a queue, a message to the nurse’s manager. You can log that activity even on standard pages, and that’s the point.
Threat Detection: what Salesforce watches for
Section titled “Threat Detection: what Salesforce watches for”Some patterns are hard to write down as a rule. So Salesforce watches for them itself. “Threat Detection uses statistical and machine learning methods to detect threats to your Salesforce org” (Threat Detection (opens in a new tab), Salesforce Help, checked 2026-11-26).
It identifies, in Salesforce’s words (same page):
- “If a user session is hijacked”
- “When large-scale automated login requests use stolen user credentials to gain access to Salesforce,” which is credential stuffing
- “Anomalies in a user’s report views or exports”
- “Anomalies in how users make API calls”
- “Anomalies in guest user activity”
- “Anomalies in login attempts”
Read this sentence carefully, because it’s easy to get wrong in either direction: “While Salesforce identifies these threats for all Salesforce customers, you can view the information in the events with Threat Detection in Event Monitoring and investigate further if necessary” (same page). Salesforce is watching for every customer. Seeing the events, and acting on them, is the part that needs Shield or the add-on.
Four more facts from the same page, dated 2026-11-22:
- It isn’t instant. The models “require a brief processing time,” so there’s “an expected time difference between the Event Detection Date and the Event Creation Date.”
- Proxies can hide threats. “Not all third-party proxies pass network-related parameters, such as IP addresses, into Salesforce. Without network-related parameters, Salesforce doesn’t detect all threats.”
- Not everywhere. “Threat Detection is not supported in Government Cloud.”
- You decide the response. A transaction security policy on a Threat Detection event can send a notification (module 3). A flow on ApiAnomalyEvent, CredentialStuffingEvent, ReportAnomalyEvent or SessionHijackingEvent can “generate a case for a follow-up investigation, send an email to a security specialist, or deactivate an affected user pending further investigation.” And Security Center can gather the detected threats from many orgs into one place (module 6).
Salesforce’s own example shows how detection leads to a rule. You get several report anomaly events about a user who “exported many more records of a report on Leads than usual.” After you investigate, you add a policy on that report to stop large exports (same page). Detect first, then decide what to block.
Learn what normal looks like first
Section titled “Learn what normal looks like first”That example is the habit I want you to take from this module. You need to know what these things are ahead of time, test for them, and then validate them.
Salesforce says the same: “before creating transaction security policies, you can view or query events to determine appropriate thresholds” (Event Monitoring (opens in a new tab), Salesforce Help, checked 2026-11-26). How many rows does a normal report export have? How many records does a service agent open in a shift? How many API calls does the nightly integration make? You don’t know until you’ve watched.
So turn on storage for the events you care about, let them collect for a few weeks, and look. Then set a threshold that catches the nurse on the pediatric floor without paging the privacy officer every time a nurse on the right floor opens a chart. A threshold set without looking either misses the real event or raises so many alerts that people stop reading them. Either way, nobody is watching.
Test knowledge. Know the difference between event log files (delayed, hours to a day) and real-time events (near real time). Know that real-time events can be streamed (publish-subscribe, Pub/Sub API, event relays, Apex triggers and flows; kept up to three days) and stored (mostly big objects, up to six months; LoginEvent up to 10 years; Threat Detection events are standard objects; big objects queried on EventDate and EventIdentifier), set event by event in the Event Manager, with Shield or the Event Monitoring add-on. Know which events show who viewed what: LightningUriEvent (record views in Lightning Experience, not Setup), UriEvent (Salesforce Classic), ListViewEvent, ReportEvent, ApiEvent, FileEvent, BulkApiResultEvent. Know what Threat Detection detects (session hijacking, credential stuffing, report, API, guest user and login anomalies) and how to respond (transaction security notifications, flows, Security Center). Know to watch events first to set thresholds. A likely area, not a known question.
What an architect decides here
Section titled “What an architect decides here”- Which questions need an answer now (streamed) and which need an answer later (stored), event by event.
- Who subscribes to the stream: a flow, a security tool, an alert to a named person, and what happens after the alert.
- Where the stored events go before six months is up, if the policy says to keep them longer.
- Who may read the events themselves, since a record of who looked at sensitive data is sensitive too.
- How Threat Detection events are answered: a notification, a flow, a case, and who owns it.
- How long to watch before setting thresholds, and who reviews them.
Beyond the exam: what AI changes. An agent that reads records on someone’s behalf produces the same kind of trail: records viewed, queries run, reports read. Ask whether its activity shows up in these events as the agent’s user, and whether anyone would notice if it suddenly read ten times more than usual. Chapter 20 covers agents.
Explore
Section titled “Explore”- Real-Time Event Monitoring Data Streaming (opens in a new tab), Salesforce Help (checked 2026-11-26)
- Real-Time Event Monitoring Data Storage (opens in a new tab), Salesforce Help (checked 2026-11-26)
- Manage Real-Time Event Monitoring Events (opens in a new tab), Salesforce Help (checked 2026-11-26)
- Threat Detection (opens in a new tab), Salesforce Help (checked 2026-11-26)
- Real-Time Event Monitoring Objects (opens in a new tab), Platform Events Developer Guide (checked 2026-11-26)
- LightningUriEventStream (opens in a new tab), Platform Events Developer Guide (checked 2026-11-26)
- Event Monitoring (opens in a new tab), Salesforce Help (checked 2026-11-26)
