A few readers were curious to know more about yesterday’s email regarding Building flows: go down or go across

Here are a few additional comments.

I generally start all flows using the vertical style. It feels like flows were designed to be used in this way, and it’s usually easy to follow the logic.

However whenever the flow logic seems to “reset” or need multiple attempts at achieving something, then I consider alternatives.

One alternative is to use subflows. These are usually considered when the logic in the subflow may be used elsewhere, or when something logically different happens. For example, after creating a contact, email the contact. It may make sense to place the email logic in a subflow.

Another alternative is to change the flow style to be horizontal. This style seems to favor quicker changes to the order of things, as well as adding (or removing) attempts.

For example, if you attempt to find a contact in the following order

  1. Email address
  2. First and last name
  3. Last name and birthdate

And want to change it to the following order

  1. Last name and birthdate
  2. First and last name
  3. Email address

Then it’s just a matter of rearranging the outcome order in the decision element. BTW, here’s what the decision element looks like with 5 attempts.

And the first element after each decision outcome is to add 1 to the Attempt variable.

The takeaway
Horizontally-styled flows help quickly identify and add/change the outcome order.

Category:
Salesforce