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

What is Revenue Cloud?

Pricing·Admin

Moving Pricing Between Orgs

A pricing procedure that works in the sandbox deploys to production, runs without an error and prices nothing. Everything it uses has to be deployed with it, and record IDs don’t carry over.

Nathan Altmann · Revenue Cloud consultant at Meir IT

Published 3 min read

In 3 linesfor leadership

  1. Pricing moved from sandbox to production ran without errors but returned no prices at all.
  2. Some of its parts were left behind, and sandbox record IDs were still hardcoded in its steps.
  3. Deploy everything as one inventoried package, then check by recalculating a real quote.
In this article (8 sections)
  1. The context
  2. The problem
  3. The solution
  4. Flow
  5. How to set it up
  6. Alternatives
  7. In practice
  8. Sources

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

Pricing architecture context → procedure → price
Input Decide Run Output ContextDefinition what pricing can see DecisionTable only if conditional AdjustmentSchedule tiers and allowances PricebookEntry if no condition Pricing procedure ExpressionSet Net price on the line

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.

  1. Input — ContextDefinition (what pricing can see)
  2. Decide — DecisionTable (only if conditional), AdjustmentSchedule (tiers and allowances), PricebookEntry (if no condition)
  3. Run — Pricing procedure (ExpressionSet)
  4. Output — Net price (on the line)

How to set it up

  1. List what the procedure references, including any hardcoded IDs in its steps.
  2. Deploy in dependency order and reactivate the procedure at the end: deploying or editing it leaves it inactive.
  3. 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.

Sources

  1. Salesforce Pricing Objects
  2. Salesforce Pricing Migration Scenarios
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.