In this post, I am going to explain the new Flow features introduced by Salesforce in Summer’17.


Add Flow into Record Detail Pages:
With Summer’17 Salesforce release, now you can add flows into any Lightning Pages. You need to add the Flow component to your Lightning pages. This feature was introduced by Salesforce in Winter’17 release as a beta functionality, and in Summer’17 this is now Generally Available.

In this section, I am going to explain how you can add flow into record details page through Lightning App Builder.

Let’s first create a flow which needs a parameter which is basically the record Id. The intention is that when we will add this flow into the record detail page, we will pass the record Id to flow and then flow will fetch necessary information from the record and prepare its own view.
So here is the flow –

Flow Name: Survey Customer
This flow is having one input variable – “recordId” which will store the Salesforce Record Id passed from record detail page.

With this variable, the flow will query the Salesforce Contact Record, fetch Contact’s First Name and Last Name and generate the customized Welcome Message. I am not going to show how Flow is configured because the intention of this post is to demonstrate how to use the flow inside Lightning Experience.
Here is the final view of the flow –


Now, will come the fun part. Let’s say we wanted to display this message in Contact Detail Page. What we need to do is – Open the contact detail page and then click on the Edit Page option from Top Right.
This will open the Contact Detail page in Lightning App Builder – 

From the left section, select the Flow Component under Standard and drag it under Activity Section at the button.
Now select the Flow component, and you will see the configuration panel at right next to it. This is the place where you will select your flow and also the parameters you will pass to the flow. See the animation below –
And that’s all. Now the contact details page will look like –

Enjoy Flow in Lightning. Please provide your feedback.