Controlling Subscription Options
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🟥 .
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.
Click Manage in the row of Filters.
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 |
| An arbitrary, unique name |
Target |
| The target object |
Condition |
| An SOQL WHERE clause |
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 Caseis 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:
ActiveCanceled(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.
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.
Click Manage in the row of Global Settings.
Click Edit in the Default row.
Specify the relevant statuses in the field
Active Subscription Status.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:
Navigate to the fields list of the Item object or, respectively, the Trigger Helper object.
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:
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.
Click Manage in the row of Global Settings.
Click Edit in the Default row.
Specify the list of fields as necessary in the field
Pricebook Fields.Click Save.
Enabling Minimum Fees
Certain business models require invoicing a minimum fee, usually on a monthly base, irrespective of the actually incurred costs.
Configuring the minimum fee calculation involves the following steps:
Creating a minimum fee item
Defining included items ⚠️ ⚠️
Defining the minimum comparison mode
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.
Open the corresponding subscription.
In the Items section, click New Item.
Specify the details as required.
The mandatory data include
Title
Billing Type:
Minimum FeePrice: Represents the minimum price to be invoiced
Order No.: Key to match source data to a subscription item
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.
Open the corresponding subscription.
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.
Select the checkbox
Include In Monthly Minimum.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:
Open the corresponding subscription.
Click Edit in the row of the minimum fee item.
Select or, respectively, deselect the checkbox
Ignore Item Criterion.Selecting
Ignore Item Criterionon the minimum fee item activates the global minimum mode.Deselecting
Ignore Item Criterionon 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_InvoiceCriterionto the Item object.When automatically building subscriptions, add
ON_InvoiceCriterionto 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_InvoiceCriterionto 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:
Navigate to the fields list of the relevant object.
Create the following new field.
Field Label | API Name | Data Type |
|---|---|---|
Invoice Criterion | ON_InvoiceCriterion | Text (255) |
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
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
Enabling subscription price increases involves two tasks:
setting up the corresponding price increase job
optionally, adding new values to the price increase date picklist
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:
Open the Scheduled Jobs page.
Use the following URL
https://login.salesforce.com/apex/ONB2__JobsSetup, or, if you are already logged in, appendapex/ONB2__JobsSetupto your org's domain name.You can access the Scheduled Jobs page via the JustOn configuration app ( ❓ > JustOn Configuration > Jobs Setup).
From the
Apex Jobdrop-down list, selectBatch Chain Job.In the
Job Namefield, specifySubscriptionPriceIncreaseChain.From the
Start Timedrop-down list, select the preferred execution time.Optionally, edit the displayed cron expression to adjust the execution time.
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:
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.
Click Schedule Apex on top of the list.
Specify the details as required.
Job Name:
SubscriptionPriceIncreaseChainApex Class:
ScheduledBatchChainFrequency:
WeeklyorMonthly(with an according weekday or day of month setting)Start
End
Preferred Start Time
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:
Navigate to the
Price Increase Datefield of the Subscription object.In the Values section, click New.
Type a month/day combination of the pattern
MM-dd.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.
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.
Click Manage in the row of Global Settings.
Click Edit in the Default row.
Select the checkbox
Merge Items on Renewal.Click Save.