Going with the Flow

First I conquered the workflow. That was relatively simple. ‘If this happens, do this’. But they can be kind of limited. You start on a record and you end on that same record. You can only update fields, send emails, send outbound messages or create a task. There wasn’t a whole lot of satisfaction in the workflow. Then I conquered process builders. They were pretty cool and gave me a lot more options. I could start on one object and make a change on another object. I could chain together a series of If-Then statements to make changes. I could tell it to evaluate the first criteria and if true, take an action and then stop. Or if true take action and then continue to the next criteria. I could take it one step further with invocable processes. That was pretty cool. With the invocable process I could build a process that I could use in multiple places or one that had a second set of criteria. Take this example:

Sam manages her cookie business in Salesforce. She keeps an inventory of her cookies and records her orders. When someone places an order, she needs the system to update her inventory of that type of cookie and if the available inventory falls too low, send her an email. This can all be done with process builder. You start out with your invocable process that says if the total is below 10 then send the email otherwise do nothing. Just watch out, you can’t actually tell a process builder to “do nothing” so you have to cheat and tell it to update a field with its own value. Once that is done, you can build out the main process builder with a number of if-then statements that evaluate the order to see if the order contains that type of cookie. If it does, update the cookie inventory and then run the invocable process to check if the inventory is below 10. Once that is all done, move on to the next cookie variety. Super cool. In the end I figured out how to do some pretty complicated things with process builder.

Workflows and Process Builders weren’t that intimidating to get into. I could manage a bunch of clicks to generate an ‘If-Then’ statement. But there still remained the elusive Flow. I had seen this powerful tool but hadn’t taken the plunge. The interface was intimidating. I didn’t know where to start. Then I got thrown into the fire. There was a major change needed for an existing Flow and it was mine to tackle. I needed to come up with new screens, add some dependent picklists…. that’s a challenge involving creating custom metadata, and have the button that initiated the flow feed in some data for a variable. I spent quite a few hours researching. I was on version 700 of the flow. No seriously. It was that bad. I was minutes away from throwing my laptop out my second floor office window. Then it worked.

After about 3 days, the correct data was displayed, the flow created the records and I saw 0 error messages. It had gone from a simple flow to a masterpiece. Well at least in my mind it was a masterpiece. And I was in love. I love flows. I can do some seriously awesome things with them and I don’t need to know how to write code to do them.

Then the client wanted it changed… they didn’t appreciate my masterpiece. Such is the life of a consultant. But now it only took 100 versions to get the necessary changes made. I was making progress.

So that next time when you are saying to yourself, this could be automated, don’t be scared by the automation tools. If you haven’t tried a workflow, start there. You can do an If-Then statement. If you’ve conquered the workflow, move onto the Process Builder. If you can do one if-then statement, you can string them together. Once you feel comfortable with the Process Builder, check out the Flow. If you can, find one that is already built and take a look at it. Dissect it. Poke at it. See how all the moving parts work. Then you can tackle all of the different ways you can implement a flow, because what good is it to have flow that isn’t ever initiated?

Leave a Reply

Your email address will not be published. Required fields are marked *