In this article (8 sections)
- Five handovers between the order and the invoice
- Four org settings that block billing without an error
- Order line fields that are required without saying so
- The flow criterion that never fired
- The last handover: what the invoice carries, and posting
- One invoice that tests the whole chain
- In practice
- 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.
Enlarge- 1One band per stage of the chain: procure, ship, install, activate, bill.
- 2Each box is a step, with its type: manual task, callout, pause, milestone.
- 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:
- 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.
- 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.
- 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.
- 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.
EnlargeThe 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.