Launch the same screen flow from different buttons

lightning-record-pagequickactionscreen-flow

I need to create three buttons On Custom Object Record Page which will have similar logic for sending emails.
(Only difference in to who this email will be sent).
I want to use Quick Action and Screen Flow for this.
However I do not want to create three Screen Flows, just one.

Is there a way to check from Screen Flow from whic button it was launched ??

I can not find anything when creating New Quick Action or in Flow Builder

enter image description here

Maybe someone has already done something similar ?

Any help will be appreciated.
thank you

Best Answer

Here's an option:

Instead of using Quick Actions, use Custom Buttons of Type URL

  • Every screen flow has a URL that you can find in the Flow dropdown View Details and Versions
  • Add input variables to your Screen Flow, in your case, call it something like launchedFromButton (Text variable)
  • On each custom Button, add the URL parameter launchedFromButton=MyButtonX
  • Be sure to include a recordId Flow input variable and include that in the custom button URL as well
  • Remember that Flow variables are case sensitive when used for input/output

An example of this can be found in the Help Distribute Flows with URL

/flow/Contact_Info?collNames={!Contact.FirstName}&collNames={!Contact.LastName}

/flow/User_Info?varUserFirst={!$User.FirstName}&varUserLast={!$User.LastName}

...