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.

4 Comments

  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.

    Reply

Leave a Reply