Skip to content

Setting Up Cash Metrics

To set up cash metrics, configure the components described below. For conceptual background, refer to KPI Metrics.

Cash Metrics

Cash metrics display a business's expected cash flow. They track current changes to the amount of one-time, recurring and transactional items of active subscriptions. That is, they produce a cash flow forecast based on current data, but do not show the actual cash flow history.

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.

Cash metrics are related to the account and the subscription.

Cash metric data model
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
Workflow details

If set up accordingly, JustOn creates and updates cash metric records when relevant fields of existing subscriptions or items change.

The following conditions apply:

General

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.

Cash metrics reflect current values and do not look back. That is, a recent cash metric record cannot reproduce previous changes to a subscription or item.

Consequently, JustOn cannot restore deleted cash metric records.

Relevant period

Since a cash metric record represents a (simulated) monthly invoice run, JustOn applies the same logic for determining the relevant period. That is, an item is subject to the cash metrics generation if its period corresponds – at least partially – to the subscription period and the invoice run period (see Start Date and End Date).

JustOn creates cash metrics up to the specified end date of the subscription or item. If the automatic subscription renewal is enabled, cash metric records are produced for the defined extension period as well.

If there is no end date set, JustOn creates cash metric records for the next 12 months.

With a monthly invoice run on recurring items without end date, you can create new cash metrics on a monthly basis. Using the Item field Next Service Period Start as a flow trigger, JustOn will produce cash metric records for the next 12 months with every invoice run.

Amount

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).

If this field is empty, the relevant record will be ignored on metrics creation.

Setting up the Cash Metric object and related functionality involves

Once set up, you can use Business Reports to display the resulting metrics in easy-to-understand formats, including graphs.

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, Edit and Delete 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 Flows

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

Note

Depending on your use cases, the flow setup and the objects to involve will vary.

  1. Click to enter Setup, then navigate to Process Automation > Flows.
  2. Click New Flow.
  3. Select Record-Triggered Flow and click Create.
  4. Configure the Start element.

    Option Description
    Object The object whose record modifications are to trigger the cash metrics creation, must be Subscription or Item
    Trigger The type of record change that triggers the flow, usually A record is created or updated
    Conditions The use case-specific trigger conditions, one or more filter criteria for evaluating certain field values or a formula for evaluating records
    Optimize for Actions and Related Records
  5. Click and add the following Action element.

    Option Description
    Action The Apex class to call, must be Create cash metric record on change
    Input Values Invocable variables for the Apex class
    The id of the added/changed item/subscription: specifies the reference to the ID field of the subscription or item whose modifications are to trigger the cash metrics creation

    Specify a label and an API name as required.

  6. Click Save.

    Specify a label and an API name as required.

  7. Click Activate.

    When the defined conditions are met, JustOn triggers the flow, creating the cash metrics.

    For help about creating flows, see Flows in the Salesforce Help.

Flow configuration examples

Assume you bill recurring items without end date on a monthly basis. Now you want JustOn to create cash metrics every month for the next 12 months, that is, when the Item field Next Service Period Start changes. To this end, create the following flow:

Flow Element Option Value
Start Object Item (ONB2__Item__c)
Trigger A record is created or updated
Conditions All Conditions Are Met (AND)
1: ONB2__Subscription__c Does Not Equal {!$GlobalConstant.EmptyString}
2: ONB2__NextInvoice__c Is changed {!$GlobalConstant.True}
Action Action Create cash metric record on change
Input Values The id of the added/changed item/subscription: {!$Record.Id}

You want JustOn to create cash metrics when the start date or the end date of an active subscription have changed. To this end, create the following flow:

Flow Element Option Value
Start Object Subscription (ONB2__Subscription__c)
Trigger A record is created or updated
Conditions Formula Evaluates to True
Formula {!$Record.ONB2__Account__c} <> null && NOT(ISPICKVAL({!$Record.ONB2__Status__c}, 'Draft')) && (ISCHANGED({!$Record.ONB2__StartDate__c}) || ISCHANGED({!$Record.ONB2__EndDate__c}))
Action Action Create cash metric record on change
Input Values The id of the added/changed item/subscription: {!$Record.Id}

You want JustOn to create cash metrics when billing-relevant data of an associated item have changed, including start date, end date, billing period, status, price, quantity, expected revenue, commission, discount. To this end, create the following flow:

Flow Element Option Value
Start Object Item (ONB2__Item__c)
Trigger A record is created or updated
Conditions Formula Evaluates to True
Formula {!$Record.ONB2__Subscription__c} <> null && ( ISCHANGED({!$Record.ONB2__StartDate__c}) || ISCHANGED({!$Record.ONB2__EndDate__c}) || ISCHANGED({!$Record.ONB2__BillingPeriod__c}) || ISCHANGED({!$Record.ONB2__Active__c}) || ISCHANGED({!$Record.ONB2__Price__c}) || ISCHANGED({!$Record.ONB2__Quantity__c}) || ISCHANGED({!$Record.ONB2__ExpectedRevenue__c}) || ISCHANGED({!$Record.ONB2__Commission__c}) || ISCHANGED({!$Record.ONB2__Discount__c}) )
Action Action Create cash metric record on change
Input Values The id of the added/changed item/subscription: {!$Record.Id}

Depending on your business requirements, the criteria for executing the flows will vary. For example, you may add a condition that narrows down the set of subscriptions that are subject to the cash metrics generation.

Enabling Additional Cash Metric Information

For your individual reporting purposes, you may wish to add more information to cash metrics. Assume, for example, you want the cash metrics list view or a report to show the date of the expected cash flow. To this end, you add a custom formula field that evaluates the payment due of the subscription.

  1. Navigate to the fields list of the Cash Metric object.
  2. Create the following new field.

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

    For help about creating fields, see Managing Object Fields.

    You can now proceed to include this field in the list view or a custom report in order to show the expected cash flow date.