taggalongRevenue Cloud field guide
Menu
Billing · Lab

Invoice an order and credit it

Drafted, not yet confirmed · your lab org

You'll take an activated order through billing yourself: read the schedule activation made, generate a draft invoice, post it, credit part of it, and watch the schedule, the invoice and the balance respond at each step.

Your lab org comes with a sample company, QuantumBit. Its products, price books and billing setup are there because the labs use them, so leave them as they are. Everything a lab names starts with TGFG-, so you can always tell your work from QuantumBit's.

Before you start

To do this lab you need a lab org of your own, with this lab set up in it. This page lists what the lab needs, so you can set it up by hand. The lab kit does it for you. Start your own lab

Open your lab org with cci org browser my-lab, or from Org Launcher if you set it up. Track your orgs

You need a Revenue Cloud org built from Salesforce's launchpad, Revenue Cloud Foundations, with its QuantumBit sample catalog.

The setup makes these for you:

It makes Called What it's for
An account in USD with a billing and shipping address TGFG-Billing Lab, at 4300 Main Street, Philadelphia, PA 19127, US The customer you bill
A contact TGFG Billing Lab Contact, [email protected] The bill-to contact
A default billing profile TGFG-Billing Lab Billing An order won't activate without a billing address, a shipping address and a bill-to contact
One subscription, sold through quote, order and activation QB API Management Solution (SKU QB-API-MGMT), Term Annual, quantity 1, USD 12,000 a year on the Standard Price Book The order you invoice

The subscription starts on the day you run the setup, runs one year, and is billed monthly in advance. Activation creates its billing schedule. Nothing is invoiced yet: generating, posting and crediting are the lab.

The paths below are for the Revenue Cloud app (App Launcher > Revenue Cloud), except the last step's. The Billing app lays out the same records on different tabs.

Done this lab before? Run the setup again and use the newest order, group, schedule and invoice. Generate Invoices bills every due schedule on the account, so an earlier run's next period can land on your invoice as an extra line, and the totals run higher than the steps say. Your new order's line matches.

Every step of this lab has been clicked through on screen in a fresh lab org.

Steps

  1. Find the flow that starts billing

    Flow

    Why Billing schedules come from order activation, not from the quote. Activation runs a flow that calls the Create Billing Schedules for Orders API.

    Go to Setup then Quick Find then Flows then Flows

    Setup opens in a new browser tab. The Flows list has no search box (a banner says search is in the Automation Lightning App). It's sorted by Flow Label and loads more rows as you scroll: scroll down to the O's, then on to the R's. Open nothing and change nothing.

    You should see: Salesforce's Order To Billing Schedule Flow, Managed-Installed, with Active unchecked, and RLM Order to Billing Schedule Flow, the launchpad's copy, Unmanaged, with Active checked (its label is cut short in the list). Both are record-triggered and run after save. The active one ran when the setup activated your order.

  2. Read the order

    Order Product

    Why Billing works from the order product. Its billing frequency, period boundary and billing treatment shape the schedule activation built.

    Go to App Launcher then Revenue Cloud then Accounts then TGFG-Billing Lab then Related then Orders then the newest order then Related then Order Products then QB API Management Solution

    The order's Bill To Contact is on its Details tab, under Customer Information. The order product opens on its Details tab; the billing fields are under Billing Information.

    You should see: the order Activated, with Bill To Contact TGFG Billing Lab Contact. The order product: Quantity 1.00, Unit Price USD 12,000.00, Start Date the day you ran the setup, End Date a day short of a year later, Product Selling Model Term Annual, Period Boundary Anniversary, Billing Frequency Monthly, Billing Treatment - USA - Advance.

  3. Read the billing schedule group

    Billing Schedule Group

    Why Activation makes one billing schedule group per order product, and the group is what invoicing processes. It carries the product's treatment, legal entity, tax treatment and payment term.

    Go to App Launcher then Revenue Cloud then Accounts then TGFG-Billing Lab then Billing then Billing Schedule Groups then the group with the highest number

    The Billing Schedule Groups card is below the Settlements & Adjustments and Invoices cards.

    You should see: Billing Treatment - USA - Advance, Default Legal Entity - US, Default Tax Policy, Default Payment Term, Billing Type Advance, Billing Method Order Amount, Billing Term 1 and Billing Term Unit Month. Effective Next Billing Date is the start date, Total Billed Amount 0, Total Pending Amount 12,000. Its Asset is QB API Management Solution, the one the order created.

  4. Read the billing schedule

    Billing Schedule

    Why A schedule says when and how much one order product is invoiced. Advance billing invoices at the start of each period, and invoicing picks up a schedule whose Next Billing Date is before the target date.

    Go to The group then Billing Schedules then the one schedule

    The group's Billing Schedules tab is a timeline, not a list: click the schedule's name beside its bar.

    You should see: on the timeline, the schedule marked Original at USD 1,000.00 / Month. On the schedule: Status Ready For Invoicing, Category Original, Next Billing Date the start date, Total Amount 12,000, Billing Period Amount 1,000, Pending Amount 12,000. Its Reference Entity is your order and its Reference Entity Item is the order product.

  5. Generate a draft invoice

    Account

    Why Salesforce's help says Generate Invoices bills the account's schedules that are Ready for Invoicing with a next billing date before the target date. An invoice scheduler would pick up every account's unless filtered.

    Go to App Launcher then Revenue Cloud then Accounts then TGFG-Billing Lab then the arrow at the end of the header buttons then Generate Invoices

    Generate Invoices isn't one of the header buttons: it's in the menu under the arrow. Both dates open on today.

    Field Set it to Why
    Target Date the day after the schedule's Next Billing Date After the first period's billing date and well before the next one, a month later
    Invoice Date the schedule's Next Billing Date The date the invoice shows; the due date counts from it
    Status Draft So you can review the invoice before posting

    Then click Generate.

    You should see: "Generating invoices..." and "We'll notify you when the process is complete." Within a minute the bell shows "Invoice generated for the TGFG-Billing Lab Account".

  6. Open the draft invoice

    Invoice

    Why An invoice starts as a draft so finance can review it. Its due date comes from the payment term, here Default Payment Term: 30 days after the invoice date.

    Go to App Launcher then Revenue Cloud then Accounts then TGFG-Billing Lab then Billing then Invoices then the newest invoice

    Reload the account page first: the Invoices card doesn't show the new invoice until you do. Invoices are named by a Document Number starting DOC-.

    You should see: Status Draft, Settlement Status Not Applicable, no Invoice Number yet, a Due Date 30 days after the Invoice Date. Total Amount 1,000, Total Tax 100, Total with Tax 1,100, Balance 1,100: one month of 12,000 a year, plus tax.

  7. Read the line and its tax

    Invoice Line

    Why An invoice line carries one billing period's charge. Its tax comes from the tax treatment's engine, and on a draft that tax is only an estimate.

    Go to The invoice then Related then Invoice Lines then QB API Management Solution

    You should see: Unit Price 12,000, Charge Amount 1,000 and Tax Amount 100 for the first month, and Line Amount 1,100, which includes the tax. Tax Treatment is Default Tax Policy; the line's Tax Rate and Tax Code are empty on a draft.

  8. Check the schedule

    Billing Schedule

    Why The same schedule as before, to see what a draft does to it. Each invoiced period of a schedule becomes a billing period item.

    Go to The invoice line then Billing Schedule ID then Related then Billing Period Items

    If the schedule was already open in a tab, reload it.

    You should see: the schedule hasn't moved: still Ready For Invoicing, Next Billing Date and Pending Amount as before. One billing period item, the first month, Amount 1,000, Invoice Status Draft. The draft reserved the period without billing it.

  9. Post the invoice

    Invoice

    Why Posting turns the draft into the invoice you send, with actual tax in place of the estimate.

    Go to The invoice then Post Draft Invoice

    There's no confirmation. The page reloads with Status Posting In Progress; wait a few seconds and reload it. Then open the invoice's Invoice Lines tab and click the line's Tax Amount.

    You should see: Status Posted, Settlement Status Not Settled, and an Invoice Number starting INV-US-, from the org's US Invoice Numbering Policy. Total Tax stays 100, so Balance stays 1,100. The Tax Details window shows one tax at Rate 10%, Amount $100.00. Revenue Cloud also logs that a payment schedule stayed draft because the account has no payment method; that's expected, and you can see it in the Billing app, from the invoice's Payment Schedule link, under Related > Revenue Transaction Error Logs.

  10. See the schedule move

    Billing Schedule

    Why The same schedule again, to see what posting changed.

    Go to The invoice then Related then Invoice Lines then QB API Management Solution then Billing Schedule ID

    Reload the schedule if it was already open.

    You should see: Next Billing Date a month on, Pending Amount 11,000, still Ready For Invoicing. Under Related, the billing period item's Invoice Status is Posted; open it and its Status is Reviewed. Posting, not drafting, billed the schedule.

  11. Credit part of the line

    Invoice Line

    Why A credit memo reduces what the customer owes. Created against an invoice line, it can be any amount up to the line's balance, with tax recalculated on the credit.

    Go to The invoice then Related then Invoice Lines then Create and Apply Credit Memo

    Tick the QB API Management Solution line's box in the Invoice Lines card before you click Create and Apply Credit Memo. The window shows the line as a grid row: click its Credit Amount cell, then the pencil in it, to type.

    Field Set it to Why
    Credit Amount 200 Part of the line, so the invoice stays partly unpaid
    Enable tax calculation Selected Tax on the credit is calculated for you

    Then click Create and Apply.

    You should see: Total Credit Amount 200 in the window before you create it; the tax on the credit isn't shown there. After Create and Apply: "The credit memo generation is in progress. Check notifications in a bit." Within a minute the bell says the credit memo was created.

  12. Read the credit memo

    Credit Memo

    Why A credit memo is its own posted record. It references the invoice it credits and takes its legal entity from it.

    Go to App Launcher then Revenue Cloud then Accounts then TGFG-Billing Lab then Billing then Credit Memos then the newest credit memo

    Reload the account page first. Like invoices, credit memos are named by a Document Number starting DOC-.

    You should see: on the Credit Memos card, Total with Tax 220 and Balance 0: all of it was applied. On the credit memo: Status Posted, a Credit Memo Number starting CM-US-, Total Amount 200, Total Tax 20 and Total with Tax 220. Its Reference Entity is your invoice.

  13. See the balance

    Invoice

    Why The credit settles part of the invoice. Billing Settings' credit application level decides whether credits reduce the invoice's rolled-up balance or a single line's.

    Go to App Launcher then Revenue Cloud then Accounts then TGFG-Billing Lab then Billing then Invoices then your invoice

    You should see: Net Credits Applied 220, Balance 880, Settlement Status Partially Settled. The schedule still has 11,000 pending: a credit doesn't rebill. On the Invoice Lines tab the line still shows Line Amount 1,100: the credit landed on the invoice, not the line.

  14. Try to void it

    Invoice

    Why Voiding reverses a posted invoice with a credit memo that mirrors it. Salesforce's help says you can't void an invoice that credits, payments or write-offs have settled, even in part.

    Go to App Launcher then Billing then the menu beside Home then Accounts then TGFG-Billing Lab then Invoices then your invoice then Void Invoice

    This step switches to the Billing app. It's a console app: it opens on the Billing Operations Console, its tabs are in the drop-down menu beside Home, and each record opens in its own tab. Its invoice page offers Void Invoice; the Revenue Cloud app's invoice page doesn't. Leave the console's New Schedule button alone: an invoice scheduler bills every account that has a schedule due, unless it's filtered.

    You should see: the void is refused with "Can't void invoices that have settlements." The invoice stays Posted with Balance 880. To void it you'd first unapply the credit.

What to take away

Activation made the group and schedule, with treatment, tax treatment, payment term and legal entity already on them. The draft invoice reserved the first period without billing it. Posting fixed the tax, numbered the invoice and moved the schedule on a month. The credit lowered the balance without touching the schedule, and that settlement blocks a void.

Keep the three verbs apart: generating creates the invoice, posting bills the schedule, crediting settles the balance.

The reasons in each step come from Salesforce's documentation and, in a few places, from what we checked in a Revenue Cloud org. The guide page lists the sources: Billing.

Back to the guide page