In this article (8 sections)
The context
Step: releasing Revenue Cloud pricing from a sandbox to production. The pricing worked in the sandbox and had to ship without being rebuilt by hand.
On the first release, the procedure deployed without an error, ran without an error, and returned nothing. It looked like a pricing bug. The cause was in what had been deployed alongside it.
The problem
A pricing setup has five components: the procedure, the context definition it reads, the decision tables it calls, the adjustment schedules it applies, and the price book entries underneath. Move only some of them and the procedure runs and returns nothing.
Two details keep the problem out of sight. First, procedure steps can carry hardcoded record IDs. Each org assigns its own ID when a record is created, so the same adjustment schedule has a different ID in production. A step that applies a schedule by its sandbox ID finds nothing in the target org and applies nothing, with no error, while the configuration reads the same on both sides.
Second, the procedure that runs is the compiled version, not the source you edit. On one org the source had 81 standard steps and the compiled version had 128. Reading the source to check a migration proves nothing.
The solution
The pricing setup is treated as a single deployment unit, with a written inventory of the five components and of every hardcoded ID. Deployment follows dependency order: context, then tables and schedules, then the procedure, then the prices.
Flow
The rule that keeps a catalog maintainable: a decision table only when there is a condition or a tier. A flat price belongs on the PricebookEntry. Decision tables added by reflex are what fills a procedure up to its element ceiling.
And the procedure that runs is the compiled _Auto version, not the source you edit.
- Input — ContextDefinition (what pricing can see)
- Decide — DecisionTable (only if conditional), AdjustmentSchedule (tiers and allowances), PricebookEntry (if no condition)
- Run — Pricing procedure (ExpressionSet)
- Output — Net price (on the line)
How to set it up
- List what the procedure references, including any hardcoded IDs in its steps.
- Deploy in dependency order and reactivate the procedure at the end: deploying or editing it leaves it inactive.
- Check by repricing a real quote and reading the line totals, not by looking at the configuration.
Alternatives
A single deployment unit with an inventory holds up over repeated releases, which is why it was the choice. The option ruled out is rebuilding everything by hand in the target org. It is slower, but sometimes safer for a first production release, because it forces the inventory.
A procedure that runs without an error says nothing about the prices it calculates. So every migration gets checked by repricing a real quote in the target org and reading the line totals.
In practice
- Inventory the five components and every hardcoded ID before deploying.
- Deploy in dependency order: context, tables and schedules, procedure, prices.
- Reactivate the procedure after deployment.
- Prove it by repricing a real quote in the target org and reading the line totals.