Loading

Capture the record visitor details using Screen Flow

Udgivelsesdato: Aug 21, 2026
Beskrivelse

Do you want to record the data for the visitors who visit the Salesforce record pages? This article shows how to capture visitor data for Salesforce records using Screen Flow in Salesforce Platform

Løsning

This resolution shows how to capture visitor data — who viewed a Salesforce record and when — by using a hidden Screen Flow embedded on the record page, since Salesforce doesn't track record page visits out of the box

Create the Record Visitor Custom Object

Step 1: Create a custom object Record Visitor with the following fields: 

  • Object Name (text)
  • Record Id (text)
  • User (Lookup to User object)

Build the Hidden Screen Flow

Step 2: Create a Screen Flow and name it as: Hidden Screen for Visitor Count
Step 3: Create a new input variable recordId

3 Edit Variable.png  
 
Step 4: Create a formula variable to get the record Id prefix using the record id

4 Edit Formula.png  
 
Step 5: Add a Get element to get the Entity Definition record using the prefix formula. We are using this just to get to the object name.
  • We can also pass the object name in the variable along with recordId variable while adding the flow to the lightning record page

5 Edit Get Records.png


 
Step 6: Create a Record Visitor record by setting the User Id, Record Id, and the Object Name

6 Edit Create Records.png  

Step 7: Add a blank screen at the end and you’re done. Activate the flow

t.png

Note: Here is how the completed flow looks like now
7 Completed Flow.png  

Add the Flow to the Record Page

Step 8: Add the screen flow on the lightning record detail page for the object you want to start tracking
8 Record detail page.png  


Note: Please see the following for what the ghost screen looks like

 9 Final screen.png 

You'll see all tracking records in the custom object, but if you want to see it on the record level then you can create an LWC component to show it on the record level

Yderligere ressourcer

For further assistance on other topics please search on Help! 

Vidensartikelnummer

000393631

 
Indlæser
Salesforce Help | Article