Top-Down Pricing Overview
Top-down pricing enables a pricing method to set a single total on a parent record and share that total down to the role requests beneath it. You set up top-down pricing by selecting the Spread Down pricing approach. You use it when you price work as a whole rather than role by role, for example when a fixed total for an estimate product must be apportioned across the roles that deliver it.
A pricing method's Pricing Approach field controls the direction in which it calculates. Pricing variables define the formula that produces the amount. For more information, see Estimate Pricing Variable Overview.
Roll Up and Spread Down
Every estimate pricing method uses one of two pricing approaches:
- Roll Up calculates a bill amount on each role request, and the estimate roll-up aggregates those amounts upward through tasks, line sets, and estimate products. This is how pricing variables have always worked.
- Spread Down calculates a single total on the priced parent record, and that total is shared down to the role requests beneath it.
Roll Up is the default. An estimate pricing method that specifies an Apex plugin class must use Roll Up, because top-down distribution applies only to formula-driven methods.
Where You Can Select a Spread Down Method
Two checkboxes on the estimate pricing method control the records that the method can be selected on:
- Selectable on Estimate Product Instance makes the method available on estimate products and estimate product instances.
- Selectable on Independent Records makes the method available on an estimate's Independent Estimate Pricing Method field, which prices the records that are independent of estimate products.
You must select at least one of these options. A Roll Up method can be selectable on both record types. A Spread Down method can be selectable on only one, so that the record it prices and the object its formula is written against are unambiguous.
These options filter the pricing methods offered to users. A method appears in a lookup, in the Estimate Builder, in Manage Products, and on the Pricing tab only where you have made it selectable. If a method that is inactive or not selectable on a record is applied another way, such as by a data import, the save is rejected with one of the following messages:
- On an estimate product or estimate product instance: "The selected estimate pricing method is inactive or is not selectable on estimate product instances. Select a valid pricing method and try again."
- On an estimate: "The selected estimate pricing method is inactive or is not selectable on records independent of estimate products. Select a valid pricing method and try again."
How a Total Is Shared Down
When an estimate is priced, a Spread Down method's formula is evaluated once for each priced parent record to produce a single total. That total is then shared across the role requests beneath the parent in proportion to their hours, weighted by headcount. Where a parent has no hours to share by, the total is shared by headcount instead.
The shares are rounded so that they always add up to exactly the total, even when a large estimate is priced across several asynchronous jobs.
A task or line set beneath the priced parent receives the sum of the shares of its own role requests. A grouping that contains no role requests receives zero, because there are no hours to share, and a total of zero shares as zero to every role request.
Configuring a Spread Down Pricing Method
The following rules apply when you save an estimate pricing method. For the steps to create one, see Creating an Estimate Pricing Method.
- A method must be selectable on at least one type of record.
- A Spread Down method can be selectable on only one type of record.
- You cannot change the pricing approach of a method that has pricing variables.
- You cannot change where a Spread Down method is selectable while it has pricing variables.
- You cannot remove a Selectable On option while an estimate, estimate product, or estimate product instance uses the method.
Authoring a Spread Down Formula
A Spread Down formula is written against the object that the method is selectable on, rather than against the role request. The Add Field window offers the fields of that object and its related records, so a method selectable on estimate product instances offers estimate product instance fields, and a method selectable on independent records offers estimate fields.
A formula cannot reference the bill amount that it produces, or any field calculated from that bill amount. Such a formula could never settle on a value. If you reference one of these fields, you cannot save the pricing variable. For more information, see Estimate Pricing Variable Overview.
Reading Roll-Up Totals in a Formula
A pricing method reads the hours, cost, and custom roll-up totals that the current calculation produced. This matters for a Spread Down method, because a formula that apportions a total usually divides by one of those totals. Previously, a formula or an Apex pricing plugin that referenced a total on a parent record read the value left behind by the previous save. On the first roll-up of a new estimate those totals were zero, and on later roll-ups they were one cycle out of date, with no error raised.
Two limits still apply to the values a pricing method reads from a parent record:
- Salesforce formula fields on the parent records are not recalculated. They hold the values from the last save. An Apex pricing plugin that needs a formula field recalculated must do so itself, on the records it is given.
- A custom roll-up rule that reads a parent record through a formula also reads the value from the last save, because a formula that reaches a parent is always evaluated against the parent as it was last saved. A rule that reads fields on its own record is unaffected. For more information, see Custom Rollup Rules Overview.
Spread Down Pricing in the Estimate Builder
Spread Down pricing runs live in the Estimate Builder, so the grid shows the amounts that a save settles, including for a parent record that you have not saved yet. Pricing recalculates when you change a field that the formula references.
The Estimate Builder reproduces labour cost totals live so that a formula can read them, converting an estimate product's cost into the estimate currency. The following four cost totals are not reproduced live, and a formula that reads one of them prices from the last save:
- Cost and Cost Amount (Independent Records) on the estimate
- Cost Amount and Cost Amount (Estimate Currency) on the estimate product
Discounts Under a Top-Down Priced Parent
A discount applied beneath a parent that is priced from above would reduce a total that has already been shared down, so discounts are restricted under a Spread Down pricing method.
If you save a discount on a record beneath such a parent, the save is rejected with a message naming the pricing method.The priced parent keeps its own discount. A line set keeps its discount under the Baseline pricing method, because a line set can itself be the priced level, but not under Spread Down.
In the Estimate Builder, the Discount (%) cell is read-only on every row whose pricing method prices above it, including when you paste values or undo a change. No message is displayed on the row, so if a discount cell is unavailable and the record is priced from above, this is why.
You cannot select Use Dated Bill Rates on a role request that a no-code pricing method governs, because dated bill rates are a Time and Materials feature. Dated bill rates remain available under the Time and Materials pricing method, and on records that have no pricing method selected. For more information, see Discounting Estimates.
SECTIONS