Send Quote Flow to Quote Line Item Flow – Learning Flow 4.A

This is part 4.A of the Learning Flow series, how to send Users to the Quote Line Item Flow from the Quote Entry Flow.  To start, open the Quote Entry Flow.

In the Palette, navigate to the FLOWS section.

Quote Entry Palette Flows Section

Click on the Quote Line Item Flow and drag it below the fcQuote Fast Create Element.  For the Name and Unique Name enter sfQLI for Sub-Flow Quote Line Item.  Since the Quote Line Item Flow is expecting the sovQuote sObject Variable, in the Target, click the drop down arrow, then click the arrow next to SOBJECT VARIABLES, then select sovQuote.  In the Source section, click the drop down arrow, then SOBJECT VARIABLES, then select sovQuote.

Quote Entry Flow To Quote Line Item Entry Sub Flow

Click 0n the Outputs section.  Click the trashcan to the right side, you won’t need to send any information back from the Quote Line Item Flow.

Quote Entry Flow Delete Line To Quote Line Item Entry

Click OK at the bottom.  Connect the fcQuote Fast Create Element to the sfQLI Quote Line Item Element.

Quote Entry Flow fcQuote To sfQLI

Save the Flow!

Quote Entry Flow v5

That’s it!  Congratulations!  You have sent your users from the Quote Entry Flow to the Quote Line Item Flow to create Quote Line Items!

Create Approval Process in the Approval Process Flow – Learning Flow 3.B

With the Step Elements entered, it’s time to create the actual Flow.  Open the QLI Approval Process Flow.

Click on the Resources Tab in the left section and double click on SObject Variable.  Enter sovQLI as the Unique Name, the Input/Output Type as Input and Output, and the Object Type as QuoteLineItem.

Approval Process sovQLI

Click OK.  Click on Resources again and then double click on Formula.  For the Unique Name, enter fDiscount, Value Data Type as Number, Scale as 2, and the Formula should be, “{!sovQLI.UnitPrice}/{!sovQLI.List_Price__c}”.

Approval Process Discount Formula

Click OK.

You might be wondering, I see a {!sovQLI.ListPrice}.  Although this is true, since you are looking at the Quote Line Item before it is created, the {!sovQLI.ListPrice} hasn’t been entered yet.  It is also a field that is part of the Product.ListPrice, so it doesn’t translate very well with Flows.  Since you created the List_Price field earlier and assigned the List Price of the Price Book Entry, this does two things for you.  First (and most importantly), you can use the List_Price field in this Flow.  Second, it saves the history of the List Price, so if the List Price changes in the future, you’ll know what the List Price of the Quote Line Item was at the time of creation. Continue reading

Planning the Approval Process Visually – Learning Flow 3.A

Planning a Flow is a very important piece of creating Flows.  So far, you’ve been learning from what the posts tell you to do.  What about new Flows where you need to plan out a process?  Well, the Step Element will allow you to plan out your Flows!  You can’t activate a Flow with a Step element, but it will allow you to plan it out to make sure you are entering all the Flow steps needed to create a successful Flow!

Open the Quote Line Item Flow.  From the Palette, click on the Step Element in the Draft Tools section.  Drag it to the left of the aQRU Assignment Element.  Enter the Name and Unique Name as sAP for Step Approval Process.  Enter in the Description, This step will loop through the Quote Line Items to be able to see what level of Approval is Needed.

Quote Line Item sAP

Click OK.  Click on the Step Element in the Palette again and drag it above the sAP Step Element.  For the Name and Unique Name enter sAAP for Step Assign Approval Process.  For the Description enter, This will assign the proper approval on the Quote for Approval Processes. Continue reading

Create Quote Line Items, Update Quote – Learning Flow 2.C

Part 2.C of the Learning Flow series will allow you to create the Quote Line Items and Update the Quote.  To start, open the Quote Line Item Flow.

From the Palette, click 0n Fast Create and drag it to the right of the aQRU Assignment Element.  Enter the Name and Unique Name as fcQLI, for Fast Create Line Item, and set the Variable as socvQLI.

Quote Line Item Flow fcQLI

Click OK.  Connect the aQRU Assignment Element to the fcQLI Fast Create Element. Continue reading

Loop Through a Collection Variable and Create a Roll Up Summary – Learning Flow 2.B

Welcome to part 2.B of the Learning Flow series where you’ll learn how to loop through a collection variable and create a roll up summary.  As part of the Learning Flow series, this post adds on to 2.A taking you through the Quote Line Item part of a Flow to help your Users build a Quote.

For this section, the business has requested that the Quote store the total number of items purchased.  You have two products, one that is sold in cases, with 12 items per case, and one that is sold in packs, with 3 items per pack.  A typical role up summary isn’t available since the quantity doesn’t include the number of units and the number of units doesn’t include the quantity calculation.  Here is a mathematical view.

Product X – Sold by the case – 12 Items per case

Product Y – Sold by the pack – 3 Items per pack

Order A: quantity 5 of Product X, quantity 3 of Product Y

A roll up summary of Quantity would be 8 and Items would be 15.  Now, you could create a new field on the Product Line Item, total units, and have that roll up to the Quote in another field, total units.  Although that’s possible, imagine that the company is out of Roll Up fields for the Quote object.  Flows to the rescue!

Continue reading

Create Line Items Using Flow – Learning Flow 2.A

This is the first post in the second part of the Learning Flow series.  In this part of the Learning Flow series, you’ll learn how to add Line Items using Pricebooks.  Although this will eventually tie to Quotes as part of the Learning Flow series, it also applies to Opportunity Products (Line Items) and Order Products (Line Items).  You’ve already shown the Pricebooks to your Users in the Quote Entry Flow, so now you’ll need to display the Products in the Pricebook for your Users to select.

There are a few things you need to do before creating the Quote Line Item Flow.  Go to the Setup menu, then in the search bar enter Critical Updates and click on Critical Updates.  There are two Critical Updates that you need to Activate.  The first is the one that says Flow Creators Receive Email for Each Unhandled Fault (so you get notified on faults!) and the second is Behavior Change for Default Values in Flow Screen Fields.  The behavior change is very important as you’ll see later.  Click Activate next to both of them.

Flow Critical Updates

Now, it’s time to create the Quote Line Item Flow!  First, go to Setup, Flows, create a New Flow.  Click on Resources, then double click SObject Variable.  Enter the Unique Name as sovQuote, Input/Output Type as Input and Output, and Object Type as Quote.  This SOject Variable allows you to pass the information from the Quote Entry Flow (you’ll set it up later) as well as update Quote fields as needed.

Continue reading

Add a New Quote Button – Learning Flow 1.E

Creating Flows are great, but if your Users can’t get to them, they don’t help too much…  It’s time to create a button to allow your Users to launch the Flow!

Start by capturing the Flow details.  In the Learning Flow series, you should have created a Flow with a Unique Name of Quote_Entry and the URL should be /flow/Quote_Entry.  You can get to the Flow details by searching Flows in the Setup search bar and clicking on the Flow you are looking for the details about.

Quote Entry Flow Detail Page

Now, there are a few ways to be able to create a button.  One way, using the Flow URL, can be found in the post, Update a Record Through a Button and Salesforce Flow.  The other way is through a Visualforce page.  I know, you’re expecting to learn about Flows here.  There is a lot of power by being able to use a Visualforce page to start a Flow instead of using the URL.  You’ll start with a basic Visualforce page in this post and in future posts, you’ll learn how to enhance the page to continue to improve your business processes and customize it for your business.

Continue reading

ERROR!!! Learn How to Work With Flow Faults – Learning Flow 1.D

Perhaps you have written a Flow and have seen this cryptic message.

Flow Unhandled Fault

NO!!!  What happened!?  Does your User know something went wrong?  Where did this come from?  This post, part 1.D of the Learning Flow series, will help you learn how to get better error message handling for both your Users and your Admins.

From my experience with Flows, a lot of Flows are based around the User, such as the Quote to Contract system you’re building as part of Learning Flow.  This means that Users want a resolution quickly, they are doing something and would like to complete that task immediately.  This means that quick notifications are very important, ones that will just work and won’t possibly have different issues themselves.  It’s time to get started. Continue reading

Require Fields on Other Objects to be Filled Out in Order to Create a Record (Quote) – Learning Flow 1.C

No one likes dirty data, there are lots of tools out there to help dedupe leads, accounts, etc.  But what about if a field isn’t filled out.  Well, there are required fields, and validation rules, but what if that doesn’t work when creating a record since a User doesn’t know that information until later, but you would like to have that information required before creating a related record?  Enter Flows to the rescue!  That’s right, you read it correctly, require fields on other Objects in order to create a new related Object, all with point and click!  For this lesson, part 1.C of the Learning Flow series, you’ve been given a request from Management, before anyone can Quote a customer, it is required that a Billing Address is filled in on the Account and that there is a phone number listed so that Finance can reach the person/company and send an invoice.  For the Billing Address, the requirement is that every Billing Address has a street, city, country, zip, and if the country is US, USA, United States, or United States of America, there should be a State as well.  (State and Country pick lists have not been turned on in this example, but if you have them turned on in your Org, you can do this with them as well!)  It’s time to get started! Continue reading

Find Related Records and Have Users Select Them in a Screen – Learning Flow 1.B

This blog post was originally called, “Add in a Price Book selection in the input Screen”.  That title doesn’t do justice for Dynamic Choices, so the title has been updated to, “Find Related Records and Have Users Select Them in a Screen”.  The goal with this post is to understand how Flows can be related to different records and be able to select records through a pick list of dynamic choices.  This means that you are able to connect and update records beyond the record the User is working on as well as let Users pick which records they want to associate or update.  That is powerful stuff!  You’ll learn more about the full power of Flows and updating related records as you continue to learn through the Learning Flow series, but this post will be focused on finding those related records and allowing Users to select them.  Time to get started!

Open up the Flow that you created in Create an Input Screen for Users, Assign Variables, and Create a Quote – Learning Flow 1.A.  The business liked your original Flow but would like for users to be able to add a Contact from the Account into the Quote so the business knows who the Quote is for as well as have Users select a Price Book based on security restrictions.  To start, you’ll need to find the Account Id.  With your Flow open, drag a Fast Lookup element onto the Canvas to the right above the Quote Entry Screen.  Name this Fast Lookup element flOpportunity, which stands for Fast Lookup Opportunity, for both the Name and Unique Name.  In the Filters and Assignments section below, Look up Opportunity.  When you do, that, you’ll see more fields pop up for you to fill out.

Quote Entry Flow Fast Lookup Opportunity

In the Look up section for Opportunity, under field, find Id.  Set the Operator to equals and the Value to vOId, the variable of Opportunity Id that you created previously.   Continue reading