Learning Flows – Preface

My goal for the Learning Flows series is to help show how simple Flow can be and to provide you an easy place to reference and learn about everything Flow.

Thinking back to my my first Dreamforce in 2013, when I saw Mike Gerholdt and Jared Miller present on using Visual Flow for the standard Call Center scenario (what Visual Flow was originally designed for).  Later in the week I attended a session on the pilot for (what Salesforce called at that time) “Headless Flows”.  This is now what we refer to as Autolaunched Flows.

Those experiences got me excited for the possibilities that would soon be available to me, and I was determined to dive into Flow when I got back home.  I decided to build my first Flow.  I remember trying to troubleshoot why my Flow didn’t work, but there were hardly any resources out there to explain it to someone learning Flow.  And, I gave up.

Eventually another use-case came up that I thought Flow might solve, and I gave it another try.  Luckily, this time it clicked and I got my Flow to work!  I was hooked.

My goal is that after walking through these steps in the Learning Flows series you will be able to master Flow and take your Admin/Developer skills to the next level.

Have Community Users agree to Terms & Conditions using a Login Flow

Your company just decided that they are going to purchase a Salesforce Community!  You are bursting at the seams to to get going and make an amazing Community.  You just got an email from your favorite department (legal) and they mentioned that everyone who logs in to the Community must first accept your company’s Terms & Conditions.  Also, if the Terms & Conditions change that Users will have to accept them again.  Oh boy.  How can we do this?  Well, as of Winter ’15 Salesforce has added a great tool called Login Flows. Now you can do this with just a few clicks! Continue reading

How to use the Wait element

Lets go over one of my least used elements!  The Wait!  The real reason that I never use this, is because there is never really a great need for it on many of my projects.  It is important to note that a Wait element can only be used in Autolaunched Flows (a Flow with NO screens or dynamic choice elements).  To me a Wait element is simply a Time-Dependent Workflow Action snapped into a Flow.  You are able to setup different Event criteria and send the record to different elements based on the Event that it meets.  This works very similarly to how the Decision element work. Continue reading

How to use a Loop

The Loop element gives you the ability to choose the SObject Collection we want to pass through a series of elements.  You have the ability to choose how you loop the collection of records, either in Ascending or Descending order.  Also, you get to select a SObject Variable to be referenced in your Loop.  This is referred to as a Loop Variable.  

It is important to note that the Loop Variable  and the Collection referenced in your Loop must have the same object type.  You can’t have your Collection containing Account records and a Loop Variable being of the type Contact.

One last warning!  If you plan on doing a Record Create/Lookup/Update in a Loop, be careful – you could potentially hit some limits if you have too many records in your Loop!! Continue reading

How to use an Assignment

The Assignment element is a simple yet confusing element.  To be honest, this is one that always tripped me up.  The easiest way for me to remember what an Assignment is, is to compare it to a Field Update.  They have nearly the exact same functionality.  Assignments are extremely valuable when you are doing any sort of calculations on a variable in your Flow.  If you are using this with a Visual Flow then you could have a variable change based on the User’s selections in the Flow. You could also use this similarly to a Field Update based on different decisions and set the variable to a certain value.  Also, you could have a query of records add to a variable their Amounts.  Often people overlook that this can be used on non-numeric fields like checkboxes, picklists, and text fields.  Knowing that can allow you to really customize your Flow to be very dynamic.

Continue reading

How to use a Decision element

Lets go over one of my favorite elements!  The Decision!  This element really lets you make any Flow go to the next level.  By truly understanding and mastering the Decision element, you can really open up a world of possibilities!  I assume that most of you have had some experience writing formulas in both Salesforce and Excel.  The Decision element is simply a big IF statement for your Flow!  As of Spring 15, you can now even add in Advanced Logic to your Decision!!  This was a much needed improvement that will only make using the Decision element even easier to use.

Continue reading

Roll-Up Summary for Account Fields (Part 2)

Part 2 to: Roll-Up Summary for Account Fields (Part 1)

Flow #2 Breakdown

We are going to create a Flow that will find if the parent account.  If the Account has a ParentId, we want to then query all of the accounts under that Parent and summarize the Amount of Chicken sold for each child.  After we summarize that data, we will then update the Parent Account with the new value.  This will allow us to update all levels of a hierarchy on an Account with one simple Flow, because this Flow will keep being triggered until it reaches the Parent Account. Continue reading

Roll-Up Summary for Account Fields (Part 1)

You are hit with some tough demands from someone inside your organization. They want to be able to click on an Account and see the dollar amount of widgets their clients have sold, and be able to see that value on each level of the hierarchy.  Well, this throws Roll-Up Summary fields out the window!  Unfortunately they do not want to use a report to do this, so we need to create an Autolaunched Flow to calculate this for them. Continue reading