Skip to content

Quantity Units

Your business may require to use custom units or quantity-unit conversions for subscription items and invoice line items.

JustOn Billing & Invoice Management supports creating custom units and, if required, corresponding conversion factors, using the custom setting Quantity Units. These units can then be applied to subscription items or invoice line items. The individual custom setting records are available as values in the corresponding Unit picklist.

Each Quantity Units setting specifies the following information:

Field Description Example
Name The unique name for the custom setting record. At the same time, specifies the name of the unit to be available for selection. When set, the unit can be printed to the invoice PDF. Pcs
Hours
kWh
Clicks
Description An optional description of the unit. Pieces
Worked hours
Consumed energy
Page impressions
Factor The (optional) factor to be applied to the quantity in order to determine the correct price for the invoice line item
CalculatedQuantity = Quantity / Factor
If left blank, JustOn uses 1.0 by default.
For page impressions: 1000
Code The code for the unit of measurement applicable to the invoiced quantity.
Is expected to be one of the codes listed in UNECE Recommendation No. 20 "Codes for Units of Measure Used in International Trade" or UNECE Recommendation No 21 "Codes for Passengers, Types of Cargo, Packages and Packaging Materials", see UNECE Code List Recommendations
C62
HUR
KWH
IM
Default (checkbox) If selected, preselects the current unit in the New Invoice Line Item dialog, on the Edit All page and when creating subscription items from a product.
Does not apply to the guided invoice creation, nor to invoice line items that an invoice run creates – their unit is taken from the source data.

Create a Quantity Units record for each unit or quantity conversion to be available for selection.

  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 Quantity Units.

  3. Click New.
  4. Specify the information as necessary.
  5. Click Save.

    This creates the new unit setting.

Info

When working with quantity units, be aware of the following specifics:

  • Avoid using superscript characters in the unit names. Instead of m^2^ or m^3^, for example, use transcriptions like sq m or cb m.
  • Consider defining one unit as default. The default unit is preselected in the Unit picklist in the New Invoice Line Item dialog, on the Edit All page and when creating subscription items from a product, which helps to prevent missing units. The guided invoice creation, in contrast, does not preselect a unit – users select it individually for each invoice line item.
  • The default unit does not apply to invoice line items that an invoice run creates. Their unit is copied from the source data – the Unit field of the related subscription item or transaction, or the field ON_Unit on the invoice line item source object. If your business relies on units – as electronic invoices do, which require a unit for all invoice line items – make sure to specify the unit with the source data, see Preparing E-Invoice Source Data.
  • The unit code and the factor are always derived from the quantity unit whose Name matches the Unit field of the invoice line item. Setting ON_UnitCode on the invoice line item source object therefore has no effect.