Loading
Manage Your Billing Processes with Salesforce Billing
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Revenue Transaction Balance Calculations for Invoice Lines and Order Products

          Revenue Transaction Balance Calculations for Invoice Lines and Order Products

          When Salesforce Billing creates a revenue transaction for a revenue schedule, it uses a financial formula to determine the starting value for the Current Balance field. The formula results for the schedule's first revenue transaction can vary slightly based on whether the schedule recognizes revenue from an order product or invoice line. (Salesforce Billing Managed Package)

          Salesforce Billing uses these variables when calculating the initial value of the Current Amount field on a revenue transaction.

          • A—Total source transaction amount. The transaction source is an order product, invoice line, credit note, or debit note, based on the revenue schedule creation action of the revenue recognition treatment that created the revenue schedule. The field used varies based on the source object.
            • Order product: Total Price
            • Invoice line: Subtotal
          • U—Number of full billing periods in the transaction source.
          • P1—Number of days in a partial period. If no partial periods exist, use 0.
          • P2—Number of days in the partial period’s month. If a partial period covers multiple months, use the number of days in the starting month.
          • F1—Number of days that the revenue transaction exists within the current finance period.
          • F2—Total number of days in the current finance period.

          Salesforce Billing then uses the following formula.

          A ÷ (U + (P1 ÷ P2)) * (F1 ÷ F2)

          Remember that an order product represents the total amount and all billing periods for a given transaction, while an invoice line represents only the invoiced amount and billing periods for the same transaction. These variations in amounts and billing periods mean that the revenue transaction for a given business transaction will vary slightly based on whether revenue is recognized from the order product or the invoice line. Further, when calculating the final revenue transaction balance for an invoice line, Salesforce Billing subtracts the sum of the previous revenue transaction balances from the revenue schedule’s total amount.

          Important
          Important The revenue schedules for a fully-billed invoice still recognize the same amount of revenue over time as the revenue schedule for the source order product. The difference is that all the order product's revenue is accounted for in one revenue schedule, while the invoice's revenue is split up over one or more revenue schedules depending on its number of invoice lines.

          For example, you have a monthly order product for a $1,000 subscription from 05/12/21 through 12/31/21, with a Billing Day of Month of 1. The order product has a total amount (with tax) of $765.75.

          Order Product Start Date End Date Amount
          OP-01 05/12/21 12/31/21 $765.75

          The order product's billing rule combines partial periods, so invoicing the first line has these values.

          Invoice Line Start Date End Date Amount
          IL-01 05/12/21 06/30/21 $161.29

          We can already see the first difference in the amounts that Salesforce Billing will use during revenue transaction calculation. Let’s look at the calculations for each object to see how billing period variations between order products and invoice lines affect the resulting revenue transaction balances. For both examples, assume that you use a monthly revenue distribution method.

          Revenue Transactions for Order Products

          If your order product’s revenue recognition treatment creates revenue schedules upon order activation, you'll have a revenue schedule for 5/12/21 through 12/31/21 and a total amount of $765.75. It has eight revenue transactions.

          Revenue Transaction Start Date End Date Current Amount
          RT-01 05/12/21 05/31/21 $64.62
          RT-02 06/01/21 06/30/21 $100.16
          RT-03 through RT-08 ... ... $100.16 each

          Salesforce Billing uses these values for the first revenue transaction.

          • A = $765.75, from the order product’s Total Price field.
          • F = 7, covers the seven full periods starting from 05/12/21 through 06/11/21 and ending with 11/12/21 through 12/11/21.
          • P1 = 20, for the days in the partial period of 12/12/21 through 12/31/21.
          • P2 = 31, for the 31 days in the month of December.
          • F1 = 20, for the 20 revenue transaction days in the finance period of 05/12/12 through 05/31/12.
          • F2 = 31, for the 31 days in the finance period for the month of May.

          So your first transaction’s initial current amount is $765.75 ÷ (7 + (20 ÷ 31)) * (20 ÷ 31) = $64.62.

          Because the second revenue transaction covers the full finance period of June, both F1 and F2 become 30 to represent the full month of June. These values give an initial current amount of $765.75 ÷ (7 + (20 ÷ 31)) * (30 ÷ 33) = $100.61. This formula continues for each of the remaining full finance periods, using F1 and F2 values of 31 for months with 31 days.

          Revenue Transactions for Invoice Lines

          Here’s how Salesforce Billing calculates revenue transactions for the same transaction when the revenue schedule is created on invoice posting. Because the invoice line ends on 06/30, Salesforce Billing creates a revenue schedule for 05/12/21 through 06/30/21. It has two revenue transactions.

          Revenue Transaction Start Date End Date Current Amount
          RT-01 05/12/21 05/31/21 $63.71
          RT-02 06/01/21 06/30/21 $97.58

          Salesforce Billing uses these values for the first revenue transaction.

          • A = $161.29, from the order product’s Total Price field.
          • F = 1, covers the one full period from 05/12/21 through 06/11/21.
          • P1 = 19, for the days in the partial period of 06/12/21 through 06/30/21.
          • P2 = 30, for the 30 days in the month of June.
          • F1 = 20, for the 20 revenue transaction days in the finance period of 05/12/12 through 05/31/12.
          • F2 = 31, for the 31 full days in the finance period for the month of May.

          The first transaction’s initial current amount is $161.29 ÷ (1 + (19 ÷ 30)) * (20 ÷ 31) = $63.71.

          Because the second revenue transaction covers the remaining invoice period, Salesforce Billing calculates its current balance by subtracting the first period’s balance from the revenue schedule’s total.

          $161.29 - $63.71 = $97.58

          Comparing Periods

          To verify how Salesforce Billing calculated the revenue transaction values for the first revenue transactions for each source, let’s compare the differences between the source amount (the A value) and billing periods (U, P1, and P2 values).

          Revenue Transaction Source Object Source Amount Billing Period Calculation Used Notes
          RT-01 Order product $765.75 (7 + (20 ÷ 31)) Because Salesforce Billing recognizes revenue for all the order product’s billing periods, the F value represents seven full billing periods. P1 and P2 represent the partial period of 20 days in the month of December.
          RT-01 Invoice line $161.29 (1 + (19 ÷ 30)) Because Salesforce Billing recognizes revenue for only the billing periods covered by the invoice line, the F value represents one full billing period. P1 and P2 represent the partial period of 19 days in the month of June.
           
          Loading
          Salesforce Help | Article