Configuration tutorial
How to Build a Self-Updating Data Table in Salesforce with Platform Events
This step-by-step guide walks you through the process of creating a real-time updating Data Table using Avonni, Platform Events, and Salesforce Flows.
By the end, you'll have a Data Table that automatically refreshes itself—no manual reloads required—whenever related records are created or updated in Salesforce.
Overview of What You'll Build
To make this work, you'll set up three things:
A Platform Event to broadcast data changes
A Record-Triggered Flow to publish the event
A Screen Flow with a Data Table that listens and refreshes in real-time
Create a Platform Event
We need a way to signal when a record changes. Platform Events act like a message system, letting us broadcast these changes in real-time
Go to
Setup
and search forPlatform Events
.Click
New Platform Event
.Fill in the
Label
(e.g., "RecordChangeEvent"),Plural Label
, and theAPI Name
should auto-populate.Set Publish Behavior to
Publish After Commit
.Click
Save
.
Add a Field to the Platform Event
We’ll use a field to pass the ID of the changed record. This helps the component know which data to refresh.
Inside your new Platform Event, click New Field.
Choose Text as the data type.
Fill in:
Field Label: Example –
RecordId
The API Field Name will auto-fill.
Click Next, configure any field options if needed, and click Save.

Create a Trigger Flow
This Flow sends a Platform Event when a record is created or updated.
In Setup, search for Flows and click New Flow.
Choose Record-Triggered Flow.
Configure the flow trigger:
Object: Choose the object to watch (e.g.,
Lead
orAccount
)Trigger: Choose
Created
,Updated
, or bothAdd Conditions if you only want the event triggered in specific cases
Click Done.
Now add an action to publish the Platform Event:
Drag a Create Records element to the canvas.
Label: e.g.,
Create Record Change Event
How to Set Values: Select
Manually
Object: Choose the Platform Event you created (e.g.,
RecordChangeEvent__e
)Field Values: Set the
RecordId
field to{!Record.Id}
(Optional) Add a Decision node if you want more control over when the event is sent.
Click Activate to turn on the flow.

Create a Screen Flow
Now we build the actual user interface that listens for the Platform Event and refreshes automatically.
In Setup, go to Flows and click New Flow.
Choose Screen Flow.
Add a Screen element to the canvas.
Drag a Data Table component onto the screen.
Configure the Data Table:
Data Source: Select
Query
Object: Choose the object you want to display (e.g.,
Account
)
Configure Real-Time Refresh:
In the Advanced Options of the Data Table:
Channel Name: Enter the API name of your Platform Event (e.g.,
RecordChangeEvent__e
)Key Field Name: Enter the name of the Platform Event field that holds the record ID (
RecordId
)(Optional) Key Field Value: Use this if you only want to refresh for one specific record ID
💡 Want to understand these settings in detail? See: Query Refresh EMP Options Explained

Last updated
Was this helpful?