Visual Workflow (Flow Designer) has been a curious feature of Salesforce that I’ve never had a good opportunity to dive into. I’ve created hundreds of Workflows, Validation Rules and probably over a thousand reports in the last 10 years, but until last weekend I could count on one hand the number of times I’ve actually fired up Flow from Setup. A client of ours was having trouble getting a Visual Workflow (Flow) to work, and instead of handing it off to one of our consultants I decided this was my chance to force myself to learn something new. Below are my first impressions of the tool and some tips to for newbies.
Getting ramped up on Flow Designer
After only a weekend I am absolutely not proficient, but I did learn a few things that I think would be worth sharing to others new to Flow. To learn the interface I watched the overview video: Visual Workflow Cloud Flow Designer (BTW – that’s a ridiculously long name for a product!). That should help get you oriented and understand the tool palette.
To get some "hands on" experience I went through the example Cloud Flow Designer Workbook. The workbook is good at forcing you to try out the different features and learn how to structure your Flows (e.g. input screen > check to see if the record exists > decision (if yes / no) > create a record, etc). I also found the Visual Workflow Implementation Guide was another good reference when experimenting and to get more information about a specific feature (e.g. creating a Constant or a Formula).
I wished the documentation had a comprehensive list of "things to know" or "gotchas" so I didn’t have to spend so much time testing different scenarios to know what Flow can or cannot do. This tip sheet was a good start, but I think it could cover more: Visual Workflow Considerations.
One thing I noticed in the documentation was that Safari was not listed as a supported browser. I didn’t experience any problems using Safari (except for the one scroll issue listed below), but I thought it was odd that Salesforce excluded it from the list. Hmmm, I wonder what doesn’t work? (UPDATE 3/31/2014 – The reason why it’s not listed is because Salesforce Flow requires Flash – more on supported browsers)
Things I Found Odd
When experimenting with Visual Workflow, I found a couple of curious behaviors. Though you can have a required field on the page layout, it won’t be required if you create the record from a Flow (i.e. the record gets created but the required field can be blank). You can also create a Contact that is "orphaned" – meaning the Contact is not associated to an Account. That behavior sounds eerily similar to the super evil "Quick Create" feature. I did find that Validation rules are enforced (unlike with "Quick Create") – that’s good!
It is very easy to click on a step in your Flow and accidently delete it (way too easy in my opinion – how about a warning!). Luckily there is an "undo" button in the top toolbar – a feature that doesn’t exist elsewhere in Salesforce that I know of – and it recovered my work multiple times over the weekend. (UPDATE – Salesforce Product Manager Shannon Hale – @shannonsans – pointed out that the Page Layout Editor has had a Undo and Redo button since Spring ’09. How did I not notice that!)
I found it challenging on a laptop to navigate to the scroll bar inside Flow on the right side of the screen to slide down the page to get down to Steps that were below the fold. When I tried to move my mouse over the Flow page slider, the Browser slider would activate and cover up the page scroll in Flow – very annoying.
I did like that when searching for a field, constant or variable you can just start typing the name (like Search in Setup). This is very helpful if you have hundreds of fields in an object. You can double click to create new fields for a Screen and you can drag and drop fields to rearrange the order of fields on an input screen.
I like that the Visual Workflow UI (User Interface) is pretty compact and that you can do a lot on a single screens because of the tab navigation. It’s efficient when compared to creating a Workflow Rule, where Criteria and Actions are on different pages. Nice, but it illustrates that Visual Workflow was an acquisition (Informavores in December 2009) rather than developed internally. As such it behaves differently than any other area of Salesforce (e.g. the aforementioned "undo" button) – probably adding to the learning curve for Admins touching Flow for the first time.
Things I Did Not Like
Error handling (error messaging) is horrible. This error will come up a lot as you are learning how to your Visual Workflow, but it won’t give you any clues as to the issue:
An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information.
It’s maddening and I can see why lots of Admins might get frustrated and give up on Visual Workflow because they can’t get past this error screen. After seeing it multiple times I know I had to get up and walk away for a while. That error message seems to be fairly ubiquitous. You’ll see that same error regardless if a Validation Rule tripped you up or you tried to create a record with a wrong value (e.g. passing the name of a record rather than the Record ID). For a while it was just testing on my part to see what would work (wasting a lot of time). Then I had an idea…
After a lot of trial and error with the Record Creation step, I realized I could put a screen before a record gets created to see the values that are getting passed to make sure they were what I was expecting – this helped me work through the aforementioned error message.
Actual output of the screen above:
For example, I was working on a Flow to create a Contract Record and found the formula that my client had created was resulting in a negative number, which was preventing a record from being created. Had I not put that screen in front of the record creation step to see the values being passed I would have never been tipped off that was the problem.
If you are using a picklist (Choice) to allow a user to pick a record, be sure the "Stored Value" for that picklist value / choice option is the Record ID.
If you don’t have enough information to create an Account record when creating a Contact and you don’t want to orphan a Contact record (i.e. create a Contact that is not associated to an Account), you can create a CONSTANT to associated a new Contact to a specific Account so you can find it later.
Ok, that’s about as far as I got this weekend playing with Flow. If I get another opportunity to dive deeper I’ll post some more tips!