Know Your Flow: Post-Its for Beginners

So here’s the thing. I WAS going to write a short series of blog posts on How to Get Started on Visual Workflow. It was to be a Great Work, a definitive treatise bringing clarity, insight and edification to the lay user, its sole purpose being to exist in this world as an utter personification of knowledge.

Then I saw Keith Sadler had beaten me to it.

Check out his awesome Part 1 and Part 2 blog posts over at to learn how to use Flow and get started on your very own real-world very-useful sample Flow. I’ve had some conversations with Keith, and I know first-hand that he really knows his stuff.

I LOVE Post-It Notes. I don’t use them as much as I should, due to an overwhelming and logic-disregarding need to use as little paper as possible. I mean, come on, this is the future, right? The only thing we’re missing is flying cars. Paper is soooo 2nd Century BC. Even Evernote is trying to digitize them.

Post-It Notes serve many functions, but one of the most useful ones is to serve as not just task reminders, but as impromptu cubicle posters: tiny pastel-colored mantras that remind us not just to pick up the milk, but to think or act in certain ways. An inspirational poster with your favorite motivational quote will often cost upwards of $5-10, but writing it in pen on a Post-It and sticking it on the edge of your monitor costs pennies at most, with the added bonus of taking up less space!


Many such mantras are important for Salesforce Admins, or even for working people in general. I’m sure each of us knows at least one co-worker who would have benefited from having Wheaton’s Law permanently affixed to a prominent location in their workspace. And then there are the timeless admin Rules of Being Awesome put forth by Mike Gerholdt and the other MVPs; edicts like “Always build in the sandbox first”, or “Create trust in your data”, or “Communicate all changes!” These are, and shall ever be, key to success as an admin.

As such, I have come to call mantras like these “Post-Its”. They are friendly reminders on how best to work, and when it comes to Flow, there are certain “Post-Its” that one must remember as they begin their Flow journey. These are things that are not necessarily apparent, but crucial to keep in mind as you build your first Flows.

1. It’s Like a Flowchart, But It Does Stuff

Ok, you'll probably have more branching than this. Doesn't make it any less true.

Ok, you’ll probably have more branching than this. Doesn’t make it any less true.

If you ever have trouble wrapping your head around how exactly to build your Flow, the thing to remember is that it is, at its heart, a flowchart. If you’ve ever used Visio, OmniGraffle, Diagramly, or any of the myriad of programs that allow you to drop in shapes, write text, and draw arrows, you’ve done half of the work in Visual Workflow. The difference is, each of those Visio boxes can now be set up to DO something. ANYTHING. It’s extremely powerful!

Conversely, Flow works just like those charts do. It will only do things in the order in which you set them, and it will do things EXACTLY as you tell it to. Quite honestly, it is usually a great help to FIRST write out the flow you are thinking of, on paper or even in Visio, just to wrap your head around the logic, branching, assignments, and general order of things.

2. Screens Not Necessary (Mostly)

Almost every example or sample flow that you’ll see will have a Screen in it. And for the most part, great. Awesome. Communication is good. Generally speaking, you want to talk to your users as much as possible.

But what if you really don’t need to tell the user anything?

Notice there are no Screen objects here, except for the Fault error screen. We're doing a lot here, but it's all automation. There's no need to tell the user "Job done" and make them click another Finish button when they already know what's going to happen.

Notice there are no Screen objects here, except for the Fault error screen. We’re doing a lot here, but it’s all automation. There’s no need to tell the user “Job done” and make them click another Finish button when they already know what’s going to happen.

The thing to remember is that Visual Workflow has Workflow as its base. It can do nearly everything Workflow can, except that it has to fire off of a link or button. But in that sense, it can be treated like workflow.

Workflow doesn’t tell you when it’s completed successfully, does it? It just works. The same can apply to Visual Workflow as well. If you’re completing some simple automation with your link or button and you don’t need to obtain any additional information along the way,

Now I say this, but remember, my young Padawan, that only a Sith deals in absolutes. There are exceptions to every rule. Even if you don’t need to get any information or show a Finish screen, ALWAYS put in at least one Screen as an Error message/Fault. Generally speaking, each Record Create or Record Update should go to a Fault of some kind, even if they just share one.

3. Affect as Much as You Can

Some say that Admins have a God complex. And my response to that is, of course we do. Why do you think we always capitalize the word "Admins"?

Flow is powerful, and frankly it can sometimes be easy to forget just how powerful it is. So you’ve finished that Flow that updates a Case from a custom object. Why stop there? You could update that Account field which tracks your overall Case status, make a Chatter post, send a Task to a manager to follow-up, and make a new Idea record, all with one click.

Obviously, you won’t necessarily want to go crazy with it. THE major hallmark of a solid project is a clearly-defined scope, and in any project your goal should be to stick to that scope. But thinking along these lines can help you to plan ahead of time, to (quite literally) go with the Flow. On more than one occasion, I’ve found myself listening to the request of a director or manager, and the more I think about all the different ways in which their department touches other departments, the more ways I find to connect the objects through synchronized cross-object data updates. Those connections create extra value in your system, leading to easier reporting and more complete data!

4. Install the Getting Started Pack (and filter out most of it)


On the AppExchange, you’ll find a hidden gem from Salesforce Labs called Visual Workflow Getting Started Pack. My advice: get this installed as soon as possible. Even once you do, you’ll have to sieve away a good amount of what is included to get to the gold nugget inside. That nugget is a little Apex plug-in that lets you send emails from Visual Workflow, an invaluable tool for communication in any organization that hasn’t fulled embraced Chatter or is trying to reduce Chatter clutter.

The one problem with this pack is all of the other things that come with it. There are a few other plugins that may or may not see any use, and a lot of sample plugins that, quite honestly, cease to be of any use after a certain point. Do yourself a favor and make a Flow view that filters out all the flows you no longer need.

5. Think Outside the Flow


I absolutely ADORE Flow like it was one of my children, but even the most loving parent should be aware of their loved one’s limitations. It is but one tool in the toolbox, and as powerful as it is, it’s no good at things like simple math or formula functions (e.g. LEFT, YEAR, SUBSTITUTE). You want to include the year of the created date in the name of your newly created record? Sorry chum. You want to create a Task, but you want that due date to be two weeks from the date the user specified in the Flow’s Screen questions? Good luck.

BUT there are ways of getting around those limitations. The key is to remember that Flow is but part of the Wide World of Salesforce, and it can interact with the other parts. Let’s look at the first problem: somehow parsing out just the year of the created date.

  1. Set up a workflow that fires off when this type of record is created. Make it perform a Field Update that does the concatenation onto the record name, pulling whatever naming data you need. You can easily do the YEAR method on the CreatedDate as part of your Field Update; it’ll calculate it on the fly for you.
  2. If a user creates the record manually, you can still have this apply. Just be sure to tell your users that the Name field will be filled in automatically, but because it’s a universally-required field (being a Name field core to all Salesforce objects), they’ll have to put something in before hitting Save. Anything will do. Hit the letter A and call it good. It’ll just get overwritten by your Workflow, as it should!
  3. If you need it to only do this update on records created by the Flow, create a new checkbox field (not on any page layout, your users don’t need to be able to mess with this one!) called Generated by Flow. Have the Flow mark this as True when it runs, and edit the Workflow rule so that it only goes off when Generated by Flow is True.

See? We’ve combined Workflow and Flow seamlessly. Now let’s look at the other problem: adding days to a date specified during the Flow.

  1. Get the date from the user in a Screen. Simple enough.
  2. Immediately do a Record Update after the Screen, pushing the entered date into a new field. (Again, you can simply not put this on a page layout, if users don’t need to see it and you don’t want them tinkering with it after the fact.)
  3. Here, you can go two different ways. You could A) make Workflow that created a Task and added the time as needed, or B) create a new formula field that simply does the addition of the days to that given date.
  4. Make a Record Lookup to pull that formula field back into your flow, and make your Task as needed! (Remember that Tasks created with Flow can be assigned to a dynamically-determined user, rather than being stuck on a single name like Workflow does.)

Because Flow runs in order and doesn’t have to finish to do its work, your data can hop in and out of Flow! Anything that you can’t do in Flow, you can pass outside to the tools that CAN. Then pass it back and it’s like automagic!

The key in all of this is to make Flow work for you. The possibilities are nearly endless, and often it’s just a matter of figuring out the right path. Unless you’re talking about firing Flow without a button or link, don’t EVER let yourself think that something can’t be done in Flow!

P.S. Document and Communicate Like Your Life Depends On It!

OH one more thing! As a good admin, what should you do every time you release new functionality or replace old functionality? And when you release a new Flow, aren’t you usually releasing new functionality or replacing old?

The same thing applies here. ALWAYS document your new Flow, distribute that documentation to all relevant users, and do training/Q&A sessions to ensure that your users are properly able to use what you’ve given them. I’m not always the best at this, like a lot of admins, but I can tell you firsthand that the surest way to letting your users believe that you just sit and twiddle your thumbs all the ding-dong day is to not tell them what you HAVE done. Plus, you’ll alleviate the eventual head-hit-desk migraine and drive-to-drink, that you’ll undoubtedly encounter when you find that they’re using your carefully-crafted  tool in entirely the wrong way.

5 comments on “Know Your Flow: Post-Its for Beginners

  1. Nice blog post, very informative, thank you 🙂

    Was wondering if it was possible to use Flows to create a wizard that would assist me in setting new users up?

    What I am thinking is the Flow steps me through capturing the name, email, division etc for a new user. Prompts me to select a license type, profile and role. Then put it in a date for when they start. When that date is reached the user is then created automatically.

    I have tried to coming up with something like this but I am very new to Flows and can’t quite figure out if it’s possible, let alone manage to do it!

    • I would say a tentative “yes”, except for one specific part.

      I say tentative, because there is that tendency Salesforce has of leading one to believe that it really ought to be able to do something, and then you get into it and find out that for some arbitrary reason, it’s actually not possible and there is no workaround. Can’t tell you how many times I’ve hit my head against that particular brick in the wall.

      But in terms of creating the User, this is theoretically possible. I know we planned on trying to build this functionality, and never found the time to get into the discovery phases of determining feasibility. I would use a single Screen to capture as much information as possible, and the User could be created from that. However, if this is all you are doing, it’s not really saving any more time and effort compared to just making the user. In fact, you’d have additional effort because creating the User via Flow would not send out the password email to the User. For our company, it was worth the exploration because every new user setup requires a lot of additional work, like creating a contact, custom object records, sending out emails, and enrolling them in the appropriate Chatter groups. If you’re looking to do more than just create the User, by all means, Flow it up!

      The one part of this that wouldn’t be possible is the time delay. Flow can’t do time delays yet; for now, it can only take actions when that custom button or link is clicked.

  2. Really informative post! Helped me understand how flows work better and even got me to jump in to stringing decisions together which I couldn’t quite figure out before. Only problem is now that I still don’t seem to have a great handle on it… since they are not branching the way I designed them..

    Basically I am filtering decisions based on three different types… let’s call them A, B and C and each of those have 2 variations… so the decision is set up like this…

    Is it A1?
    If no, is it A2?
    if no, is it B1?
    If no, is it B2?
    if no, is it C1?
    if no, is it C2?

    Only problem is whenever I try to run the flow, and select any of the choices…. I only get the A1 screen… even though I have the “true” outcomes set to point to the appropriate screen for each decision.

    Wish there were more documentation around on this. Is there something obvious I’m missing? Can you tell?

    • Hard to say without looking at it, to be honest… But I can offer this, at least:
      You should be able to fit all of your “Is it” questions into a single Decision element. One Decision box can branch out into multiple possible outcomes, and they will evaluate in the order they’re listed in, in the sidebar. Having a single Decision element will be a lot easier to manage and work with than 6!
      Also, I wouldn’t think of them like A1 is related to A2. Just think of each out as a separate possibility.
      If you have any more questions, let me know; I can help with a screenshare or something if you’re stuck.

      • Thank you! I actually didn’t have them in a single Decision element… so I am restructuring the flow with your suggestions. Thanks for your direction and I’ll let you know if I am still stuck afterwards! 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s