In this article (6 sections)
Stage: choosing which company invoices, set on the account and copied all the way to the invoice. The client, a software vendor, invoiced from three companies, one per sales region, each with its own tax, invoice numbering, legal footer and sometimes currency. In Revenue Cloud, all of that starts from the Legal Entity, which follows the sale from account to quote, order, billing schedule, invoice and credit memo. The job was to decide how to pick it and to check that tax, invoice numbers and renewal indexation followed.
Who decides the entity
The first idea was to derive it from the customer's billing country. That wasn't the client's rule: there, the team that manages the account decides, and an account field already says which team that is. A US customer can perfectly well be managed, and invoiced, by the French company.
So the entity is derived from that field, with the country only as a fallback. It's set on the account, then copied to every quote and every line, and the few thousand existing accounts were recalculated in one pass. The calculation runs before save, in a single automation: set in an after-save flow, the entity triggered a second pass that still read the old value.
Tax: the tax engine read the address
Contracts in dollars, carried over from the old system, came out with French VAT. The tax engine on this project decided based on the customer's billing address, not the legal entity. Every line had to be moved to the right tax treatment, and the billing schedules rebuilt on the right entity. The per-entity tax design (treatments, rates, tax policy) is in Sell through several legal entities, and the role of the billing profile is in Tax driven by the billing profile.
Numbering: one sequence per entity
In France, invoices must be numbered with no gaps. Revenue Cloud handles that with sequence policies: one sequence per entity, each with its own prefix, and a number assigned only when the invoice is posted, never while it's a draft. Gapless mode is built in.
These policies don't load like ordinary data: you create them from the Sequence Policies tab or through the dedicated REST API. An active policy can't be edited, so you create a new one. And on cutover day, each sequence has to pick up where the old system stopped, or two invoices will share a number.
Indexation: read from the account
At renewal, prices are indexed: on the Syntec index in France, on other indexes elsewhere. The index was first tied to the entity, and the client corrected it: some customers invoiced by a foreign subsidiary are indexed on Syntec because their contract says so. So the index is read from the account, and the entity only supplies the default.
Why the entity isn't enough
| Topic | What worked |
|---|---|
| Choosing the entity | A clear business rule (the team managing the account), country as fallback |
| Propagation | Computed before save, copied from account down to each line |
| Tax | Check what the tax engine reads; consistent tax treatment on every line |
| Numbering | One sequence per entity, assigned at posting, continuing the old system |
| Indexation | Read from the account; the entity only supplies the default |
The legal entity gets copied everywhere, so you expect everything to follow from it. In practice, each mechanism reads its own field: the tax engine read the address, numbering reads the entity, indexation depends on the contract, and the choice of entity itself depends on the team managing the account. A correct entity on the invoice guarantees neither the right tax nor the right index. And since these values are copied when quotes, lines and billing schedules are created, a mistake at the start stays in everything already created: on this project, fixing the tax meant rebuilding the billing schedules.
Out of four rules, two weren't the ones you'd infer from the entity or the country, and only the client's finance team knew them. I don't see another way to find them than having each one confirmed, one at a time.
In practice
- Build a table with one row per rule (entity choice, tax, numbering, renewal index), the field Salesforce reads to apply it, and finance's sign-off.
- Compute the entity before save, in a single automation, and recalculate existing accounts in one pass.
- On a sample of carried-over contracts in each currency, run a line-by-line report showing entity and tax treatment, and fix it before the first invoice.
- Before the first invoice, create a sequence policy for each entity that starts at the number after the last one the old system issued.