Have you ever wanted to not just update a field, or send an email, but update, create and even delete a record, or multiple records, whether related or not, and do this auto-magically? If you’re a Salesforce Consultant or Admin, and you haven’t tried Flow, you really should. It's a fantastic tool to have in your toolkit, for those moments when you don’t want to bother your dev team (or don’t have a dev team), or you just want to solve that tricky problem yourself (it's always satisfying to get something working).

Salesforce automation has come a long way since the early days when I first started about 7 or 8 years ago, when it was workflows and approval processes. Now with Flow (and Process Builder) so much more is possible with no code! This has enable consultants and admins to help businesses even more to save time and reduce cost, all at their fingertips.

For those who haven’t played with Flow, there is a bit of a learning curve to this, but once you understand it, it is so rewarding and powerful. This is not a blog which will go through step by step how Flow works, but there are a great number of blogs for that, like this one from ButtonClick Admin. For this article, I wanted to get you thinking about the possibilities of Flow, work through an example, and provide tips I have picked up along the way.

Imagine the following scenarios

So what is possible?

  • Your team manually completes a series of activities when a customer submits a form, or when they complete a report. Automating parts or all of a business process is possible with Flow. Have a look at the example below.
  • The ability to perform a deep clone. Salesforce standard clone functionality only clones the parent object, but not child object.

  • Send a “thank you” email to the primary contact on an opportunity contact role when the deal is done. Flow and Process Builder can do this, or just Flow if it is a button click/user initiated email.

Let’s go through an example

An Air Conditioner manufacturer (or Universal Containers, whatever you like) provides a website to customers to register their purchase after installation for warranty purposes. The webform directly integrates to Salesforce passing this data captured into a Salesforce Custom Object. The manufacturer wants to enhance their current manual process once this information hits Salesforce, where a Customer Service Agent performs the following:

  1. Reviews each registration record

  2. Manually matches the customer based on email address

  3. Creates an asset capturing air conditioner unit sold

  4. Create a future dated opportunity to sell a replacement filter

  5. Create a follow up tasks in a year’s time to check how the product is working. (where is this level of customer service for the stuff I buy?)

Flow process map.jpg

So what does this look like using Flow:

Let’s break this down:

Section 1 looks like the start of most flows, looking up the relevant records, and assigning key information to variables which will be used later on in the flow

Section 2 checks existing Contact records against the email provided by the customer through the registration form. If there is a match, the user will be provided with a drop down list of matched contacts to select from.  If there were no matches, a new set of customer records can be created.

Note:

  • The Dynamic Record Choice resource is used to display on the screen references a field, so it's recommended to use a formula field which concatenates key information, e.g. <Name> <Mobile> <Mailing State> or whatever makes sense to the end users

  • I've modelled here the creation of an account and contact. This can work also with Person Accounts.

Section 3 allows the user to select from a list of replacement consumable products associated to the registered product. Depending on the customer’s requirement and how this relationships is structured, this step may look slightly different, but for the purposes of this example, I have the consumable products looking up to the main product (through a Lookup field).

The selection process here is similar to that of the contact selection in Section 2.

Section 4 is where all the records are created. Dependent on whether there is a consumable replacement product for the customer’s registered product, then the opportunity and relevant line items are created. The asset and “follow up” tasks are also created regardless of product purchased.

Note:

  • Depending on the product, you can assign a replacement period (in days) on the product level and use this to drive the future dated opportunity

Automating a business process ensures consistency in how your customers are responded to, actions/activities are set with the appropriate business rules and trackable, and of course, less work for your staff so they can concentrate on things that really matter, not just data entry.

Some tips!

These are some things I've picked up along the way.

  • If your flow is user initiated include a screen to show any errors/faults using the {!$Flow.FaultMessage}. Also have a look at the help & training article on customising your email alerts for error messages

  • Since its introduction sObject variables are a great way to store all “fields” of a record instead of creating variables for each

  • Deployment of Flow is easy and done through change sets. Don’t forget to include any other customisations (like custom formula fields or email alerts) you have created to support the Flow

  • If I can’t remember what fields are mandatory when creating a record, I go back to the standard UI, create a record and note the mandatory fields. Don’t forget validation rules too.

  • Use Flow together with Process Builder to launch Flows automatically without user interaction. Just remember to set the Flow Type to Autolaunch Flow.

  • Put some level of detail into how you label components in Flow, especially variables. For example, if you are going to have 2 products records throughout your flow, label one varRegisteredProduct and one varConsumableProduct

Hope you found that useful. It is the new year and if you are not familiar with Flow, do check it out. There is a great trail on Trailhead (WOOT Trailhead) to get you started.  

What business challenges have you solved with Flow? And what are your tips for Flow? Post any comments or questions below.

Lapman is an experienced consultant with over 8 years of Salesforce.com delivery and business consulting experience. He has hands-on experience throughout the end to end project lifecycle, loves working with the business and focuses on solving their business challenges.


1 Comment | |

Subscribe to our mailing list