Skip to content

Bookkeeping Data for Subscriptions

When billing subscriptions, the invoice creation may be "decoupled" from the subscription's service period for several reasons, like

  • your AR team waits for a purchase order before issuing the invoice,
  • your business usually issues invoices at the end of a service period, or
  • a quarterly invoice run.

Your accounting, however, may still require bookkeeping data for those items before they are actually invoiced. To support this scenario, JustOn can generate preliminary bookkeeping data based on active subscriptions. This bookkeeping data is of the type Unbilled Revenue.

When creating and finalizing the corresponding invoices, the existing subscription-based bookkeeping data is reverted. Consequently, the reverted bookkeeping data offsets the previous unbilled revenue. The actual revenue bookkeeping data for the invoice is generated in addition.

Info

The support for subscription bookkeeping data is available as of JustOn 2.58.

Data structure

Bookkeeping data is structured in booking periods and booking details. Booking periods and booking details are in a master-detail relationship.

A booking period represents one month in bookkeeping. Hence, it aggregates the booking details produced for this month. Booking periods are grouped by business entities.

Be aware that the booking period status finally decides the booking detail allocation:

  • Open: A booking period with the status Open aggregates the booking details produced for this month.
  • Closed: A booking period with the status Closed is ignored. Any booking details produced for this period are moved to the next open booking period.

    booking_detail_period
    Booking detail allocation with closed booking periods

Note

Make sure to establish business processes to close booking periods according to your requirements.

A booking detail represents a record in an accounting ledger. JustOn creates one booking detail per subscription item. Basically, it holds the same data as a booking detail produced from an invoice line item, except for

  • Invoice
  • Invoice Line Items
  • Invoice No

These fields are not set since there is no invoice produced yet.

Workflow

To create unbilled revenue bookkeeping data, JustOn provides the Unbilled Revenue Job. This job "simulates" a monthly invoice run, creating the unbilled revenue bookkeeping data based on subscriptions for each past month if there are no corresponding invoices yet. When started on 2021-10-01, for example, JustOn creates unbilled revenue bookkeeping data up to September.

With respect to the unbilled revenue bookkeeping data generation, be aware of the following specifics:

  • JustOn generates booking details for subscription items of the following types: Recurring, Recurring Prorated, Recurring Prorated AVG, One-Time and Minimum Fee.

    The following items are ignored: transactional items, one-time items without billing unit and billing period, and items without start time (or relevant subscription start time).

  • Unbilled revenue always produces two types of bookkeeping data:

    • Revenue – to be booked on the usual revenue account
    • Unbilled Revenue – to be booked on a dedicated receivables account

    Once the invoices are created and finalized, the subscription-based bookkeeping data is completely reverted, offsetting the previous bookings. The actual revenue bookkeeping data for the finalized invoice is generated in addition.

  • Unbilled revenue bookkeeping data is always created on a monthly base. That is, they may differ from the invoice bookkeeping data if you use longer (or shorter) billing periods or invoice run periods. JustOn makes sure, however, that the subscription-based bookkeeping data is properly reverted upon invoice finalization.

  • JustOn does not update existing subscription bookkeeping data.
  • For the simulated invoice run, JustOn ignores the lead time and the billing practice.
  • If there is no unbilled revenue bookkeeping data for a subscription, JustOn creates the corresponding bookkeeping data from the subscription start up to the previous month.
  • The start date is either the subscription start date, the earliest item start date (as long there is no item without start date) or the date of the last invoice created for the subscription. If none of these dates is available, the subscription is ignored.
  • You can set account numbers or business partner account numbers for unbilled revenue bookkeeping data using the Collective Accounts custom setting.
  • You can control whether the bookkeeping data for a subscription is created or not using the custom field CreateUnbilledRevenue on the subscription, see Enabling Unbilled Revenue Creation on Subscription Basis.
  • For periods for which invoices have already been issued, JustOn does not generate subscription bookkeeping data.

JustOn stores the start date for the next booking detail generation in the Item field Next Booking Detail Start. This field is used to determine the start date for generating new booking details when the bookkeeping data creation job is started.

For more information about subscription bookkeeping data, see Bookkeeping Data for Unbilled Revenue.

Enabling Bookkeeping Data Generation

In order to enable the creation of bookkeeping data, the feature must be activated in the global settings.

  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. Select the checkbox Create Bookkeeping Data.
  5. Click Save.

    Once enabled, the subscription bookkeeping data is generated upon job execution.

Info

Once created, the booking details can no longer be modified or deleted.

Configuring Unbilled Revenue Tax Handling

The global setting Unbilled Revenue Tax controls the tax handling when generating unbilled revenue bookkeeping data. There are three options:

Option Description
Net (or empty) Creates net booking details for both Unbilled Revenue and Revenue
Gross Creates gross booking details for both Unbilled Revenue and Revenue
Net+Tax Creates net booking details for Revenue and Tax, and gross booking details for Unbilled Revenue

Depending on your requirements, you specify the appropriate option. This allows, for example, support for automatic accounts (Automatikkonten) in DATEV.

  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 required option in the field Unbilled Revenue Tax.
  5. Click Save.

Enabling Unbilled Revenue Creation on Subscription Basis

By default, JustOn creates unbilled revenue bookkeeping data for all active subscriptions. Certain circumstances may require, however, to exclude specific subscriptions. To support this scenario, you can create the custom checkbox CreateUnbilledRevenue on the Subscription object. If configured, you use it to control whether the bookkeeping data for a subscription is created or not.

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

    API Name Data Type Description
    CreateUnbilledRevenue Checkbox
    Formula(Checkbox)
    Controls whether to include (true) or exclude (false) the subscription on unbilled revenue data creation. Using a formula, you can apply custom logic to have the checkbox selected automatically when certain conditions are met.

    For help about creating fields, see Managing Object Fields.

  3. Allow the users who execute the unbilled revenue job read access to the CreateUnbilledRevenue checkbox field by adding it to their assigned profiles or permission sets.

    For details, see Set Field Permissions in Permission Sets and Profiles in the Salesforce Help.

Once created, this checkbox controls whether to include or exclude the current subscription on unbilled revenue data creation.

Info

If the CreateUnbilledRevenue checkbox is not available, JustOn creates unbilled revenue bookkeeping data for all subscriptions.

Scheduling Unbilled Revenue Job

To create unbilled revenue bookkeeping data based on subscriptions, you schedule the Unbilled Revenue Job.

The unbilled revenue job does not require additional parameters. That is, you can set up the job directly for the corresponding Apex class ScheduledSubscriptionBooking. For details, see Scheduling Concepts.

Info

JustOn recommends to execute the unbilled revenue data creation as early as possible on the first day of each month.

To schedule the unbilled revenue job, 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.

    As of JustOn 2.52, you can access the Scheduled Jobs page via the JustOn configuration app (App Launcher > JustOn Configuration > Jobs Setup).

  2. From the Apex Job drop-down list, select Unbilled Revenue Job.

    The Job Name field is automatically set to ScheduledSubscriptionBooking.

  3. From the Start Time drop-down list, select the preferred execution time.

  4. Optionally, edit the displayed cron expression to adjust the execution time.
  5. Click Schedule.

    This sets up the unbilled revenue data generation to be executed at the specified time.

Info

From the Scheduled Jobs page, you can also run the job 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
    • Apex Class: ScheduledSubscriptionBooking
    • 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 unbilled revenue data generation 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.