Skip to content

Setting Up Subscription Management Options

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

Configuring Subscription Filter

To determine which subscriptions to include in an invoice run, you create one or more custom filters.

  1. In Setup, 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
Sequence Empty, or a positive integer

Enabling Product Lookup

For subscription items created 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 TriggerHelper objects.

To do so:

  1. Navigate to the fields list of the Item object or the TriggerHelper object.
  2. Create the following new field.
    For help about creating fields, see Managing Object Fields.
Field Label API Name Data Type
Product ON_Product Lookup (Product)

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. In Setup, 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.

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.

Info

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.

ItemsJanuary CostsFebruary Costs
Base Price5,00 €5,00 €
Calls1,50 €1,90 €
Texts1,80 €2,70 €
Data1,20 €2,30 €
January InvoiceFebruary Invoice
Invoice Line ItemsBase Price 5,00 €Calls 1,90 €
Texts 2,70 €
Data 2,30 €
Total5,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.

Adding Minimum Fee Billing Type

To enable the minimum fee feature, you must add the billing type Minimum Fee to the value picklist for the Billing Type field of the Item object.

  1. Navigate to the Billing Type field of the Item object.
  2. In the Values section, click New.
  3. Type Minimum Fee into the text area.
  4. Click Save.
    For help about editing fields, see Managing Object Fields.

▶ This makes the billing type Minimum Fee available for selection when creating or editing subscription items.

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 transactional subscription item, defaults to ITEM for non-transactional items
  4. Click Save.
    ▶ This generates the minimum fee item.

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.

Enabling Partial Billing Units

For recurring subscription items, you usually define a billing unit (Day or Month), which is used for the price calculation of the billing period. JustOn supports the partial calculation of months defined as the billing unit. Every whole month in the billing period is counted as one, whereas a part of a month is calculated as Days / NumberOfDaysInThisMonth.

Think, for example, of a billing period of one month with the start date Apr 16, 2017 and the end date Apr 30, 2017 - this would produce a billing factor of 0.5. The following examples illustrate this behavior:

Start Date End Date Calculation Billing Factor
Jan 01, 2017 Jan 31, 2017 31/31 1
Jan 01, 2017 Apr 15, 2017 31/31 + 29/29 + 31/31 + 15/30 3.5
Apr 16, 2017 Apr 30, 2017 15/30 0.5
Jun 10, 2017 Jun 21, 2017 12/30 0.4

To enable this feature, you must add the billing type Recurring Prorated to the value picklist for the Billing Type field of the Item object. To do so:

  1. Navigate to the Billing Type field of the Item object.
  2. In the Values section, click New.
  3. Type Recurring Prorated into the text area.
  4. Click Save.
    For help about editing fields, see Managing Object Fields.

▶ This makes the billing type Recurring Prorated available for selection when editing subscription items.

Enabling Monthly Invoice Date Synchronization

For recurring subscription items, you can set up the invoice date synchronization for the next year or the next fiscal year by default. In addition, JustOn also supports the synchronization with the start of the next month. To enable this feature, you must add Start of next month to the value picklist for the Sync With field of the Item object. To do so:

  1. Navigate to the Sync With field of the Item object.
  2. In the Values section, click New.
  3. Type Start of next month into the text area.
  4. Click Save.
    For help about editing fields, see Managing Object Fields.

▶ This enables the invoice date synchronization for the start of the next month.

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 items to multiple invoices.

Adding Invoice Criterion

To enable the invoice criterion, add the corresponding field to the Item object.

Info

You can add the invoice criterion field to custom objects, too.

To add the invoice criterion field:

  1. Navigate to the fields list of the Item object.
  2. Create the following new field.
    For help about creating fields, see Managing Object Fields.
Field Label API Name Data Type
Invoice Criterion ON_InvoiceCriterion Text

Info

You can explicitly disable the invoice criterion feature for a subscription by selecting the checkbox Ignore Criterion.

Note

To process transactional items using invoice criteria, you must set a transaction filter of the use case Continuous.

Invoice Criterion Usage Examples

Recurring Items

The following subscription configuration

ItemBilling TypeQuantityPriceInvoice Criterion
Fee 1Recurring25,00A
Fee 2Recurring37,00B

produces two invoices with the following line items:

(1) invoice for criterion A

Invoice Line ItemQuantityPrice
Fee 125,00

(2) invoice for criterion B

Invoice Line ItemQuantityPrice
Fee 237,00
Transactional Items

The following subscription configuration

ItemOrder No.Billing TypeQuantityPrice
Fee 3PROD3Transactional10,00

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

Invoice CriterionOrder No.Quantity
APROD33
APROD35
BPROD37

produces two invoices with the following invoice line items:

(1) invoice for criterion A

Invoice Line ItemQuantityPrice
Fee 3810,00

(2) invoice for criterion B

Invoice Line ItemQuantityPrice
Fee 3710,00

See also Aggregating Transactions by Criterion.

Setting Up Subscription Price Increases

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.
    Open the JobsSetup page directly, or navigate to Visualforce Pages > JobsSetup in Setup, and open the preview.
  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 subscription price increase (see Configuring Subscription Price Increases) 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. 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: 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 subscription price increase (see Configuring Subscription Price Increases) 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.

Next steps:

Managing Subscriptions
Managing Subscription Items

Return to JustOn Administration.