In this article (6 sections)
Stage: the mid-contract amendment, when the customer removes licenses. A customer gives back a license mid-year. The amendment comes out with a quantity of −1 and an amount of zero: no negative schedule, no credit memo, and the customer keeps paying for a license they returned. The positive amendment worked: +2 licenses, prorated amount, correct invoice. The job was to find out why one worked and the other didn’t.

The price was there, on the line detail
The price wasn’t lost along the way. The line detail, the record attached to the quote line (and its equivalent on the order), carried the right negotiated price, the right negative quantity and the reference to the original sale. Only its total amount was zero. So the question became: why wasn’t the calculation using that price?
Why the positive one worked and the negative one didn’t
In the standard pricing procedure, a line that removes licenses goes through the “last
transaction price” group. That group is filtered on an ItemPricingSource attribute
equal to LastTransaction, fed by a pricing source field on the quote line and order
line. On the project org, on Summer ’26, that field only existed on the asset.
The attribute was empty everywhere, so the group never ran.
Normal lines take the opposite branch, “not equal to LastTransaction”, which an
empty value satisfies. That’s why the positive amendment worked: it never needed the broken
branch.
Fixing the filter wasn’t enough. The line stayed at zero, because the group’s formula multiplied the line’s net price, and that price was empty: it sat on the line detail. The step that moves values between the line and its detail was missing.
The workarounds tried in the meantime don’t hold, because the next calculation overwrites them:
- An Apex hook in the Procedure Plan, to set the price before the procedure runs. The hook does write to the context, but the next pricing section re-reads the records and overwrites everything.
- Setting the price by hand on the amendment order. Reprice All clears it, then locks it: “You can’t edit the Unit Price because the Order Product has related Order Product Detail records.”
- Going through the order instead of the quote. The order behaves exactly the same: the problem is in the procedure, not in the object you start from.
The fix: add the Map Line Item element
The key came from Salesforce support. When the Advanced Detail Line Pricing setting is on in
Revenue Settings, the procedure must contain the Map Line Item element, in second
position, right after the pricing settings, as the Salesforce help
spells out. That element links the line to its details. Without it, values don’t flow
between the two levels.
A demo sandbox without that setting didn’t have the problem. That’s what made it so hard to reproduce, and why it isn’t described anywhere as a symptom.
In metadata the element is called BreakdownLineMapping: one section per
attribute, from the transaction item to its detail, eighteen sections in all. At the time of the
project, those parameters came from a public repository; the Winter ’27 help
now gives that JSON, with the same eighteen sections.
With the element in place, the −1 amendment comes out prorated, at the right price, and the negative schedule follows.
Enlarge- 1The total is negative: the customer is giving something back.
- 2The amendment quantity: −10.
- 3Before and after: 20 down to 10. The amendment does not replace the original order, it adds to it.
- 4The amount, prorated over what was left to run.
Going live: the Winter ’27 pricing recipe
In production, on Winter ’27, no procedure containing a list price step could be saved: “Ensure that the lookup table in the ListPrice step is valid.” Not even a brand-new procedure generated by Salesforce.
The pricing recipe, created before Winter ’27, had an empty usage subtype. Winter ’27 validates lookup tables against a recipe with the Revenue Cloud subtype, and that field can’t be changed on an existing recipe. So you have to create a second recipe, with the same mappings and the right subtype.
One point is left for finance to decide: when nothing feeds it the last transaction, the detail picks up the list price, not the negotiated price, and the credit is calculated on that. The neighboring symptom, a renewal that comes out at list price, has a different cause, covered in Renewal at list price.
In practice
- Check the Advanced Detail Line Pricing setting first. Without it, the cause is elsewhere and this article doesn’t apply.
- With it, put
Map Line Itemsecond in the procedure, right after the pricing settings, using the JSON from the Salesforce help. - Test a negative amendment on an amount, not on a quantity: −1 at zero produces no credit.
- Add a procedure version, never edit the active one, and only deactivate the old one once the new one is active.
- On an org created before Winter ’27, check the pricing recipe subtype before the upgrade.
Seen on an org running Summer ’26, then Winter ’27. The pricing source field has since appeared on the line, so the last-transaction branch may behave differently in your release. It hasn’t been rechecked since.