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.
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
- Create a screen Flow. (This is the hard part).
- Set up My Domain (it’s probably already set up).
- Create a Site domain.
- Create a new Site.
- Create a Visualforce Page to house the Flow.
- Build your link that includes variables for your flow. That looks like:
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.”
When I put in my site domain and the fields are merged in the email, it looks like this:
Read the instructions on the Unsubscribe Link App for details on how to create a Site and Site Domain.