You are here:
Proration with Invoices
Salesforce Billing uses proration to calculate balances for invoice lines that cover partial billing periods. The invoice line field Calculated Quantity performs a similar function to the quote line and order product’s Prorate Multiplier fields. (Salesforce Billing Managed Package)
On the invoice line, for subscription pricing, Billable Unit Price (from the order product) * Calculated Quantity = Subtotal.
Calculated Quantity is a proration that captures the number of billable periods on the invoice line. For example, if the invoice line covers one month and Billing Frequency is Monthly, Calculated Quantity = 1.000000.
Similarly, if the invoice line covers three months and Billing Frequency is Quarterly, Calculated Quantity = 1.000000. If the invoice line covers three months and Billing Frequency is Monthly, Calculated Quantity = 3.000000.
The calculated quantity is then used to determine the invoice line’s subtotal (without tax).
Subtotal (without tax) = (Calculated Quantity * OrderProduct.BillableUnitPrice)
- Partial Proration Type
- The initial setting for determining an invoice line’s calculated quantity. You can select
Day or Month + Day.
- Day
- Salesforce Billing divides the number of days in the invoice line by the number of days in each month within the range of the last billing frequency. For example, you have an invoice line from 10/11/19 through 10/20/19, related to an order product with quarterly billing frequency. The 10-day billing period is divided by the total days in each month of the previous quarter: 31 days in July, 31 days in August, and 30 days in September, or (10 / 92) * quantity 1 = 0.1087.
- Month + Day
- If you select Month + Day, Salesforce Billing looks at the value of the Proration Type package setting.
- Proration Type
- Salesforce Billing evaluates this setting only when the partial proration type has a value
of Month + Day.
- Calendar Days
- Use the number of days in the first month of the billing period.
- 30 Days
- Use a flat value of 30 days per month.
- Monthly: CPQ Formula
- Use the CPQ formula of (365 / 12) days per month.
| Proration Type Value | Description | Invoice Line Balance Calculation |
|---|---|---|
| Partial Proration Type: Days | Use the number of days in the previous billing frequency. | The billing frequency is monthly, and the previous month is April, which contains 30 days. ((9 / 30) * 1) = 0.30 * $1000 = $300. |
| Proration Type: Calendar Days | Use the number of days in the first month of the billing period. |
|
| Proration Type: 30 Days | Use a flat value of 30 days per month. | ((9 / 30) * 1) = 0.30 * $1000 = $300 |
| Proration Type: Monthly (CPQ Formula) | Use the CPQ formula of (365/12) days per month. | ((9 / (365/12)) * 1) = $295.89 |
| Action | Result | Proration Type: Calendar | Proration Type: Monthly (CPQ Formula) |
|---|---|---|---|
| Keep Billing Day of Month at 1 |
|
(09 / 31) * $1000 = $290.32 | (9 / (365 / 12)) = 0.2959 * $1000 = $295.89 |
| Change Billing Day of Month to 11 |
|
The first month of our period is May, so divide the 19 total days by the 31 days in May. ((19 / 31 * $1000) = $612.90 |
(19 / (365 / 12)) * $1000 = $624.66 |
| Change Billing Day of Month to 30 |
|
(7 / 31) * $1000 = $225.80 | (7 / (365 / 12)) * $1000 = $230.14 |
| Action | Result | Proration Type: Calendar | Proration Type: Monthly (CPQ Formula) |
|---|---|---|---|
| Keep Billing Day of Month at 1 |
|
(09 / 31) * $1000 = $290.32 | (9 / (365 / 12)) = 0.2959 * $1000 = $295.89 |
| Change Billing Day of Month to 11 |
|
The first month of our period is May, so divide the 19 total days by the 31 days in May. ((19 / 31 * $1000) = $612.90 |
(19 / (365 / 12)) * $1000 = $624.66 |
| Change Billing Day of Month to 30 |
|
(7 / 31) * $1000 = $225.80 | (7 / (365 / 12)) * $1000 = $230.14 |
| Action | Result | Calculated Quantity | Prorated Charge (on $6,000) |
|---|---|---|---|
Billing Day of Month at 1 Billing Period: 10/28/19 to 3/31/20 |
|
For a semi-annual calculation, we divide by 6. ((1 + 4 + 0.12903226) / 6 = 0.85483871 |
0.85483871×6000 = $5129.03 |
Billing Day of Month to 11 Billing Period: 10/10/19 to 3/9/20 |
|
For a semi-annual calculation, we divide by 6. (0.70967742 + 4 + 0.29032258) / 6 = 0.83333333 |
0.83333333×6000 = $5000 |

