Skip to content

Setting Up Subscription-Based Reporting

Service companies (SaaS, professional services, etc.) usually generate recurring revenue based on subscriptions with their customers. JustOn supports subscription billing with recurring and transactional (usage-based) items. Now the companies need continuous reporting about subscription-based KPIs, too - like, for example, MRR (monthly recurring revenue) or Churn (rate of discontinued subscriptions or lost revenue).

To enable informative reports, JustOn has introduced metric objects and relevant processes:

The metric records can give valuable insights into your business by displaying the recurring revenue for the current or a future date, recurring changes (like growth or churn), or expected cash flow on a monthly basis. In addition, you can use the metric records in order customize the JustOn reports or to build your own reports in Salesforce.

SaaS reporting-relevant concepts

Take, for example, companies that provide SaaS services. In order to run their business and to get a complete overview of their financial data, they usually distinguish between bookings, billings and revenues:

  • Bookings provide a view on the growth of the business. You can analyze the past and near future using the reports based on actual bookings. Basically, they reflect how well a business model scales and how well the sales team performs. Common KPIs include MRR (monthly recurring revenue, based on subscriptions) and Churn (rate of discontinued subscriptions or lost revenue). Taking this one step forward: Actual subscriptions allow for forecasting the future cash position.
  • Billings indicate the amount of money that has been invoiced and that is to be collected from customers. They provide information about the cash that a business can expect in the near future. Common KPIs include ARPA (average revenue per account) and CLTV (customer lifetime value). Additional reports may inform about the invoiced amount by product group, the total invoiced amount by account or the amount of tax to pay.
  • Revenues represent a view on the financial situation of the company. JustOn revenue reports are based on booking details, which provide information about

    • the revenue that can be recognized in a certain booking period, like a yearly invoice split into monthly revenue amounts - it can show the billed and recognizable revenue as opposed to the deferred revenue
    • the revenue that is not yet billed but can be forecasted based on the existing bookings, providing a view on the future financial data - this is the amount that is not billed yet but booked, that is, the forecasted revenue by booking periods.

Now adding the dimension time to bookings, billings and revenues results in the following SaaS reporting scheme:

alt text
SaaS KPI reporting with JustOn

Subscription Metrics

The Subscription Metric object is related to the account and the subscription, and set up to track item changes.

Info

The Subscription Metric object and the related functionality are available as of JustOn 2.50. Aggregation support has been introduced as of JustOn 2.55.

Data Model

The main component is the Subscription Metric object. It holds the following information:

Field Description
Account The related account (secondary master-detail); the metric record is deleted when the account is deleted.
Actual The actual amount of this metric
Previous/Initial + Change
Change The change of the MRR based on the previous MRR.
Churn Rate (Gross) The gross churn rate is the ratio between Churn and Actual.
IF(Actual=0,1,Churn/Actual)
Churn Rate (Net) The net churn rate is the ratio between Change and Actual.
IF(Actual=0,1,Change/Actual)
Churn The absolute churn if the change is negative.
IF(Change < 0,ABS(Change),null)
Date The effective date of this metric, depends on the kind of change (add/subtract) and the service period/next invoice date of the item.
Expansion The absolute expansion if the change is positive.
IF(Change > 0,Change,null)
Growth Rate The growth rate is the ratio between Change and Previous.
IF(Previous=0,null,Change/Previous)
Initial Holds the initial MRR value. Only filled if the change date equals the start date of the first subscription.
Is Latest (checkbox) Marks the latest metric record for a particular item criterion.
Item Criterion The criterion shows which items have been aggregated to this metric.
Items The names of the related items that caused the current change.
Next Metric Links to the next metric record, which supersedes the current record.
Previous Metric Links to the previous metric record, which is superseded by the current record.
Previous Holds the MRR value of the previous metric record.
Retention Rate The opposite of the gross churn rate. The sum of the two is always 100%.
1-ChurnRateGross
Smooth Change The smooth change formula allows to report two consecutive metrics (within two days) as one (like -50 and +70 is reported as +20)
Subscription The related subscription (primary master-detail); the metric record is deleted when the subscription is deleted.

In addition, you can define summary fields on the subscription in order to calculate future MRR values. For details, see Creating Additional Subscription and Item Fields.

Setup

Setting up the Subscription Metric object and related functionality involves

Configuring Subscription Metric Permissions

Because of the master-detail relationship with the account, you must manually configure the access to the Subscription Metric object.

  1. Create a new permission set.

    For details, see Create Permission Sets in the Salesforce Help.

  2. Assign Read, Create and Edit permissions for the Subscription Metric object to the new permission set.

    For details, see Edit Object Permissions in Profiles in the Salesforce Help.

Info

Field access is already assigned via the permission set JustOn Read/Write and must not be configured specifically.

Creating Additional Subscription and Item Fields

Subscription

Optionally, you can set up summary fields on the subscription in order to report future MRR values. The summary fields are not shipped with JustOn, but you can easily create them in the following way:

Label API Name Data Type Description
Current MRR MRR_0m__c Currency Shows the current MRR (based on the MRR job execution date).
MRR in One Year MRR_12m__c Currency Shows the MRR in one year (based on the MRR job execution date).
MRR in Three Years MRR_36m__c Currency Shows the MRR in three years (based on the MRR job execution date).

The MRR summary fields are refreshed when the MRR job is executed.

The summary fields must be of the data type Currency. The API name must use the following pattern: MRR_Zm__c, where Z is a positive number that represents months, like MRR_0m__c, MRR_12m__c.

The subscription field Last MRR Update holds the date on which the MRR fields were last calculated.

For help about creating fields, see Managing Object Fields.

Info

Make sure that the user who executes the MRR job has write access to the subscription summary fields.

Item

By default, JustOn aggregates all items of a subscription to one metric chain. In order to separate items based on a criterion (for example, product group), you create an additional criterion field on the item. Depending on your requirements, the field can be a formula or a writable field to be filled on subscription building. The API name of the field must be MRRCriterion__c.

Consider the following use case: You want to separate metrics by the product group as set for the item. To this end, configure the MRR criterion field as a formula and set the following content: ONB2__ProductGroup__c. As a result, each product group has its own metric chain, and the metric field Item Criterion specifies the product group.

For help about creating fields, see Managing Object Fields.

Info

Make sure that the user who executes the MRR job has read access to the Item Criterion field.

Enabling Subscription Metric List Display

Optionally, you can enable the display of related subscription metrics on the subscription page using Salesforce's related list functionality (see Work with Related Lists on Records in the Salesforce Help).

  1. Navigate to the object management settings of the Subscription object.
  2. Click Page Layouts.
  3. In the Subscription Layout row, click Edit.
  4. Select the Related Lists palette.
  5. Drag the Subscription Metrics list to the Related Lists section.
  6. Click Save to save the modified page layout.

For help about modifying page layouts, see Managing Pages.

Scheduling Subscription Metric Generation

To create or update subscription metric records, you schedule the subscription metric builder job.

Note

The subscription metric builder job is available as of JustOn 2.55. Up to JustOn 2.54, subscription metrics were created by two processes that ran on subscriptions and items.

If you have updated JustOn from an earlier version, you must remove the processes and the created records, and use the job to generate new subscription metric records.

The subscription metric builder job does not require additional parameters. That is, you can set up the job directly for the corresponding Apex class BatchSubscriptionMetricBuilderJob. For details, see Scheduling Concepts.

To schedule the subscription metric builder job, you can use either JustOn's Scheduled Jobs page or Salesforce's Schedule Apex functionality. For details, see Scheduling a Job.

Via JustOn's Scheduled Jobs page:

  1. Open the Scheduled Jobs page.

    Use the following URL https://login.salesforce.com/apex/ONB2__JobsSetup, or, if you are already logged in, append apex/apex/ONB2__JobsSetup to your org's domain name.

    As of JustOn 2.52, you can access the Scheduled Jobs page via the JustOn configuration app (App Launcher > JustOn Configuration > Jobs Setup).

  2. From the Apex Job drop-down list, select Subscription Metric Builder Job.

    The Job Name field is automatically set to BatchSubscriptionMetricBuilderJob.

  3. From the Start Time drop-down list, select the preferred execution time.

  4. Optionally, edit the displayed cron expression to adjust the execution time.
  5. Click Schedule.

    This sets up the subscription metric generation to be executed at the specified time.

Info

From the Scheduled Jobs page, you can also run the job immediately.

Via Salesforce's Schedule Apex functionality:

  1. In Setup, open Apex Classes.

    In Salesforce Lightning, navigate to Custom Code > Apex Classes.

    In Salesforce Classic, navigate to Develop > Apex Classes.

  2. Click Schedule Apex on top of the list.

  3. Specify the details as required.

    • Job Name
    • Apex Class: BatchSubscriptionMetricBuilderJob
    • Frequency: Weekly or Monthly (with an according weekday or day of month setting)
    • Start
    • End
    • Preferred Start Time
  4. Click Save.

    This sets up the subscription metric generation to be executed at the specified time.

For more details about job scheduling, see Scheduling a Job in the JustOn documentation and Schedule Apex in the Salesforce Help.

Enabling Additional Subscription Metric Information

For reporting purposes, you may wish to copy more values from an item to the resulting subscription metric record, for example, the product group in order to allow a corresponding grouping in the MRR reports.

  1. On the Subscription Metric object, create new custom fields with the same API name and data type as the fields on the item.

    This copies the corresponding field values to the subscription metric upon record creation.

    For help about creating fields, see Managing Object Fields.

Workflow

Subscription metric records are created on subscription or item change if the following conditions are met:

  • Subscription

    • Status is set to Inactive, Canceled or Upgraded
  • Recurring item

    • Billing type is Recurring or Recurring Prorated
    • Item is created
    • Quantity or price is changed
    • Item is deactivated
    • End date is set
  • Transactional item

    • Billing type is not Recurring, Recurring Prorated or One-Time
    • Item is created
    • Expected revenue is changed
    • Item is deactivated
    • End date is set

In addition, the following rules apply:

  • Each change results in a new metric record that is linked to the previous record.
  • If the change date equals the start date of the first subscription, the field Initial is used.
  • Subsequent metric records have filled the fields Previous and Change.
  • The first record is set to the start date of the item or subscription.
  • Subsequent metric records are set to the next invoice date of the item.
  • The final metric record is set to the end date of the item.
  • Metrics are continued from upgraded subscriptions (related via the subscription field Previous Subscription).

Cash Metrics

The Cash Metric object is related to the account and the subscription, and set up to track subscription amount changes. This way, businesses can generate reports on their cash flow.

Info

The Cash Metric object and the related functionality are available as of JustOn 2.52.

Data Model

The Cash Metric object holds the following information:

Field Description
Subscription The related subscription (primary master-detail); the metric record is deleted when the subscription is deleted.
Account The related account (secondary master-detail); the metric record is deleted when the account is deleted.
Date The effective date of this metric (month and year, always first day of a month)
Amount The sum over all items of this month for the subscription
Month The month of the effective date
Year The year of the effective date

If you want to consider, for example, the payment due of the subscription or account in your reports, you can add a custom formula field:

Label API Name Data Type Description
Due Date DueDate Formula(Date) = ONB2__Date__c + ONB2__Subscription__r.ONB2__PaymentDue__c

Setup

Setting up the Cash Metric object and related functionality involves

Configuring Cash Metric Permissions

Because of the master-detail relationship with the account, you must manually configure the access to the Cash Metric object.

  1. Create a new permission set.

    For details, see Create Permission Sets in the Salesforce Help.

  2. Assign Read, Create and Edit permissions for the Cash Metric object to the new permission set.

    For details, see Edit Object Permissions in Profiles in the Salesforce Help.

Info

Field access is already assigned via the permission set JustOn Read/Write and must not be configured specifically.

Enabling Cash Metric List Display

Optionally, you can enable the display of related cash metrics on the subscription page using Salesforce's related list functionality (see Work with Related Lists on Records in the Salesforce Help).

  1. Navigate to the object management settings of the Subscription object.
  2. Click Page Layouts.
  3. In the Subscription Layout row, click Edit.
  4. Select the Related Lists palette.
  5. Drag the Cash Metrics list to the Related Lists section.
  6. Click Save to save the modified page layout.

For help about modifying page layouts, see Managing Pages.

Creating Cash Metric Processes

Usually, you want JustOn to run the cash metric algorithm when the subscription or a related item changes. To this end, you create dedicated processes that run on subscriptions and items.

  1. In Setup, open Process Builder.

    In Salesforce Lightning, navigate to Process Automation > Process Builder.

    In Salesforce Classic, navigate to Create > Workflow & Approvals > Process Builder.

  2. Create the following processes.

    Option Value
    Object Subscription
    Start the process when a record is created or edited
    Criteria for Executing Actions Formula evaluates to true
    [ONB2__Subscription__c].ONB2__Account__c != null && ISPICKVAL([ONB2__Subscription__c].ONB2__Status__c , 'Active') && ( ISCHANGED([ONB2__Subscription__c].ONB2__StartDate__c ) || ISCHANGED([ONB2__Subscription__c].ONB2__EndDate__c ) )
    Action Type Apex
    Apex Class Create cash metric record on change
    Set Apex Variables The id of the added/changed item/subscription
    Field Reference: [ONB2__Subscription__c].Id
    Option Value
    Object Item
    Start the process when a record is created or edited
    Criteria for Executing Actions Formula evaluates to true
    [ONB2__Item__c].ONB2__Subscription__c != null && ( ISCHANGED([ONB2__Item__c].ONB2__StartDate__c ) || ISCHANGED([ONB2__Item__c].ONB2__EndDate__c ) || ISCHANGED([ONB2__Item__c].ONB2__Quantity__c ) || ISCHANGED([ONB2__Item__c].ONB2__Price__c ) || ISCHANGED([ONB2__Item__c].ONB2__ExpectedRevenue__c ) || ISCHANGED([ONB2__Item__c].ONB2__Commission__c ) || ISCHANGED([ONB2__Item__c].ONB2__Discount__c ) || ISCHANGED([ONB2__Item__c].ONB2__Active__c ) || ISCHANGED([ONB2__Item__c].ONB2__BillingPeriod__c ) )
    Action Type Apex
    Apex Class Create cash metric record on change
    Set Apex Variables The id of the added/changed item/subscription
    Field Reference: [ONB2__Item__c].Id

    For help about creating processes, see Lightning Process Builder in the Salesforce Help.

Workflow

If set up accordingly, JustOn creates and updates cash metric records on subscription or item change. The following conditions apply:

  • One cash metric record corresponds to a monthly invoice run for a subscription. That is, JustOn "simulates" an invoice run per month and aggregates the amount of the resulting invoice line items for each subscription in the Amount field of the cash metric record.
  • With respect to transactional items, the monthly amount of transactional items is derived from the Expected Revenue field of the item record (ONB2__ExpectedRevenue__c).