Revenue Cloud Explained · step 5 of 6

Billing and Tax: How It Works

When to invoice, how much, with which tax, and how the invoice reaches accounting. With the billing license, invoices come out of the order, on schedule, with no re-keying.

15 articles on this topicAdmin side: Usage and Rate Management, Revenue Cloud Billing

How it works

Each ordered line can produce a billing schedule: when to invoice, and how much. An implementation is billed once; a subscription, every month or every year. Nobody types the schedule in: it is created from the order, by a flow or an API call that you have to set up.

Invoices come out of the schedules, on each due date. Tax is calculated by an engine mapped to each product: the Salesforce one, a partner engine, your own, or imported tax lines. The payment received is applied to the invoice it settles, based on application rules.

For accounting, Revenue Cloud produces debit and credit journal entries, from a chart of accounts you set up in it. They then go to your accounting system, where the balance sheet and the income statement are built.

Four ideas often get mixed up: billing frequency, commitment term, payment term and revenue recognition. A 36-month commitment can perfectly well be billed monthly.

For technical teams

The schedule (BillingSchedule) is created by the Create Billing Schedules for Orders API or by a flow. It produces invoices (Invoice, InvoiceLine). The tax engine is wired through a tax treatment (TaxTreatment); a custom engine implements the Apex interface TaxEngineAdapter.

On one project, orders activated and no schedule ever appeared, with no error anywhere: configuration prerequisites were missing.

From order to invoices: three billing schedules, one invoice a month

From order to invoices: three billing schedules, one invoice a monthThe January order has two lines, so two billing schedules (Original category): setup, billed once at €1,056, and the 25 licenses at €880 a month. Each month, the schedules of the same billing account are grouped on one invoice: €1,936 in January, then €880. In July, the amendment adds an AmendQuantity schedule of €528 a month, in the same group as the license schedule. The January to June invoices don’t move. From July to December, the monthly invoice is €1,408.JanFebMarAprMayJunJulAugSepOctNovDecSetupOriginal, billed once1,056Licenses: 25Original, every month880880880880880880880880880880880880Licenses: +15AmendQuantity, same group528528528528528528Monthly invoiceschedules grouped together1,9368808808808808801,4081,4081,4081,4081,4081,408amendment: +15 licenses for 6 monthsinvoices already issued: they don’t moveFrom order to invoices: three billing schedules, one invoice a monthThe January order has two lines, so two billing schedules (Original category): setup, billed once at €1,056, and the 25 licenses at €880 a month. Each month, the schedules of the same billing account are grouped on one invoice: €1,936 in January, then €880. In July, the amendment adds an AmendQuantity schedule of €528 a month, in the same group as the license schedule. The January to June invoices don’t move. From July to December, the monthly invoice is €1,408.Setup25+15InvoiceJan1,0568801,936Feb880880Mar880880Apr880880May880880Jun880880Jul8805281,408Aug8805281,408Sep8805281,408Oct8805281,408Nov8805281,408Dec8805281,408amendment: +15 licenses for 6 monthsinvoices already issued: they don’t move

One order gives several invoices over time, and one invoice brings several schedules together. An amendment adds a schedule; it does not touch issued invoices.

Fictional Northwind example, before tax. Default grouping: same billing account, contact, currency, payment terms, tax engine, legal entity and payment method. A decrease along the way goes through a credit memo applied to the invoice.

  1. The January order has two lines, so two billing schedules (Original category): setup, billed once at €1,056, and the 25 licenses at €880 a month.
  2. Each month, the schedules of the same billing account are grouped on one invoice: €1,936 in January, then €880.
  3. In July, the amendment adds an AmendQuantity schedule of €528 a month, in the same group as the license schedule. The January to June invoices don’t move.
  4. From July to December, the monthly invoice is €1,408.

Try it on the example

Simplified simulation, not the Salesforce screen.

The billing calendar

Same commitment, three billing rhythms. Change the frequency: the number of invoices changes, the total does not.

Net amounts, after the quote’s 12% discount.

Billing frequency
Commitment term
Invoices issued
Recurring amount
Implementation, billed once
Total over the term
The invoice detail
No.Issued Service periodAmount excl. tax

Four things not to confuse

  • Billing frequency. How often invoices come out. That is what this simulation controls.
  • Commitment term. How long the customer is committed for, whatever the invoicing rhythm.
  • Payment term. How long the customer has to pay an invoice once it is issued. Entirely independent of the first two.
  • Revenue recognition. When the revenue is booked in the accounts. An annual invoice collected up front is not recognized all at once. That is handled in accounting, and this simulation does not cover it.
Assumptions
  • Billed in advance: each invoice covers the period that is starting. Billing in arrears would shift every date.
  • Term starting January 1, periods aligned to calendar months. Starting mid-month introduces proration, which is not simulated here.
  • Amounts excluding tax, fictional example.
  • This simulation illustrates the mechanism, it does not reproduce the Salesforce billing engine.

The diagram

Billing architecture order → schedule → invoice
Prerequisites Source Engine Output drives routes Billing context extended + activated Billing settings context mapping Billing defaults entity, treatments OrderItem with period fields ScheduleGroup BSGEntitiesMapping BillingSchedule never created by hand Invoice draft, then posted InvoiceLine TaxCode stays empty Ledger rule insert-only criteria

Every box on the top row is a prerequisite that produces no error when it is missing: the schedules simply never appear. The order line is the other silent failure: it needs period boundary and billing frequency fields that are not surfaced as required, so a data import passes cleanly and nothing ever bills.

  1. Prerequisites — Billing context (extended + activated), Billing settings (context mapping), Billing defaults (entity, treatments)
  2. Source — OrderItem (with period fields)
  3. Engine — ScheduleGroup (BSGEntitiesMapping), BillingSchedule (never created by hand)
  4. Output — Invoice (draft, then posted), InvoiceLine (TaxCode stays empty), Ledger rule (insert-only criteria)
Tax architecture transaction → code → rate
Who Which rule How much Result country selection looks up LegalEntity who is selling BillingAccount who is billed TaxPolicy how to choose TaxTreatment product × code TaxEngine the calculator TaxRate code × country × period InvoiceLineTax the only place the code lands

Two points to take from this diagram. First, it is the country of the billing profile that determines the rate, not the address on the order. I verified it in both directions on two orders with different addresses and the same profile. Second, no native mechanism varies the tax code by country: TaxTreatmentItem has no geographic field, and the standard decision table takes a code as input and returns a rate, so it can never produce one.

  1. Who — LegalEntity (who is selling), BillingAccount (who is billed)
  2. Which rule — TaxPolicy (how to choose), TaxTreatment (product × code)
  3. How much — TaxEngine (the calculator), TaxRate (code × country × period)
  4. Result — InvoiceLineTax (the only place the code lands)

The objects involved

Name in the UIAPI nameWhat it is for
Billing ScheduleBillingSchedulewhen and how much to invoice, per ordered line
InvoiceInvoicethe document sent to the customer
Invoice LineInvoiceLineone billed line, with its period
Credit MemoCreditMemowhat corrects an invoice already issued
Legal EntityLegalEntitythe company that invoices
Tax TreatmentTaxTreatmentthe tax rule applied to a product
General Ledger AccountGeneralLedgerAccountthe account a journal entry posts to

Common pitfalls

Articles on this topic

All 15 articles: Billing and Tax

Back to the full journey

A question about this topic?

I answer every message personally.

Contact

Type at least two letters.