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.
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}”.
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