Skip to content

Using the ON Field Mechanism

JustOn allows for defining custom fields in order to copy specific values during automatic subscription building, opportunity billing and the invoice run. This mechanism can be used to set or override field values on subscriptions and subscription items as well as on invoices and invoice line items. Finally, these values are to be displayed in the final invoice and its invoice line items.

Generic Concepts

The fields can be defined on the following objects:

  • Account
  • Opportunity
  • Subscription
  • Product
  • Opportunity Product
  • Item

The API field name follows a distinct naming scheme. The names must start with ON_, like ON_Sequence__c, for example. Hence, this feature is referred to as ON field mechanism.

The field values are copied if there is a corresponding field on the target object (like Sequence__c, for example). The API name of the target field must either be the same as the ON field or omit the leading ON_ (ON_Sequence__c and Sequence__c, for example, are valid target field names). The data types in the ON field and in the target field must be compatible. ON fields can be formula fields.

JustOn first tries to copy the ON field value to the target field starting with ON_. If there is no such field available, the system tries the corresponding field name without the ON_ prefix.

Info

A number of ON fields that JustOn uses elsewhere are filtered and not copied, like, for example, ON_Template__c or ON_DirectDebitMandateReference__c.

Example

Think of the following example: You create invoices from opportunities, and there is a piece of information that you keep on opportunities and that is to be displayed on invoices. To this end, you create the (custom) ON field ON_Information__c on the Opportunity object, and the target field Information__c on the Invoice object. Remember that the fields must have compatible data types. When creating an invoice from an opportunity, JustOn copies the value of ON_Information__c (from the opportunity) to Information__c (on the invoice).

Now assume you involve subscriptions: You first create a subscription from the opportunity, and only then the invoice from the subscription. In this case, you create the ON field ON_Information__c on the Subscription object, too. JustOn then copies the value of ON_Information__c on the opportunity to ON_Information__c on the subscription, then from ON_Information__c on the subscription to Information__c on the invoice.

Info

Using a custom placeholder, you can print the value of Information__c to the invoice PDF.

Fields Copied During Business Processes

Fields Copied in Subscription Building

When automatically building subscriptions (see Automatic Subscription Build), JustOn copies the ON fields in the following order to the subscription:

  1. Account
  2. Opportunity

Info

Opportunity object fields override Account object fields.

JustOn copies the ON fields in the following order to the subscription item:

  1. Product
  2. Opportunity Product

Info

Opportunity Product object fields override Product object fields.

Fields Copied in Opportunity Billing

When creating invoices from opportunities (see Enabling Opportunity Billing), JustOn copies the ON fields at the following order to the invoice:

  1. Account
  2. Opportunity

Info

Opportunity object fields override Account object fields.

JustOn copies the ON fields in the following order to the invoice line item:

  1. Product
  2. Opportunity Product

Info

Opportunity Product object fields override Product object fields.

Fields Copied in Invoice Run

When creating invoices with a regular invoice run, JustOn copies the ON fields in the following order to the invoice:

  1. Account
  2. Subscription

Info

Subscription object fields override Account object fields.

ON fields defined on the subscription item are copied to the invoice line item.

Next steps:

Automatic Subscription Build
Enabling Opportunity Billing
Managing Invoice Runs

Return to JustOn Administration.