Simple Subscription Billing in Salesforce

Simple Subscription Billing introduced in v1.34.0 [Clover I]

What is Simple Subscription Billing in Salesforce and Why is it Useful

Simple Subscription Billing enables you to track sales of subscriptions as well as individual products. it is a simple, 3-step process:

  1. You simple designate a product as a subscription, so that when that product is added as a line item, you specify a start date and a duration (if not already set on the opportunity).
  2. At an appropriate point in your sales process (typically when an opportunity goes closed won), you can create a contract by clicking a checkbox and a new contract record is created, together with subscription, billing and journal records. Prior to checking the checkbox, if the opportunity is already associated with a contract and a subscription record already exists for the product, the subscription quantity will be updated and a billing record for the changes to the contract is also automatically generated.
  3. At an appropriate point before the contract ends (typically 90 days or whatever schedule you choose with your process), you can have Flexpricer automatically create a new opportunity that includes all the products that are currently on subscription.

Simple Subscription Billing uses Salesforce’s standard Contracts object – appropriate for contracts and initial subscriptions measured in a whole number of months.

Add-ons to existing subscriptions are co-terminus with the Contract

Amendments to existing subscriptions are co-terminus with the Contract

Before setting up Simple Subscription Billing, you may find it useful to review the data model and terminology.


Setup of Flexpricer’s Simple Subscription Billing

  • Go to Flexpricer Settings page and Settings subtab
    • Check the box next to Simple Subscription Billing. This will enable the feature.
    • There are three pre-requisites to enabling the feature
      1. This feature makes use of the standard Pricebook lookup field on the standard Contract object. Salesforce only makes this field available in the schema if Orders are enabled in the org. Even though Flexpricer does not utilise the Orders object, you must enable Orders so that Flexpricer can utilise the Contract Pricebook field.
      2. If you have upgraded from a version of Flexpricer prior to v1.34 and have not previously enabled this feature, you will need to add the word Subscription to Flexpricer’s Quantity Multiplier picklist on the Product object.
      3. The feature is not included in all Flexpricer licenses – if you are unable to enable Simple Subscription Billing after updating the Quantity Multiplier picklist and enabling Orders, please contact our Onboarding Team at [email protected] for assistance.
    • Specify the Default Proration Calculation to use in the event that this is not specified on the subscription product record.
    • Specify the Default Proration Precision to use in the even that this is not specified on the subscription product record.
    • Set the Renewal Opportunity Stage. This is the stage that the renewals processor (when running) will set on a Renewal opportunity.
    • Set the Renewal Opportunity Record Type Name. This is the name of the record type that the renewals processor will set on the Renewal opportunity
  • Go to Flexpricer Settings page and Scheduled Jobs subtab
    • To enable the background renewals processor that will automatically create a renewal opportunity on the Renewal Opportunity Creation Date, enter a ‘cron’ format (see below) schedule and press the Schedule button next to the Job Name: Flexpricer Subscription Renewal Opportunity Creation.
    • To enable the billing line item quantity processor that will automatically update a subscription with the total quantity currently active (i.e. between the Billing Line Item Start Date and Billing Line Item End Date), enter a ‘cron’ format (see below) schedule and press the Schedule button next to the Job Name: Flexpricer Billing Line Item Updates.


Salesforce’s ‘cron’ format as outlined here. An example schedule is 0 15 6 * * ? * which would run the scheduler at 6:15am every day of every month of every year

  • Seconds (0 = zero seconds)
  • Minutes (15 = fifteen minutes past the hour)
  • Hours (6 = six am)
  • Day of Month (* = every day of the month)
  • Month (* = every month)
  • Day of Week (? = unspecified day of the week)
  • Year (* = every year)

It’s important to remember that Salesforce enforces a limit on ‘cron’ scheduling, forcing the characters entered as seconds and minutes to be integers. If you attempt to use characters other than integers (e.g. * or ?), then Salesforce will not schedule the job.

The effect of Salesforce’s limitation is to reduce the granularity of the schedule to multiples of hours (i.e. you cannot set the job to run ‘every 15 minutes’ – the most granular is ‘every hour’).


  • Edit the Product page layout and add the following field to the layout
    • Quantity Multiplier
    • Default Quantity X
    • Quantity X Label
    • Default Quantity Y
    • Quantity Y Label
    • Renewal Product
  • Edit the Opportunity page layout and add the following fields
    • Contract (standard field)
  • Edit the Contract page layout and add the following related lists
    • Subscriptions
    • Billings
    • Billing Line Items
    • Billing Journals
  • Edit the Account page layout and add the following related lists
    • Contracts
    • Subscriptions
    • Billings

  • To designate a product as a subscription product, pick the value Subscription in the Quantity Multiplier picklist.
  • We also recommend specifying defaults for Quantity X (the default quantity of the product), Quantity Y (the default duration), the Quantity X Label (e.g. if the subscription product is based on number of users, the label might be ‘Users’) and the Quantity Y Label (typically ‘Months’).

How Simple Subscription Billing Works

Products for Subscription Billing in Salesforce

  • To specify a product as a Subscription Product, simply select Subscription from the Quantity Multiplier picklist on the Product record
  • You may specify that when Subscription Product renews (i.e. a new opportunity is created for the renewal), a different product is automatically selected for the renewal. This is called the ‘Renewal Product’ and is set on the Subscription record.
  • The default value for the Renewal Product on the Subscription is populated when the Subscription record is created and defaults to the value in the Renewal Product the Product record that was initially selected.

New Contracts and Subscriptions

  • When a customer buys a subscription for the first time, they must have at least one subscription product on their opportunity. We call this the Contracted Opportunity.
  • When a subscription product is added to a Contracted Opportunity, the sales user must select
    • A Start Date, which will become the start date of the contract
    • A Duration in months, which will be the number of months of the contract
    • A Billing Period in months, which will dictate the number of Scheduled Billing records created
    • A Contract Renewal Duration in months, which will be the number of months that that will be used on the renewal opportunity
  • When the Create/Update Subscription checkbox is checked on the Contracted Opportunity record, a Subscription Contract plus at least six other subscription-related records are automatically created.


Note that Flexpricer does NOT include automation to check the Create/Update Subscription checkbox. Your Salesforce Admin can very quickly and easily create a process using Process Builder to check this checkbox at an appropriate point in your sales cycle. (We recommend that checking the checkbox is performed as a scheduled action to avoid contention.) Typically, you might automatically run this process when an opportunity is Closed Won.

The six records created when this checkbox is checked are

  1. A single Contract record of record type ‘Subscription’ that stores the start and end date of the contract that has been agreed. The contract is the commitment from the customer to retain the initial subscription for a certain period.
  2. At least one Subscription record – one for each subscription product that is a line item on the opportunity.
  3. At least one Billing record that consolidates the value of the subscription products being billed
  4. At least one Billing Line Item records – one for each subscription product that is a line item on the opportunity.
  5. At least one Billing Journal records – one for each month of the contract, representing the total subscription value in that month
  6. At least one Billing Journal Detail records – one for each Billing Line Item record that contributes to each Billing Journal record.

Addon Subscriptions to an Existing Subscription Contract

  • If an existing contract of record type ‘Subscription’ is connected to an Opportunity using the standard Contract lookup, then Flexpricer considers this opportunity to be an Amendment Opportunity. Any subscription products on the Amendment Opportunity will either amend existing subscriptions (if the product is the same) or create new subscriptions (if the product is different).
    Note that we use the standard Contract lookup field, so you may wish to apply some lookup filters or validation to ensure that only contracts related to the Account on the Opportunity are returned.
  • The duration of any subscription product is automatically calculated as the number of days from the start of the subscription (specified on the line item) until the Subscription Contract End Date is based on the value of the Proration Calculation picklist on the associated Product record.
  • The number of months is stored to 8 decimal places, or you may allow Flexpricer to apply rounding as set on the Proration Precision picklist on the associated Product record.
  • Now, when the Create/Update Subscription checkbox is checked on the Amendment Opportunity,
    • A new Subscription record is created for each new subscription product that is added to the Subscription Contract
    • Existing Subscription record quantities are amended between the Billing Line Item records Start Date and End Date, to represent the active quantity for the current date
    • At least one Billing record of record type ‘Unscheduled’ is created that consolidates the value of the new and amended Subscriptions being billed from this opportunity up until the next ‘Scheduled’ billing record.
    • At least one Billing Line Item records is created – one for each new or amended Subscription
    • At least one Billing Journal records is updated – for each month where the revenue is affected by the new or amended Subscriptions
    • At least one Billing Journal Detail records is created – one for each Billing Line Item record that contributes to each Billing Journal record.

Renewals for Subscription Billing in Salesforce

  • When the date in the Subscription Contract Renewal Date field is reached and if the Subscription Contract is activated, Flexpricer will create a new Contracted Opportunity that contains line items for each product that is currently active on subscription.
  • The close date of the Contracted Opportunity will default to the Subscription Contract End Date, adjusted by the number of days specified in the Renewal Opportunity Close Date Adjustment field (positive numbers make the close date later, negative numbers make the close date earlier). The stage of the Contracted Opportunity will be set to the stage specified in the Simple Subscriptions section of the Flexpricer Settings page.
  • The currently active quantity of each Subscription on the Subscription Contract is transferred to the quantity field of the Opportunity Product on the newly created Contracted Opportunity.
  • The Sales Price of each Opportunity Product is set based on the selection in the Base Price on Renewal field on that Subscription. The default selection is ‘Current List Price’, however alternatives are
    • Min Unit Price — the lowest price that a product has been sold from the Billing Line Items
    • Max Unit Price — the highest price that a product has been sold from the Billing Line Items
    • Average Unit Price — the average price that a product has been sold from the Billing Line Items
    • Current List Price — the current list price of the product in the pricebook that is set on the Contract
  • The selected Base Price on Renewal can be uplifted if required by setting a percentage in the Sales Price Uplift on Renewal. Flexpricer will apply this uplift to the Base Price on Renewal when setting the Sales Price on the line item.
  • The owner of the new Contracted Opportunity will be set according to the following rules
    • If active, the owner of the most recent Amendment Opportunity (or Contracted Opportunity if no Amendment Opportunities exit) associated with the Subscription Contract
    • If unable to be set as above, then if active, the owner of the account associated with the Subscription Contract
    • If unable to be set as above, then the user who started the RenewalOpportunityBatch apex process (the process that creates the renewal opportunity)
  • The stage and record type of the new Contracted Opportunity are as specified on the Flexpricer Settings page in the Simple Subscriptions section
  • The new Contracted Opportunity automatically sets the Subscription Contract Start Date as the day after the End Date of the existing Subscription Contract.
  • The new Contracted Opportunity sets the duration of the new Subscription Contract based on the Renewal Months on the current Subscription Contract.

Available in ,

Was this helpful?