Skip to main content

Helping reps adjust line-item prices

Our Salesforce org doesn't allow reps to enter a unit sales price directly. Rather, reps can only apply a discount to the list price. There are some solid reasons for this, most notably that we want to know what discounts are being applied, and greater discounts may require different approvals (higher discounts might go all the way to the CFO and CEO for approval).

But a couple of problems result from this restriction:
1) Sometimes a rep may want to sell (or at least quote) above list price, and Salesforce doesn't allow a negative discount.
2) The discount percent allows just two decimal places, so we can't always get to exactly the price we want (try discounting from $350 to $200 !).
3) Even when it is possible to discount to the exact price, the calculation isn't always easy for my reps. So we often had prices in the CRM that didn't match what the rep had expressed to the prospect. Or maybe I would get a call to adjust the pricing.

My workaround: A flow! It's pretty simple, really. It's invoked by a button on the Opportunity Line Item or Quote Line Item detail page (so really it's two different flows, though they operate identically), and the line item id is passed as an input to the flow.

The flow has just one screen, and requests one input: the desired unit price (after the discount).

The next step for the flow is to look up the list price using the line item id that was passed in.

Now a decision... Is the desired price equal to or greater than the list price? If so, I update the sales price to the desired price, with a discount of 0, and I'm done. If not, I first calculate the discount: 100 * ((list price - desired price) / (list price). Round that to two decimal places. There's still a potential problem... Because of the rounding, when Salesforce calculates the Total Price, I might still be off by a little. So I calculate the sales price as 100 * (target price)/(100 - discount). Update the sales price and discount with these calculated values, and we're done.

Let's make this concrete using the earlier example, with a list price of $350 and a desired price of $200. The discount: 100 * (350 - 200) / 350 = 42.85714. Round that to two decimal places, so 42.86. Use that to calculate the sales price: 100 * 200 / (100 - 42.86) = 350.02.

I used to pull out the calculator when a rep called asking me to adjust pricing. So now I have a button to do my job ;)

This accomplished a couple of things: Self-service for the reps, fewer interruptions for me, and greater visibility on discounting.

One caveat.. If your quantity is greater that one, the Total Price still might not be exactly what you want. In the example above, if the quantity is 100, the Total Price comes out to  $20,000.14, not the $20,000 you expect. That's because Salesforce doesn't round the quantity-one price and then multiply by the quantity. Rather it multiplies Sales Price by Quantity, applies the discount, and then rounds. There are two possibilities here; neither is automated. One method is to open a spreadsheet and find a different sales price / discount combination; $348.25 with a 42.57% discount works fine. The other approach is to put quantity 99 on one line item and use this flow to adjust the price as above. I find that the total price for quantity 99 is $19800.14. So I add another line item with quantity one, and use the flow to set the target price to $199.86 to reach my combined total price of exactly $20,000.

Comments

Popular posts from this blog

Salesforce Pipeline Reporting - part 1 of 3

In a dozen (plus) years working with Salesforce, I've never been entirely happy with the built in reporting of my opportunity pipeline. I can export details, or a printed (formatted) view, but I lose the interactivity. I can use a dashboard, which is better now in Lightning in that I can see a lot more fields in a table component. But flexible views require filtered dashboards, and just maintaining the filter values (if they go down to a rep level) can be onerous. Plus applying (or removing) a filter tests my (very limited) patience. So I've typically exported the report details into Excel, and there created a workbook that includes (1) summary info, (2) scrollable deal lists with hyperlinks back to the opportunity records in Salesforce and (3) filters that let me instantly switch views, say among teams, reps, opportunity types, or fiscal periods. My process around this involved LOTS of VBA and LOTS of formulas. Lately, I've (finally) gotten turned on to slicers in Exc...

Using Excel with Salesforce: One tool, two tips

Obviously, Salesforce has strong built-in reporting tools. And I'm a big fan of the dashboards, especially filtered dashboards and dynamic dashboards. WAY better than the old approach of creating a unique set of reports and a corresponding dashboard for every conceivable view. Still, I often want to pull my Salesforce data into Excel. This might be for further manipulation / processing, aggregating data that doesn't live in Salesforce, or distribution to non-Salesforce users (hey, those licenses are expensive!). Reporting Tool - XL-Connector: I'm using a new (to me) tool when I have to repeatedly pull Salesforce data into Excel: XL-Connector  (fka Enabler 4 Excel) from Xappex. There's a lot you can do with XL-Connector. My primary use is just to extract data from Salesforce, and this can be done in two ways: reports or SOQL queries. The great part is that once you've captured data into an Excel file, refreshing the data is trivial. I've stored my credential...

Salesforce reporting: XL-Connector and VBA

In an earlier post , I mentioned a tool I'm using to import Salesforce data - via SOQL or existing reports - into Excel. This post is more about using that tool, XL-Connector from Xappex . Here, I'll walk through the (simple) process of importing and refreshing a report, and I'll provide a simple VBA macro to automate the refresh. In a future post, I'll expand on that macro to show a friendly view of my opportunity pipeline and a single-page view of how each of my sales reps are doing against a series of KPIs. Importing a report is simple enough. From the XL-Connector tab, select Log In and enter your credentials. I'm using the old id and password (as opposed to SSO), so I provide that along with my 'token'.  (Don't remember your token? Log in to Salesforce via your browser, click on your photo, select Settings, then 'reset my security token'.) Once you're logged in the lock turns green. Back in Excel, on the XL-Connector tab, select ...