Salesforce Lightning Process Builder – Beneath the Bonnet

Posted on 2015-03-23 13:58:04


Process Builder! Flow! LIGHTNING! … if you’re confused by all of of these new and seemingly similar pieces of functionality, you’re right to be… they are the same!
Visual Workflow was a game changer for admins, released Summer 14, allowing you to define quick wizard style interfaces for custom business processes. We had a couple of immediate use cases with clients, which would have previously required Visualorce, triggers, the lot.
Some of the most powerful features in flow are those which aren’t possible with workflow rules, i.e the ability to create/update multiple records. Though, until now, the use case for workflow vs. flow were completely separate, because flows needed an interface to perform actions, those actions couldn’t be triggered by record criteria, as with workflow.


Now, as if stricken from the clouds by Zeus himself, we have LIGHTNING PROCESS BUILDER. The optimist would say this is the answer to all our Salesforce prayers (whilst the realist says “I can’t wait until it’s finished and supports all the same functions as workflow”). We also have the concept of ‘Flow Triggers’, which allow you to trigger those powerful aforementioned flow actions from a workflow rule! Hurray!

So, why both? It seems right now we’re camped out in a half-way house between the present and automated future. Process Builder has it’s limitations, Flow Triggers are in beta… I recently contacted Salesforce support with the enquiry “How do you deploy existing ‘Lightning’ processes within Change Sets?” because we had our first client use case and I couldn’t find any immediately obvious meta data category for ‘lightning processes’. My answer from support was, “the experts here have unanimously determined that yes, you can deploy processes! You can find them under FLOWS”.

“What!?” I thought. I went ahead to flows, and sure enough, there was a flow existing with the name I’d assigned my lightning process. From the change set, I clicked the meta component and guess what? It opens the process I’d built as a flow, compiled of decisions and actions.

Interestingly, you can only access a process builder-spawned flow by this method. i.e I can not navigate to Flows in Setup to find the flow I’m talking about. It’s only available in Process Builder. Let’s have a look…

1. The screenshot below shows my Process, Programme Booking Confirmation, available to view and edit in Process Builder.

2. Here we the list of ‘all’ existing Flows that were created in Flow Designer. Note Programme Booking Confirmation is not listed.

3. Now, after following Salesforce Support’s advice, I searched under Flows in my Change Set to find Programme Booking Confirmation and included it as a change set component. 

4. And here we have it! Accessing my Process… Flow… Flowcess from the change set, I get the usual Flow metadata view and when I click edit, the Flow Designer launches to reveal the decision and email action I compiled in Process Builder. 


So, I think we’re all in agreement that Lightning Process Builder is the elected saviour of all that is good, considering the hype at Dreamforce and the emergence of a completely new ‘Salesforce Lightning’ marketing term. Previously I was confused by the conflict between this, workflow and flow, but this encounter has clarified things slightly for me. Lightning Process Builder is to be the combined output of flow, workflow and the various overlaps. A powerful tool today, an essential business enabler tomorrow.

by Ben Duffy, Pracedo