Erfassen Sie Ihre Fortschritte
Trailhead-Startseite
Trailhead-Startseite

Learn About Date Fields and Proration

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe how CPQ determines the term length of a subscription product.
  • Identify which fields contribute to the actual length of a subscription quote line.
  • Determine which length-related fields have precedence in case of conflicts.
  • Describe how the Prorate Multiplier field affects pricing calculations.
  • List five ways to change the precision of the Prorate Multiplier field.

Default Subscription Term

In the last unit, you saw CPQ calculate a prorated regular unit price for the Password Manager License quote line by setting it to $60 for 24 months. Clearly CPQ is doing some math in the background. It's important to understand exactly what values CPQ uses in its calculations.

CPQ uses the Default Subscription Term field to calculate subscription pricing. It’s found on the quote line object. You can think of this field as the length of a “normal” subscription for exactly the price book price of the product. In the case of the Password Manager License, you get 12 months for $30. Technically, this field gets its value directly from the subscription term of the product record. So when you added the Password Manager License to your quote, as CPQ created the quote line record it copied "12" from the Password Manager License product record [1] and put it into Default Subscription Term [2].

Product record with Subscription Term set to 12

Quote Line record with Default Subscription Term set to 12

If the product record has a blank value for the Subscription Term field, the Default Subscription Term field will also be blank. However, CPQ treats blank values in these fields as 12 for practical purposes.

Once the quote line is created and the default subscription term value is copied over, all pricing calculations use that quote line value. The Subscription Term field from the product record is no longer in use. This is because the product record might change in the future, and we don't want pricing to mysteriously change while a quote is in progress.

Many Ways to Define Time

Another important factor in subscription pricing is the length of the subscription. When you created your first quote, you learned that you can set a quote's subscription term to 24, 28, or whatever duration your customer needs. CPQ used the subscription term of 24 to calculate the $60 prorated price of the Password Manager License. However, that’s not the only way to tell CPQ the length of a subscription. You might remember seeing that you can also set a start date and end date for the quote.

Popup seen when clicking New Quote button with fields to input a start and end date for the quote

If you’d left the Subscription Term field blank, and instead entered Jan 1, 2020 for the start date, and Dec 31, 2021 for the end date, you would still see the same prices since those dates also describe a duration of 2 years. Sales reps can use whichever method they prefer; the results will be the same.

Although it's common to set subscription terms or start/end dates on the quote, you can also define them on every quote line. Here’s the Quote Line Drawer opened to reveal those previously hidden fields.

Quote Line Drawer with subscription fields highlighted

It's helpful to have the choice of setting the subscription length at the quote line. For example, you may have one quote with multiple subscriptions and one of them has to end early. In that scenario, a sales rep can set the quote’s subscription term to 24, and just the one quote line’s subscription term to 6.

There’s one last place to set Subscription Term, Start Date, and End Date: at the quote line group level.

Quote Line Editor with two Quote Line Groups

This lets your sales reps tell CPQ the lengths of all subscriptions in a group by just setting one or two fields.

In total, there are nine different fields used to define subscription length. So how does CPQ know which ones to use if many of them are filled in? To understand which have priority, it helps to think of the quote as having three levels: the quote level (the most generic), the quote line group level (a little more specific), and the quote line level (the most specific).

Diagram of relationship between quote, group, and line levels

CPQ determines the actual length of a subscription quote line in three stages.

  • First, CPQ looks for the most specific start date and the most specific end date and uses those. It’s OK if the start date is from one level (such as quote) and the end date from another (such as line). If either the start date or end date is unknown, it goes to the next stage.
  • Next, CPQ looks for the most specific subscription term. If it can’t find a subscription term anywhere, it goes to the last stage.
  • Finally, if all else fails, CPQ uses the quote line’s default subscription term (or inputs 12 if the field is blank).

Remember, a given subscription quote line can only have one length. While it may take some detective work to uncover what contributes to its length, you can count on CPQ to always use the above process.

Prorate Multiplier and Subscription Prorate Precision

So far we've discussed two things that affect subscription pricing of a quote line: the default subscription term and the length of the subscription. CPQ combines these two factors to create what is known as the prorate multiplier, which is the actual number CPQ uses to calculate a prorated price. For example, when you added the Password Manager License to your 24-month quote, CPQ used a prorate multiplier of 2, multiplying $30 by 2 to get $60. The question is, where did the 2 come from?

In this case, the prorate multiplier was calculated by dividing the subscription term (24) by the default subscription term (12). So, 24/12 = 2. When you changed the subscription term to 28, that gave you a new prorate multiplier: 28/12 = 2.3333. That was then used to calculate a new prorated price: $30 x 2.3333 = $70.

The prorate multiplier is easy to calculate if using subscription terms for your subscription lengths. It gets a little more complicated when using start and end dates. That’s because now the subscription length has to account for how many days are in a month, if a leap year is involved, and if the subscription includes a partial month. To handle different business needs, CPQ supports five different methods of calculating the prorate multiplier when using start and end dates, seen in the table below. In this table, DST = default subscription term. The third column shows an example calculation that includes a leap year (2020).

Proration Method Math January 10, 2020 to April 15, 2021 with 12-month DST Prorate Multiplier
Month
Months (rounded up) / DST
16/12
1.3333
Monthly + Daily
(Months +
[Remaining days / {365/12}]) / DST
(15+[6/{365/12}])/12
In this example the first month spans from January 10 to February 9. The last month spans from March 10 to April 9.
1.2664
Calendar Monthly + Daily
([Partial days in start month / days in start month] + Whole months + [Partial days in end month / days in end month]) / DST
([22/31]+14+[15/30])/12
1.2675
Day
Days / Number of days necessary to complete DST from start date
462/366
1.2623
Day With Calendar Month Weighted
Years + (Remaining days / X) where X = 366 if remaining days includes February 29, otherwise X = 365
1 + (96/365)
In this example the first year spans from January 10 to January 9.
1.2630

The Day method is unusual for a few reasons.

  • If your org’s subscription term unit is Day, you must choose the Day method—all other methods are locked out.
  • The package level setting named “Ignore Leap Year Days” appears when the Day method is selected. Checking it tells CPQ to completely remove February 29 from all calculations. That would make the example in the table 461/365 instead of 462/366.
  • Two subscriptions with the same length can differ in price if your subscription term unit is Month. Imagine you have a product with a default subscription term of 1. Selling a subscription from March 1 to May 15 gives us a prorate multiplier of 2.4516 (76 days/31 days). We divide the total days by 31 because March has 31 days, so it would take 31 days to complete the default subscription term. But the 76 days spanning from April 1 to June 15 have a prorate multiplier of 76/30, or 2.533. Here we divide by 30 because April only has 30 days. If the subscription started in February, we would have to divide by 28 (or 29 if a leap year).

The Day With Calendar Month Weighted method also has the option to Ignore Leap Year Days. Selecting it makes the X in the above table 365 for all cases.

Note

Note

The Calendar Monthly + Daily method, and the Day With Calendar Month Weighted method only calculate correctly if your org is set up to use the CPQ Advanced Calculator. To use the Advanced Calculator navigate to Setup > Installed Packages > Configure (for Salesforce CPQ). On the Pricing and Calculation tab, uncheck Use Legacy Calculator, then click the Authorize New Calculation Service link. When prompted, allow the Advanced Calculator to access your org data.

The proration method is set in the CPQ package level setting named Subscription Prorate Precision.

Package-level setting for Subscription Prorate Precision

It’s best to keep the proration method the same for the life of your org. If you do change it, be aware that old quotes are NOT retroactively recalculated. Quotes that are recalculated by the reps or by some automated process will use the new proration method.

Wow, proration involves a lot of math! Good thing CPQ runs those calculations for you. You’ve learned how subscriptions are priced. Next you look at how to break a 3-year subscription into three 1-year pieces so each piece can be discounted separately.

Resources