Revenue Cloud project notebook, written by two Meir IT consultants who implement it.

What is Revenue Cloud?

Pricing·Admin

Hiding $0 Lines on the Revenue Cloud Quote PDF

A "show on PDF" checkbox that checks itself and that reps can override. Three places the rule could live, and the amendment it broke.

Nathan Altmann · Revenue Cloud consultant at Meir IT

Published 3 min read

In 3 linesfor leadership

  1. The client wanted zero-priced lines hidden on the quote PDF, unless sales chose to show a free item.
  2. Placed inside the pricing calculation, this display rule broke amendments on lines with no price yet.
  3. Fixed by checking the price exists first, then limiting one discount to new sales only.
In this article (4 sections)
  1. An editable checkbox instead of a formula
  2. Three places the rule could live
  3. Why amendments broke
  4. In practice

Stage: the quote PDF, and the pricing run that comes before it. The client's ask: don't print $0 lines, unless the rep wants to show the customer a concession, like free maintenance. Choosing where that rule should live ended up touching the pricing procedure, and breaking amendments.

An editable checkbox instead of a formula

A formula field checked whenever the price isn't zero handled the general case. But a formula can't be edited by hand, so a rep couldn't have shown free maintenance to let the customer see the discount. It needed a real checkbox on the quote line, and a rule that checks it automatically when the line has a price.

Three places the rule could live

  • A flow on the quote line. Ruled out. Revenue Cloud's line editor saves through its own API, and a flow updating the same line at the same moment caused save conflicts on this project (seen on this one project only).
  • An Apex hook, code plugged into pricing. Doable, but it means creating a Procedure Plan and changing how all pricing gets invoked, which is way too much for a checkbox.
  • A step in the pricing procedure. Chosen. The field is declared in the transaction context (the in-memory picture of the quote the procedure works on), and an assignment step checks it when the net price is positive.

The rule checks the box but never unchecks it. A $0 line checked by hand stays checked; a priced line unchecked by hand gets checked again on the next calculation. So reps can show a $0 line, but they can't hide a paid one.

Why amendments broke

A few days later, asset amendments started failing. By putting the rule in the pricing procedure, it had become a pricing step, run on every path, including the ones where a line doesn't have a price yet. That's the case during an amendment. The "net price greater than zero" filter was comparing an empty price to zero, and that comparison failed the whole calculation instead of just skipping the step.

Filter that breaks amendmentsPricing procedure
NetUnitPrice GreaterThan 0

The fix is one condition: check that the price exists before comparing it.

Fixed filterPricing procedure
NetUnitPrice IsNotNull
AND NetUnitPrice GreaterThan 0

With the filter fixed, amendments were still blocked, for an older reason. In an amendment, the lines you don't touch come back flagged as unchanged, and Revenue Cloud won't let a discount apply to them. The percentage discount used for the free maintenance was applying to them too. After proving it on a copy of the procedure, that discount was limited to new sales.

In practice

  • Treat a display rule that lives in the pricing procedure like a pricing rule: it runs on every calculation, on every path.
  • In every filter that compares an amount, check first that the amount exists.
  • Make every procedure change in a new version, and keep the old one ready to reactivate.
  • Test first on a copy of the procedure that no quote uses, with a dry-run calculation.
  • After every change, replay four paths: new sale, renewal, amendment, and recalculating an existing quote.
A technical question about this article?

A question about this article? I reply within 48 hours.

Something unclear, a mistake, or different behavior in your Salesforce org? Write to me.

Prefer email? Write to nathan@meir-it.com

Get notified of new articles

Type at least two letters.