Platform Events

Real-Time Communication for Seamless Flows

What Are Platform Events?

Platform Events in Salesforce act like instant messengers within your org. They allow different parts of your system—or even external systems—to notify each other immediately when something changes. This makes your Flows more dynamic and more responsive.


Why Use Platform Events with Flows?

Let’s say multiple sales reps are working from the same list of leads. When one rep claims a lead, you want that lead to disappear from everyone else’s screen right away to prevent duplication or errors. This is precisely what Platform Events are designed for: keeping every user’s view in sync, in real-time.


Benefits of Platform Events in Flows

  • Live Collaboration: Everyone using your Flow sees the most current data—instantly.

  • Avoid Data Conflicts: Changes (like assigning a lead) update across users, preventing multiple people from working on the same record.

  • Smooth, Engaging UX: With no need for manual refreshes, your users experience faster, more fluid interactions.


Supported Components

Avonni’s following data components are compatible with Platform Events and support live updates:

These components listen to Platform Events and refresh themselves automatically—no custom logic or refresh button needed.


How to Enable Platform Event Integration

Platform Event integration is available when you use a Query as the data source in your component.

To enable it:

  1. Open the component using a Query data source.

  2. Go to the Advanced Options section.

  3. Look for the “Query Refresh EMP” settings.

Query Refresh EMP Settings Explained

When configuring a component to refresh using Platform Events automatically, the Query Refresh EMP section (available under Advanced Options when using a Query data source) allows you to control how and when the data should be updated. There are three key options you need to understand:


1. Channel Name

What it is: The name of the Platform Event object your component should listen to.

Why it's important: This is how your component knows which type of real-time message to listen for. Example: If your Platform Event is called RecordChangeEvent__e, that’s what you enter here.


2. Key Field Name

What it is: The name of a specific field in your Platform Event that acts as a filter.

Why it's important: It allows your component to only react to Platform Event messages that are relevant to what it's displaying. Typically, this is something like a RecordId field.

How it works: If this field is left blank, the component will refresh every time the Platform Event is triggered, regardless of which record it’s about. If you do specify a key field, the component will only refresh if the value in that field matches a record currently visible in the component.


3. Key Field Value (Optional)

What it is: A specific value to compare against the Key Field Name.

Why it's important: Use this if you only want the component to refresh when a very specific value is received in the Platform Event. Example: Only refresh the data table if RecordId = 001XXXXXXXXXXXX.

⚠️ Note: You typically use either Key Field Name or Key Field Value, not both. If only the Key Field Name is set, the component will refresh based on whether any of its visible records match the incoming Platform Event. If you add a Key Field Value, it becomes even more precise—refreshing only if the Platform Event matches that exact value.

Configuration tutorial

Summary

Platform Events are the key to building responsive, collaborative, and conflict-free flows. Avonni Data Components seamlessly integrate with Platform Events, allowing you to create Flows that deliver a powerful and user-friendly experience.

Last updated

Was this helpful?