Now then, Dmitri, you know how we’ve always talked about the possibility of something going wrong with the Bomb… The *Bomb*, Dmitri… The *hydrogen* bomb!…
One of my favorite movies is Dr. Strangelove. While this fantastic cold war movie may not appeal to all audiences, it is a crazy satire of the ridiculous threat of mutually assured destruction that the USSR and the USA faced as Cold War nemesis.
Okay, okay, I get it, it is a fairly geeky movie to enjoy, but there are many life lessons in that movie.
So what does that have to do with Salesforce? First, I have to give credit to SalesforceYoda for a great blog which references the movie in relation to Flows. His reference was to the movie title but there is more we can learn from the movie.
For those that didn’t immediately go and check out the movie on Netflix, the basic premise of the story is a group of strategic deterrent bombers have been given the go-code to launch their nuclear weapons on their Russian targets. There isn’t a no-go code to recall them but they should not have been given the go-code. As the movie unfolds, we see a series of comical events unfold as they grow closer and closer to the precipice of mutually assured destruction.
When building a Flow, you have the option of going the route of Dr. Strangelove. You can skip planning and leave out fault handling. If you go this path, you’ll be walking the line of something going wrong. It might not be as detrimental as the hydrogen bomb, but in the end, your users will push you closer and closer to mutual assured destruction where their adoption and your success will both be destroyed in the fallout from one too many unhandled faults.
Sir, you can’t let him in here. He’ll see everything. He’ll see the big board!
General Buck Turgidson, one of the nation’s finest, has the sense to point out that letting the Russian’s into the war room is not a good idea. That may be the case for the ill-fated US government in the movie, but it is not in your case.
Get your users involved from the beginning. Unless you are an expert on the business process that you are trying to automate, you need to start with process mapping. I like to draw out my thoughts on some paper or in a product like elements.cloud so that I don’t miss any critical steps. Want the fastest route to that error message? Forget to populate a required field on a record that you are creating.
Figure out all of the steps that need to go into your flow. When I was working on my first flow, I was enhancing a flow that was built without taking into account all of the components of the business process.
What that meant was that the flow would error 100% of the time because it was not populating required fields. Talk about beating ones head against the wall when that flow had to be split open, gutted, and reconfigured. Next time, letting the business in to “see the big board” might have prevented that problem. But then again, I wouldn’t have been forced to learn how to use flows. And that would have been sad.
These are the lessons I learned that would have been helpful:
- Know what the users want to have happen in the end – We had a great process. It did about 50, maybe 60% of what it needed to do. However, we were missing some key components. There were some reporting needs that we needed to have 100% data compliance for. That meant that we need to get those into the Flow.
- Fill in all of the required fields on any new records you are created – The fastest way to an error message is to forget to fill in a required field on a record you are creating or updating.
- Guess what?!?! You can do dependent picklists and more importantly, looups in your flows. But they are super wacky so if you can avoid them, do. Otherwise check out these resources: Metadata Dependent Fields (This is what I used), Visualforce Dependent Fields, and Lookup Fields in Flow. There are a few ideas to make these standard flow functions, so definitely go vote for them if you use flows at all. At some point you will need a lookup or a dependent picklist.
- Extra fields on the objects may be the key to your success. I figured out how to add lookups but that didn’t solve the problem as the record being looked up had a description field and a code field. Some people knew one and some knew the other. And there were hundreds of records being sorted through. To get around this, I created a special lookup field that concatenated the code and description. Then using a contains function as well as a few other filters, I was able to make it so the user only got a list of 5 or 6 records instead of 100.
Check back soon for how to handle your faults in a flow.