I have a process that launches when an opportunity is created or updated that then launches a visual workflow. This particular workflow, I have the process builder sending in variables from the opportunity. In previous flows, I might have started it with a lookup to gather those variables.

I'm not really sure of how the code worked in the back end, but I'm wondering which of these routes is "better". What are the pros and cons to sending variables into a flow via a process builder vs having a lookup at the beginning of the flow to the record being updated?

1 Answer 1


There's only one meaningful difference: a single query and query row. They both will take about the same amount of memory, cpu time, view state size, etc. The only savings you get by removing the original lookup is a very minor savings on governor limits (<1%). Unless you need to need to get that last bit of performance, use whatever means you prefer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .