Replacement for “Stay in Touch” using Flows

captains log : star date april 2018 – check out this new post that allows using the lightning runtime on a flow in a visualforce page in a site. New and improved y'all. Original post is below:

The native Salesforce stay-in-touch functionality is great, unless you want to change anything at all with how it works, as there is currently nothing at all that can be modified (though there is an idea with 16,000 points that you can vote for.)

In this post I will demonstrate how, by using visual workflow embedded on a public site, its possible to pass in the ID of an existing contact via a URL parameter, display the values for a non-authenticated user to edit, and to save the edits back to Salesforce.

There is one major constraint to work around. Salesforce does not permit the Site Guest User to edit contacts, so you have to use a custom “holding” object along with an autolaunched flow to update the “real” contact. Autolaunched flows run in system mode, which takes care of the permissions issue!

Pulling this together requires the following components. I will (someday) write sub-posts with details on each of the steps involved.

  1. Flow to look up a contact, capture updates, and create a “Temporary Contact” record with the updated values
  2. Flow to update the “Real” contact from Temporary Contact
  3. Process to launch Flow #2 when Temporary Contact record is created
  4. Visualforce page to embed the flow on (no controller required!)
  5. Site to display the flow embedded on the visualforce page
  6. Create an email template and fire off requests for updates individually or using mass email

Some considerations on this approach

  1. I have no idea if this violates the Salesforce terms of use as it works around the CRED limits they impose on site guest user
  2. Compound fields (addresses) and multi-select picklists may (or may not) be difficult to write from temporary contact to “real contact.” I built this using first name, last name, and email for my proof of concept and have not yet tested other field types.
  3. If there are issues w #2, it might be possible to have the flow create a “real” contact (as site guest user is allowed to create contacts), and then to use a tool like dupeblocker to auto-merge the dupe w/ the original.

Now read this

The Magic of Actions in Process Builder and Flow

The ability to use quick actions in process builder / flow has been around for a few years, but i’ve never seen a reason to use them. I figured some out this weekend. Here are the use cases I see. a) standardization : if you will do the... Continue →