Auto Navigate Screen Flow with Platform Event Salesforce

Munawirrahman
2 min readDec 2, 2022

--

Hi Folks!

Let’s make this writing simple, imagine that you want your Screen Flow user to navigate between screens based on other event (platform event). That’s the problem I’m trying to solve here.

Auto Navigate Event (Platform Event)

Attributes

  1. Label : Navigation Path
    API Name : Navigation_Path__c
    Type : Text (Mandatory)
    Description : The navigation path you want your user to take. Valid values are (NEXT,BACK,PAUSE,FINISH).
    Example : NEXT
  2. Label : Target User Ids
    API Name : Target_User_Ids__c
    Type : Long Text Area (Optional)
    Description : If being filled, the navigation will only happen to user with User.Id within this attribute. The format of this attribute is comma separated. If not filled, all user with screen that listen to this event will be auto navigated.
    Example : 0055g0000037HFy,0055g0000031PAm,0055g0000037STa
  3. Label : Unique Key
    API Name : Unique_Key__c
    Type : Text (Optional)
    Description : If being filled, this unique key will check whether unique key on the event matched with Auto Navigate Platform Event Listener’s Unique Key or not. If matched, it will launch the screen flow.
    Example : {!$Flow.InterviewGuid}

Screen Flow Platform Event Listener (Flow Lightning Component)

Attribute

  1. Label : Unique Key to Identify Event
    Type : Text (Optional)
    Description : If being filled, this unique key will check whether unique key on this component matched with event’s Unique Key or not. If matched, it will be auto navigated.

The setup of this solution is pretty much same like my previous writing here. TLDR : Set the event listener on the screen with unique key attribute (if needed), publish the platform event with necessary attributes, and the user will be navigated automatically.

Install Link.

Source Code.

Thanks.

--

--

Munawirrahman

A dots connector. 22x Salesforce Certified. Open for consultation, Email: munawirrahman@gmail.com