Now Easy to Expose Flows Outside of Salesforce

I’m back from maternity leave and holy SMOKES (get it? The west coast is on fire): an update to Flow in Summer ’20 totally broke the Unsubscribe Link App. It’s okay, though. It’s fixed now and this Flow improvement is worth it.

baby in salesforce onesie with unicorn emoji blocking his face.
Here’s my little one disguised as a unicorn

It’s now much simpler to expose a Flow to folks who aren’t logged into Salesforce. They can click a link which launches a Flow that modifies, deletes and creates all sorts of records! (Be careful!)

All you have to do now is save your flow as System Context without Sharing–Access All Data. This eliminates the need to give a Site Guest User permission, adjust your sharing settings, and create sharing rules.

So my example is the Unsubscribe Link. You send an email through Salesforce with this link. Your recipient clicks on it and that launches the Flow which will update their contact and lead records with Email Opt Out. It’s pretty sweet.

How to Build your own externally visible Flow

  1. Create a screen Flow. (This is the hard part).
  2. Set up My Domain (it’s probably already set up).
  3. Create a Site domain.
  4. Create a new Site.
  5. Create a Visualforce Page to house the Flow.
  6. Build your link that includes variables for your flow. That looks like:
https://yourSiteDomain/YourVisualforcePageName?flowVariable1={{{MergeField1}}}&FlowVariable2={{{MergeField1}}}

In the Unsubscribe Link app, that looks like this. recordId and Email are two variables in my Flow. Everyone who sets up the app will substitute their site domain for “yourSiteDomain.”

http://yourSiteDomain/Unsubscribe?recordId={{{Recipient.Id}}}&Email={{{Recipient.Email}}}" 

When I put in my site domain and the fields are merged in the email, it looks like this:

https://powerfulsolutions-developer-edition.na139.force.com/Unsubscribe?recordId=0034W000029huR8&Email=georgeBailey@bbbs.com

Read the instructions on the Unsubscribe Link App for details on how to create a Site and Site Domain.

Published by

JessieRymph

Jessie joined Salesforce.org in 2018 to give introductory webinars to nonprofit customers. She now is a Senior Solution Developer supporting nonprofits and education customers at Salesforce. All opinions expressed on this blog are her own or those of the contributors. She's spent 17 years more or less in CRMs and databases, but didn't meet Salesforce until 2011. Jessie co-led the Seattle Salesforce Nonprofit User Group in 2015-2016. She wrote a sh*tty first draft of a novel and hopes to turn it into a screenplay!

4 thoughts on “Now Easy to Expose Flows Outside of Salesforce”

  1. Thanks for the super-easy walkthrough! When I tried to run my flow I get the error message

    “We can’t display component ‘forceContent:fileUpload’, because it isn’t supported in Classic runtime. Ask your Salesforce admin to distribute this flow in Lightning runtime instead.”

    Does that mean in order to use the file upload component I need to use a Community instead of a Site? I saw this walkthrough on how to do that https://www.youtube.com/watch?v=weoRR2qUu5o on how to do that but haven’t tried it yet.

Leave a Reply