The Definitive Guide: Connecting Platform Events to Flows

Platform Events and Flows are a perfect match, but to get them to work with each other, you need to go through Process Builder and deal with several interesting wrinkles. Learn More.

Converting a Flow Builder Flow Version Back to Cloud Flow Designer

Please note: this is the unofficialsf.com blog, and this post is as unofficial as they come. The following technique is offered without warranty or support.

The Spring ’19 release of Flow Builder has some gaps in functionality — such as copy and paste — that some people have found necessary to be efficient when building flows. While the Salesforce teams are working on filling in the gaps, it is possible (in Spring ’19) to re-enable Cloud Flow Designer in the Process Automation Settings by deselecting the “Disable access to Cloud Flow Designer” option. When this option is deselected, flow versions that were saved in Cloud Flow Designer are opened Cloud Flow Designer, and flow versions that were saved in Flow Builder are opened in Flow Builder.

But what if you’ve made — and saved — a bunch of changes to your flow in Flow Builder, and only then you decide you want to go back to Cloud Flow Designer? Well, the engine that runs your flows is the same for both versions: although the user interface for building the flow has changed, the metadata created by Flow Builder is pretty much the same as the metadata created by Cloud Flow Designer. There’s nothing in theory to prevent a flow version that was saved in one tool from being opened in the other, except that there isn’t a means to do it in the user interface.

The following technique allows you to move a Flow Builder flow version back to Cloud Flow Designer. Again, this is not supported by Salesforce: you’re going to want to test your flow carefully after you move it back to Cloud Flow Designer. But if you’ve done a lot of work on your flow in Flow Builder already and you really feel like you need to go back to Cloud Flow Designer, and reverting to a previous version isn’t an option, this solution may work for you.

  1. Enable access to Cloud Flow Designer by deselecting the “Disable access to Cloud Flow Designer” option in Process Automation Settings.
  2. If you’re in Lightning, switch back to Salesforce Classic. (This is temporary – it allows you to see and modify the flow version IDs in the URL. You can turn Lightning back on when you finish moving your flows.)
  3. Open the Flow Builder flow version you want to move. Look at the browser URL bar: it will be something like https://org.lightning.force.com/builder_platform_interaction/flowBuilder.app?isFromAloha=true&flowId=301B0000000TWbNIAW (the part after “301” will be different for you).
  4. Copy the part of the Flow Builder URL that starts with 301 (e.g. “301B0000000TWbNIAW”). This is the flow version ID.
  5. Open a flow version that was created in Cloud Flow Designer. Any flow will work, it doesn’t have to be the same one that you opened in Flow Builder. Look at the browser URL; it will be something like https://org.my.salesforce.com/designer/designer.apexp#Id=301B0000000TSW8IAO (again, the part after “301” will be different for you).
  6. Replace the “301…” part in the Cloud Flow Designer URL with the ID that you copied from your Flow Builder version in step 4 (in my example, the modified URL would be https://org.my.salesforce.com/designer/designer.apexp#Id=301B0000000TWbNIAW).
  7. Press Enter in the URL bar to load the new flow ID into Cloud Flow Designer. You might have to press Enter a couple of times before the browser actually reloads — you’ll know it’s loading the new flow because you’ll see a progress indicator.
  8. Save the flow as a new flow or flow version. You now have a version that has all the changes from your Flow Builder flow, but can be opened in Cloud Flow Designer.

At this point, test your flow and make sure that everything is still working as expected. I verified that this worked for my flow by saving the Cloud Flow Designer version as a separate flow, adding both flows to a package, exporting it in Workbench, and doing a diff on the files: the only difference in the metadata was the name and an additional processMetadataValues element in the Flow Builder flow indicating that it was created using Flow Builder. You don’t have to test it my way. But you should still do some tests before continuing to enhance the flow. If you find it’s not working the way you expect, you can still return to your previous version.

You can now continue working on the flow in Cloud Flow Designer. You can also switch back to Lightning.

Note that in July 2019, Chrome, Firefox and other browsers will start to make it more difficult to enable the Flash plugin that is required to use Cloud Flow Designer, as the browsers prepare for Adobe’s end of life for Flash. If you’re comfortable staying in Flow Builder now, you should. But if it’s really not working for you right now, I hope this will help until Summer ’19 rolls out.

New Flow Actions: Lock/Unlock Record & More

Englhard Consulting has published a strong set of new actions and components. Check it out at https://englhardconsulting.com/flow-and-lightning-components-package/

The Top 10 Things You Want to Know About the New Flow Builder

1. It’s faster and more intuitive

Flow Builder has a brand new user interface that is similar to Lightning App Builder and Process Builder, so if you’re familiar with those tools you’ll feel right at home here. Clean lines and intuitive shapes make it easy to navigate around your flows, and the streamlined toolbox makes it easier to find the element or resource you’re looking for. On top of that, Flow Builder is built with Salesforce’s latest front-end technologies for fast performance – say goodbye to kludgy old Flash!

A complex flow in Flow Builder

2. Some things have been renamed

If you’re an old-school Flownatic, you might have noticed that some things have been renamed or moved around in Flow Builder. For example, the sObject data type is now a Record data type; and static, local and quick actions can all now be found under the Core Action element. As part of the streamlined toolbox, we replaced the Fast Lookup and Record Lookup elements with Get Records, and the other Data elements have received a similar treatment. For a full list of differences, see the Flow Builder vs. Cloud Flow Designer document in Salesforce Help.

3. We couldn’t get to these old Cloud Flow Designer features, but we expect to deliver them in Summer ’19

We know that undo/redo, copy and paste, and the ability to find elements and resources in the canvas are important to you. We’re working hard on these features and expect to release them in Summer ’19. (As always, please make purchasing decisions based on current functionality and not this forward-looking statement!) We just ran out of time to get features into Spring ’19 and decided it was better to release Flow Builder with all the goodness it does have, than to wait another release.

4. You can continue to use Cloud Flow Designer side-by-side with Flow Builder

Starting with Spring ’19, Flow Builder is the default experience when creating new flows and opening existing flows. If you need to use Cloud Flow Designer – perhaps because a feature you need isn’t yet available in Flow Builder – you can re-enable it: in Setup, go to the Process Automation Settings page and deselect the Disable access to Cloud Flow Designer option. With this deselected, flow versions that were saved in Cloud Flow Designer will open in Cloud Flow Designer, and versions that were saved in Flow Builder will open in Flow Builder.

If you have a flow that you saved in Flow Builder and you decide you really need to go back to Cloud Flow Designer, there’s an unofficial solution for that too: see Converting a Flow Builder Flow Version Back to Cloud Flow Designer.

5. Pan the canvas using Space+Click

To pan the canvas, you can press and hold down the Space key, then click anywhere in the canvas and drag.

Animation showing how to toggle pan mode with the space+click combination.

6. Select multiple elements using Shift+Click

We’re working on marquee selection (clicking and dragging to select multiple elements) for a near-term release. Until then, to select multiple elements on the canvas, press and hold down the Shift key, then click on each element you want to add to the selection. Then click on any selected element to move the entire selection.

Animation showing how to select multiple elements to move them.

7. Make a variable a collection variable with a single click

To turn a variable of any data type into a collection variable, select the Allow multiple values (collection) checkbox next to the Data Type field.

The New Resource modal with the Allow multiple values (collection) checkbox selected

8. There are new Lightning Components available out of the box

We added the ability to use Lightning components in flows in Winter ’19, and actually included a number of out-of-the-box components then, like Dependent Picklists, Phone, Email, and Name – but since they were hidden under Extensions in Cloud Flow Designer, you might have missed them. Flow Builder elevates these components to first-class screen components, and with Spring ’19 we have two new components: Address and Display Image.

Remember, when you’re using Lightning components with input fields in them (like Name) you’ll need to specify a variable for the field in the Store Output Values section in the component properties in order to use the field’s value elsewhere in the flow. (This is different from the way screen components like Text work, where the screen component can be used directly as a resource.)

9. New Trailhead content is live!

All of the Trailhead modules and projects that previously referred to Cloud Flow Designer have been rewritten with instructions on how to use Flow Builder. If you’ve previously completed these modules and projects, maybe you’d like a refresher! Otherwise, hold tight until March – brand new flow content will be coming your way soon.

10. There are 2 hours of fresh video tutorials that you can watch

All the Trailhead content related to flows is now up to date with the latest on Flow Builder. In addition, Alex Edelstein ‘s Get Started with the New Flow Builder post on the Salesforce Admins blog has two hours of video tutorial content to help both new and old school flow users get up to speed. From sending an email to building a screen to working with multiple records, these tutorials have you covered!

Lightning Flow Tutorials

These tutorials feature the new Flow Builder.

These are designed to work well both as an introduction to Flow for someone who has never used it and as an introduction for someone converting from Cloud Flow Designer.

Check them out here.

More Flow Resources

Official Sites

Flow Documentation (https://sfdc.co/flowdocs)

Lightning Flow Developer Center (https://sfdc.co/flowdev)

Community Sites

“Unofficial Flow” Community Site (unofficialsf.com)

Introduction: Using Salesforce Flow With Quip

The new Quip Flow Actions for Salesforce Flow open up new ways to combine the shared, universal accessibility of Quip with the power of Salesforce.

Video

Installation

Documentation

Here are some examples:

#1: Update Salesforce with Data From Different Quip Docs

In this example, Quip docs have been created for different Salesforce contacts. One scenario where this can be useful is when an enterprise has employees that don’t have Salesforce licenses. If each of those employees has a Quip document and a Contact representing them, the documents can be used to display data from Salesforce and collect data from the employees. (Note that this uses the new Spring ’19 Flow Builder):

A key element of this is that the name of each quip document is formed using a Flow formula:

To configure the Get Quip Sheet Data flow action, we do the following:

  1. Provide the name of the corresponding Quip doc. Start with a contact name, generate the ConstructedName using that formula, and pass it in to the flow action:

2) For each piece of data that we want to extract from the quip doc, we reference it by specifying the label value of the cell to its immediate left. This is one of three ways you can specify a specific cell value:

3) Finally, map the retrieved values from the Quip document to flow storage variables so you can use them later in the flow:

Side Discussion 1: Error Messags

Here I’ve created variables to map the Error Message and Is Success outputs. You don’t have to actually use these variables, but if you take the time to define them, then any error messages you get will show up in the debugger like this:

If I try to immediately update the Contact as soon as I get the data out of the Quip document like this:

Side Discussion 2: Mixing Callouts and Transactions

In my first attempt at setting up the flow, it looked like this:

When I ran the flow in the debugger, though, I got this error:

I had forgotten that you can’t use a callout (here, the flow action is “calling out” from Salesforce to the quip api endpoint) in the middle of an open Salesforce transaction. When flow loops, Salesforce prepares a single transaction so it can commit all of the loops with one database action, in the name of resource conservation.

I needed to restructure my flow and got a key hint from a brand new tooltip:

The tooltips in Flow Builder are completely overhauled and have a lot of extremely timely tips; they’re not just simple definitions.

The resulting flow uses a collection operator. Each time we go through the loop, the modified contact is added to a new “updatedContacts” collection variable that can later be used to carry out the update.

#2 Clone a Quip Template and Update the Resulting Quip Sheets with Salesforce Data

Now let’s change direction and go From Salesforce To Quip. The use case is this: Given a set of Contacts, generate a custom Quip sheet for each one and fill it with Contact data. Then email the URL to each of the Contacts.

This might be useful if you want to generate shareable reports for your customers using data stored in Salesforce.

This flow features 2 of the new Quip Flow Actions:

Clone Quip Document is a simple action that duplicates a named document. Store Data in Quip Document does the heavy lifting of inserting flow data into specific Quip cells.

We create a Quip document to act as our template:

The Clone action generates a new quip sheet based on this template, and give it a name using a formula technique like the one described above.

The Store Data in Quip action lets you specify up to ten pieces of data to write to 10 cells. You can use several approaches to specify a target cell:

  1. Specify a label and indicate that the target cell is immediately to the right of that label (that’s what we’re doing)
  2. Specify a label and indicate that the target cell is immediately below that label
  3. Specify both a column label and a row label, in which case the target cell is the intersection of the column and row. This is great for updating a single cell in a table.
  4. Specify a cell by its absolute address (for example: B2)

The flow produces sheets like this:

and generates emails like this:

Row Operations

You can use the AddRowToQuipSheet action to add a row to a sheet using data from Salesforce or update an existing row.

Here’s an example of an Add:

And here’s a sample showing an Update:

Walkthroughs of these are provided in the video (see link at the top of this article.)

Quip User Management with Flow

There are also Flow Actions to Add a User to a Folder and Remove them from a Folder so you can add quip folder activation to your onboarding flows.

Quip Document Management with Flow

There are also Flow Actions to Rename a Quip Folder and Add a Quip Document to a Folder to make it possible to automate management of your Quip data.

Learn More:

Installation

Documentation

Documentation for Flow Actions for Quip

Now you can add the power of Quip documents to your flows with the help of these useful actions.

Introductory Blog Post

Video

Any action have at least two output parameters: IsSuccess, which shows if action was successful and ErrorMessage, that contains the meaningful explanation of what exactly went wrong in case of failure. The source code of the actions can be found here. The detailed description and instructions on how to install and enable these actions in your org can be found below. Generally, any Quip document can contain nested sheet so all actions that work with the sheet data allow to specify the sheet name (otherwise, the first sheet will be used)


CreateQuipSheet

Creates a new Quip spreadsheet with the specified name. Optionally, a path to folder can be specified (otherwise, a file will be created under authenticated user’s private folder). URL of the New File output parameter contains the URL that can be used to open the newly created file in the browser.

CreateQuipSheet input parameters
CreateQuipSheet output parameters

CloneQuipDocument

Clones Google Sheet file located under the specified path. IsSuccess will be set to False if file doesn’t exist. URL of the Copy output parameter contains the URL that can be used to open the newly created file in the browser.

CloneQuipDocument input parameters
CloneQuipDocument output parameters

GrantAccessToQuipDocument

Shares a specific Quip document with specific users (email addresses). IsSuccess will be set to False if document doesn’t exist. There are five input parameters to specify user email (User #1–5) in case your inputs are kept separate but any of these parameters also accept a comma-separated list of emails.

GrantAccessToQuipDocument input parameters

RevokeAccessToQuipDocument

Revokes access to specific Quip document from specific users (email addresses). IsSuccess will be set to False if file doesn’t exist. There are five input parameters to specify user email (User #1–5) in case your inputs are kept separate but any of these parameters also accept a comma-separated list of emails.

RevokeAccessToQuipDocument input parameters

CreateQuipFolder

Creates new Quip folder and all sub-folders under the path specified. If only folder name is provided, creates new sub-folder in the authenticated user’s private folder.

CreateQuipFolder input parameters

RenameQuipFolder

Renames Quip folder located under the specified path. IsSuccess will be set to False if folder doesn’t exist.

RenameQuipFolder input parameters

AddQuipDocumentToFolder

Add Quip document with the specified name to the folder located under the specified path. If folder or any sub-folders in the path don’t exist, they will be created. IsSuccess will be set to False if folder doesn’t exist.

AddQuipDocumentToFolder input parameters

GetQuipSheetData

Retrieves data from Quip document located under specified path. Optionally, a sheet name can be specified, otherwise the first sheet of the document will be used. The location of the cell to retrieve can be defined with the set of parameters (#1–5) using the following rules:

  • If At Cell parameter is specified then the cell under the specific Excel-like address is retrieved (e.g. B2 or C100)
  • If Cell Below Which Label parameter is specified then the cell directly below the one with the specified value is retrieved;
  • If Cell to the Right of Which Label parameter is specified then the cell directly to the right of the one with the specified value is retrieved;
  • If both Cell Below Which Label and Cell to the Right of Which Labelparameters are specified then the cell that is located in the intersection of the respective column and row is taken.
GetQuipSheetData input parameters
GetQuipSheetData output parameters
Example sheet

So if we use the above sheet and input parameters then both Value #1 and Value #2 output parameters will have John’s Phone value.

Note that the Quip checkbox gets translated into the strings “True” and “False” when read into flow.

StoreDataInQuipSheet

Saves data to Quip documentlocated under specified path. Optionally, a sheet name can be specified, otherwise the first sheet of the document will be used. The location of the cell to save to can be defined with the set of parameters (#1–5) using the following rules:

  • If At Cell parameter is specified then the cell under the specific Excel-like address is updated (e.g. B2 or C100)
  • If Cell Below Which Label parameter is specified then the cell directly below the one with the specified value is updated;
  • If Cell to the Right of Which Label parameter is specified then the cell directly to the right of the one with the specified value is updated;
  • If both Cell Below Which Label and Cell to the Right of Which Labelparameters are specified then the cell that is located in the intersection of the respective column and row is updated.
StoreDataInQuipSheet input parameters

AddRowToQuipSheet (or Update)

Adds a new row OR updates an existing row in the target Quip document’s sheet located under the specified path and populates specific columns with the values specified. The columns can be defined by either values located there or column part of the Excel-like address (e.g. A from A2)

AddRowToQuipSheet input parameters

To make the operation an update instead of a new row, specify the index column that you want to match on by setting its “Use Value as Index for Update” attribute to true as shown here:

Note that the updating match function works with multiple columns, so you can use a combined First Name column and Last Name column to identify existing rows:

Privacy Policy

Privacy Notice

This privacy notice discloses the privacy practices for Unofficial Flow Actions. This privacy notice applies solely to information collected by this website. It will notify you of the following:

  1. What personally identifiable information is collected from you through the website, how it is used and with whom it may be shared.
  2. What choices are available to you regarding the use of your data.
  3. The security procedures in place to protect the misuse of your information.
  4. How you can correct any inaccuracies in the information.

Information Collection, Use, and Sharing 
We are the sole owners of the information collected on this site. We only have access to/collect information that you voluntarily give us via email or other direct contact from you. We will not sell or rent this information to anyone.

We will use your information to respond to you, regarding the reason you contacted us. We will not share your information with any third party outside of our organization, other than as necessary to fulfill your request, e.g. to ship an order.

Unless you ask us not to, we may contact you via email in the future to tell you about specials, new products or services, or changes to this privacy policy.

Your Access to and Control Over Information 
You may opt out of any future contacts from us at any time. You can do the following at any time by contacting us via the email address or phone number given on our website:

  • See what data we have about you, if any.
  • Change/correct any data we have about you.
  • Have us delete any data we have about you.
  • Express any concern you have about our use of your data.

Security 
We take precautions to protect your information. When you submit sensitive information via the website, your information is protected both online and offline.

Wherever we collect sensitive information (such as credit card data), that information is encrypted and transmitted to us in a secure way. You can verify this by looking for a lock icon in the address bar and looking for “https” at the beginning of the address of the Web page.

While we use encryption to protect sensitive information transmitted online, we also protect your information offline. Only employees who need the information to perform a specific job (for example, billing or customer service) are granted access to personally identifiable information. The computers/servers in which we store personally identifiable information are kept in a secure environment.

If you feel that we are not abiding by this privacy policy, you should contact us immediately via email at privacy@edelstein.org .

Flow Actions for Google Apps

This site is the home of Salesforce Flow Actions for Google Sheets. This is not an official Salesforce site or software.

These flow actions make it easy to use Google Sheets and Google Docs with Lightning Flow.