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

What is Revenue Cloud?

Billing and Tax·Admin

From Order to Invoice in Revenue Cloud

Orders activated without a hitch, but no invoice ever came out and no error showed up anywhere. The org settings and order line fields that decide whether billing happens at all.

Nathan Altmann · Revenue Cloud consultant at Meir IT

Published 5 min read

Admin path·9 of 12·Next: Calculating Tax from the Billing Profile

In 3 linesfor leadership

  1. Orders activated with no error, yet no invoice was ever produced and nothing flagged it.
  2. Some org settings were missing, plus four order line fields that nothing marks as required.
  3. Prove the full chain on one order, through to a posted invoice, before loading any data.
In this article (8 sections)
  1. Five handovers between the order and the invoice
  2. Four org settings that block billing without an error
  3. Order line fields that are required without saying so
  4. The flow criterion that never fired
  5. The last handover: what the invoice carries, and posting
  6. One invoice that tests the whole chain
  7. In practice
  8. Sources

Stage: from the activated order to the posted invoice, in Revenue Cloud Billing. Orders activated cleanly, but the invoice run found nothing to bill, because no billing schedule had ever been created. There was no error, no failed-flow email, nothing to read. The job was to find what was missing between the order and the invoice.

Five handovers between the order and the invoice

An activated order doesn’t turn into an invoice directly. It is broken down for fulfillment, it produces billing schedules (BillingSchedule), an invoice run picks those up, and the draft invoice is posted into an accounting period. On the fulfillment side, the breakdown is done by Dynamic Revenue Orchestrator, Salesforce’s orchestration layer, which turns a sales transaction into fulfillment lines.

A Dynamic Revenue Orchestrator fulfillment plan in five bands: Procure, Ship, Install, Activate and Billing, each carrying its steps.Enlarge
A full fulfillment planFulfillment Workspace
  1. 1One band per stage of the chain: procure, ship, install, activate, bill.
  2. 2Each box is a step, with its type: manual task, callout, pause, milestone.
  3. 3Billing is a step of the orchestration. It does not start on its own when the order is signed.

In every case below, the order saved and activated normally, and the next handover simply produced nothing, with no message. The failures clustered at the first handover and the last.

Four org settings that block billing without an error

The investigation started on the orders, which looked fine. The cause was in the org setup, in four places:

  1. The order save behavior release update. It sits under the archived tab of release updates, which is not where anyone looks for something still required.
  2. The billing context definition, extended and activated, then declared in billing settings as a context service mapping. Extending it isn’t enough, and activating it isn’t enough either: it has to be declared.
  3. The right intra-context mapping. The schedule-group mapping, not the order mapping. They sit next to each other in the picklist, and the wrong one produces no schedules and no error.
  4. The billing defaults: legal entity, billing treatment, tax treatment. Missing defaults don’t block activation, but no invoice comes out.

Order line fields that are required without saying so

Once the org is set up, the data has the same kind of gap. A billing profile produces nothing without a bill-to contact, a payment term and a delivery address. And the order line needs PeriodBoundary, PeriodBoundaryStartMonth, PeriodBoundaryDay and BillingFrequency2. None of those four is flagged as required: the order saves, activates, and never bills.

On a data migration, that sinks the project: an import of thousands of accounts will pass every validation and bill nothing. The chain has to be proven on one record first, all the way to a posted invoice, not just to an activated order.

The payment term that sets the due date is also on the order, not on the billing profile where the documentation suggested it would be. A describe of the object showed the field wasn’t there. On these newer objects, the documentation lags behind the schema, so a describe settles the question before anyone creates a custom field or relies on a documented one.

The flow criterion that never fired

On one org, the handover from order to billing schedule went through a flow that filtered on Status = "Activated". The org runs in French, where that value shows as Activé. The criterion never matched, the flow never fired, and no schedule was ever created. The details are in Flow Criteria That Fail Silently on a Localized Org.

The Billing band of an orchestration plan: a callout that starts billing, then a milestone. This is where billing starts, after the order is activated.Enlarge
The Billing band of an orchestration plan: a callout that starts billing, then a milestone. This is where billing starts, after the order is activated.

The last handover: what the invoice carries, and posting

Once invoices come out, they hold less than expected. The invoice has no country field. Its billing profile reference is null. And Invoice.BillingAccountId points at Account, not at the BillingAccount object, which sends ledger rules looking in the wrong place. On the line, InvoiceLine.TaxCode is always empty, posted or not: the real tax code lives on InvoiceLineTax, or has to be brought down from the treatment by a formula.

So anything used to route, report or reconcile has to be brought down onto the invoice line on purpose, usually with a formula field, before the ledger rules are written, because those rules cannot be edited once their criteria are inserted.

Posting has its own conditions. Invoice.Status is not writable: posting goes through the standard post action, and the accounting period has to be open. A period cannot exceed one year, so “one open period” means one per financial year.

One invoice that tests the whole chain

On one project, a single invoice proved the whole chain: a net amount, twenty percent tax, a gross total correct to the cent, and ledger entries assigned by a named rule. That one invoice validated the context mapping, the billing defaults, the order line fields, the tax chain and the ledger routing in one go.

It was built after the data load, which was too late. I would build it first: it is the only test that goes through all five handovers at once.

In practice

  • Prove the chain on one order, all the way to a posted invoice, before loading any data.
  • When no schedule appears, check the four org settings first: release update, context mapping, intra-context mapping, billing defaults.
  • Fill the four period fields on every order line. Nothing will tell you they are missing.
  • Bring routing data down onto the invoice line before writing ledger rules.

Every prerequisite here was found by failure on a real project, at API version 67, then fixed. The orchestration layer is documented by Salesforce; these failures are not.

Sources

  1. Dynamic Revenue Orchestrator
  2. Dynamic Revenue Orchestrator Standard Objects
  3. Orchestrate Sales Transaction Action
  4. BillingSchedule
  5. Billing
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.