action.skip

Controlling Subscription Management Options

← Setting Up Billing Automation

JustOn allows for a number of advanced features with respect to managing subscriptions and subscription items, including

Configuring Subscription Filter

To limit the scope of subscriptions that are subject to an invoice run, you create one or more subscription filters.

Info

As opposed to other filters, subscription filters are presented as radio buttons. If there is one subscription filter, it is always selected. If there are multiple subscription filters, users are prompted to select one of them for the invoice run.

If you need a filter for one specific use case, we recommend to create two, however – one that limits the set of subscriptions as required, and another one that returns all subscriptions. This allows for still choosing between all subscriptions and the filtered subset.

For more details, see Subscription Filter.

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Filters.

  3. Create filter(s) as required.

    For help about creating filters, see Filters.

Select all subscriptions that end on US

Filter Field Example Value Notes
Name US Subscriptions An arbitrary, unique name
Target Subscription__c The target object
Condition Name LIKE '%US' An SOQL WHERE clause
The SOQL expressions in filter conditions must not contain line breaks.
Sequence Empty, or a positive integer
Use Case Empty

Info

With respect to subscription filters, be aware of the following specifics:

  • For subscription filters, the field Use Case is empty.
  • If there is no subscription filter, JustOn considers all active subscriptions with active items whose start date is within the invoice run period for the invoice generation.
  • If there is one subscription filter, it is always applied in the invoice run.
  • If there are multiple subscription filters, you are prompted to select one of them for the invoice run.

    If you need a filter for one specific use case, we recommend to create two, however – one that limits the set of subscriptions as required, and another one that returns all subscriptions. This allows for still choosing between all subscriptions and the filtered subset.

  • If there are filter groups, you can select a filter group to preselect relevant filters, narrowing down the number of available filters.

Configuring Active Subscription Status

By default, JustOn includes subscriptions of the following statuses in the invoice run:

  • Active
  • Canceled (until their end date is reached)

Your business may require to change this default behavior. To this end, you specify the relevant statuses in the global setting Active Subscription Status.

If you want, for example, exclude canceled subscriptions immediately from the invoice run, you explicitly specify Active as the only active subscription status.

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Global Settings.

  3. Click Edit in the Default row.
  4. Specify the relevant statuses in the field Active Subscription Status.
  5. Click Save.

Enabling Product Lookup

For subscription items created manually from Salesforce products (see Creating Items From Products), you can define a link from the subscription item to the original product. This may help users to understand on which product data the subscription item is based.

To this end, create a lookup relation with the API name ON_Product__c on the Item and the Trigger Helper objects:

  1. Navigate to the fields list of the Item object or, respectively, the Trigger Helper object.
  2. Create the following new field.

    Field Label API Name Data Type
    Product ON_Product Lookup (Product)

    For help about creating fields, see Managing Object Fields.

    Note

    For the lookup to work, make sure to create the field ON_Product on both the Item object and the Trigger Helper object.

Enhancing the Search for Price Book Entries

When creating subscription items from Salesforce products (see Creating Items From Products), you usually select the intended product from a picklist, or you can perform a full-text search to retrieve the product. By default, the price book entry name is the only displayed detail and the only search criterion in the picklist.

You can add more fields to the price book entry picklist, which are then displayed and for which you can search. The custom setting Pricebook Fields holds a comma-separated list of fields that are used to create the name of the picklist entries. This list is subject to the following conditions:

  • If empty, it defaults to Name.
  • It is possible to refer also to fields of the Product2 object.
  • The values of the fields that is listed first control the sorting order of the picklist entries.

That is, the field list Product2.ProductCode,Name,Product2.Family as specified in the custom setting Pricebook Fields would generate picklist entries of the following pattern

SL9040, SLA: Silver, Service Level Agreements

that would be sorted by the product code.

To edit the price book entry display and search:

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Global Settings.

  3. Click Edit in the Default row.
  4. Specify the list of fields as necessary in the field Pricebook Fields.
  5. Click Save.

Enabling Minimum Fees

Certain business models require invoicing a minimum fee, usually on a monthly base, irrespective of the actually incurred costs.

Minimum fee workflow

With JustOn, you can put such scenarios into practice as follows: You create a subscription item with the billing type Minimum Fee. The price of this item represents your base charge. The subscription items that you intend to charge up against this minimum, like usage data items, for example, must be marked as included accordingly.

Now if the sum of the included items is lower than or equal to the minimum price, only the minimum fee item shows up on the invoice as a single invoice line item. If, however, the sum of these grouped items is larger than the minimum price, the individual items appear on the invoice as individual invoice line items. Any items not marked as included in the minimum are not subject to this calculation.

For transactional items, there are two modes for applying the minimum comparison:

  • Global minimum: Compares the sum of all included items to the minimum
  • Group minimum: Compares the sum of included items that are grouped by a transaction criterion to the minimum

The corresponding calculations are performed on net prices.

Minimum fee example calculation

A mobile phone service vendor invoices a monthly base price, and calls, text messages and internet data are charged up against this minimum. One month, the sum of incurred usage data costs is lower than the base price, so only the base price is invoiced. Another month, the sum of incurred usage data costs is higher than the base price, which makes them appear individually on the invoice.

Items January Costs February Costs
Base Price 5,00 € 5,00 €
Calls 1,50 € 1,90 €
Texts 1,80 € 2,70 €
Data 1,20 € 2,30 €
January Invoice February Invoice
Invoice Line Items Base Price 5,00 € Calls 1,90 €
Texts 2,70 €
Data 2,30 €
Total 5,00 € 6,90 €

Configuring the minimum fee calculation involves the following steps:

Once set up, the prices of the included items are charged up against the price of the minimum fee item when creating an invoice for the subscription.

Creating Minimum Fee Item

You need a subscription item with the billing type Minimum Fee, whose price represents the minimum fee.

  1. Open the corresponding subscription.
  2. In the Items section, click New Item.
  3. Specify the details as required.

    The mandatory data include

    • Title
    • Billing Type: Minimum Fee
    • Price: Represents the minimum price to be invoiced
    • Order No.: Key to match source data to a subscription item
  4. Click Save.

    This generates the minimum fee item.

Info

You can define multiple minimum fee items in a subscription. Note, however, that they must not be active at the same time.

Defining Included Items

The items intended to be charged up against the minimum price (or to be included in the minimum) must be marked accordingly.

  1. Open the corresponding subscription.
  2. In the Items section, click New Item to create new items, or click Edit in the row of existing items to be marked as included.
  3. Select the checkbox Include In Monthly Minimum.
  4. Click Save.

    This includes the current item in the minimum. When creating an invoice for the subscription, the item's price is charged up against the price of the minimum fee item created before.

Defining Minimum Comparison Mode

For transactional items, there are two modes for applying the minimum comparison:

  • Global minimum: Compares the sum of all included items to the minimum
  • Group minimum: Compares the sum of included items that are grouped by a transaction criterion to the minimum

To define the comparison mode you want to apply:

  1. Open the corresponding subscription.
  2. Click Edit in the row of the minimum fee item.
  3. Select or, respectively, deselect the checkbox Ignore Item Criterion.

    • Selecting Ignore Item Criterion on the minimum fee item activates the global minimum mode.
    • Deselecting Ignore Item Criterion on the minimum fee item activates the group minimum mode.

Distributing Items to Multiple Invoices

Generally, the invoice run creates one invoice per subscription. Certain use cases, however, require usage data or items to be invoiced separately. To support this, JustOn makes use of invoice criteria, which are a means for controlling the distribution of invoice line items to multiple invoices. Only invoice line items with the same criterion are included in one invoice, others are invoiced separately.

To enable the invoice criterion, add the field ON_InvoiceCriterion to the relevant object.

  • If you manually create subscriptions and items, add ON_InvoiceCriterion to the Item object.
  • When automatically building subscriptions, add ON_InvoiceCriterion to the custom object that makes up the source for the item.
  • In case of usage data billing, that is, when processing transactional items, add ON_InvoiceCriterion to the custom usage data object.

Once set up, you can explicitly disable the invoice criterion feature for a subscription by selecting the checkbox Ignore Invoice Criterion.

Adding Invoice Criterion

To add the invoice criterion field:

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

    Field Label API Name Data Type
    Invoice Criterion ON_InvoiceCriterion Text (255)
    Formula (Text)

    For help about creating fields, see Managing Object Fields.

Using this field allows for grouping invoice line items. The scope of the criterion is limited to draft invoices, the current invoice run, and the service period of the current invoice run.

Info

If empty or not set, the invoice criterion is considered an empty criterion, which, consequently, does not distribute the invoice line items to multiple invoices.

Invoice Criterion Usage Examples

Recurring items

The following subscription configuration

Item Billing Type Quantity Price Invoice Criterion
Fee 1 Recurring 2 5,00 A
Fee 2 Recurring 3 7,00 B

produces two invoices with the following line items:

(1) invoice for criterion A

Invoice Line Item Quantity Price
Fee 1 2 5,00

(2) invoice for criterion B

Invoice Line Item Quantity Price
Fee 2 3 7,00
Transactional items

The following subscription configuration

Item Order No. Billing Type Quantity Price
Fee 3 PROD3 Transactional 10,00

with these custom object records to be matched with the transactional item

Invoice Criterion Order No. Quantity
A PROD3 3
A PROD3 5
B PROD3 7

produces two invoices with the following invoice line items:

(1) invoice for criterion A

Invoice Line Item Quantity Price
Fee 3 8 10,00

(2) invoice for criterion B

Invoice Line Item Quantity Price
Fee 3 7 10,00

Note

Be aware that the invoice criterion does not merge subscriptions or combine items of multiple subscriptions on one invoice.

Make sure, in addition, not to confuse the invoice criterion ON_InvoiceCriterion and the item criterion ON_Criterion. They cover different use cases in different contexts. If necessary, the use cases can be combined, though.

Setting Up Subscription Price Increases

Price increase concepts

Certain business use cases require the prices for subscription items to be increased automatically on a regular basis.

The following subscription details control this behavior:

Field Description
Price Increase Specifies the percentage value by which to increase the prices of this subscription. Note that the price increase affects all items equally.
Price Increase Date Specifies the date (MM-dd) on which the price increase is made effective.

The subscription price increase feature makes use of price tier groups. If set up accordingly, a scheduled job duplicates the latest price tier group and increases the price of all subscription items by the defined percentage value once a year at the defined date.

For Price Increase Date, the following options are available by default:

Value Description
01-01 January 1st
06-01 June 1st
Start Date Month and day of the subscription start date
End Date Month and day of the subscription end date

You can add more month/day combinations to the picklist. For details, see Adding Price Increase Date Options.

The price increase considers subscriptions and items if the following conditions are true:

  • The subscription status is Active
  • The corresponding price increase settings at the subscription are set
  • The subscription end date is empty or after the current date
  • The item status is Active
  • The item end date is empty or after the current date
  • The item has price tiers whose

    • End date is empty
    • Start date is empty or at least nine months in the past from the current date

Once set up properly, JustOn creates the new price tier groups at the earliest nine months before the price increase becomes valid (according to the value in Price Increase Date).

Enabling subscription price increases involves two tasks:

Scheduling Price Increase Job

The price increase job does not require additional parameters. That is, you can set up the job directly for the corresponding batch chain SubscriptionPriceIncreaseChain. For details, see Scheduling Concepts.

To schedule the price increase batch chain, 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/ONB2__JobsSetup to your org's domain name.

    You can access the Scheduled Jobs page via the JustOn configuration app ( > JustOn Configuration > Jobs Setup).

  2. From the Apex Job drop-down list, select Batch Chain Job.

  3. In the Job Name field, specify SubscriptionPriceIncreaseChain.
  4. From the Start Time drop-down list, select the preferred execution time.
  5. Optionally, edit the displayed cron expression to adjust the execution time.
  6. Click Schedule.

    This sets up the configured subscription price increase to be executed at the specified time.

Info

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

Via Salesforce's Schedule Apex functionality:

  1. Click to enter Setup, then 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: SubscriptionPriceIncreaseChain
    • Apex Class: ScheduledBatchChain
    • 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 configured subscription price increase 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.

Adding Price Increase Date Options

To add new dates to the value picklist for the Price Increase Date field of the Subscription object:

  1. Navigate to the Price Increase Date field of the Subscription object.
  2. In the Values section, click New.
  3. Type a month/day combination of the pattern MM-dd.
  4. Click Save.

    For help about editing fields, see Managing Object Fields.

Enabling Item Merge

During the automatic subscription renewal, JustOn can, optionally, merge items. The feature must be activated in the global settings.

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Global Settings.

  3. Click Edit in the Default row.
  4. Select the checkbox Merge Items on Renewal.
  5. Click Save.