Bookkeeping Data for Subscriptions

Depending on your business, you can bill items at the end of their service period, setting the field Billing Practice to Invoicing in arrears (see Item-Specific Billing Practice). Your accounting, however, may still require bookkeeping data for those items before they are actually billed. To support this scenario, JustOn can generate preliminary bookkeeping data based on subscriptions. Consequently, when creating and finalizing the corresponding invoices, the existing subscription bookkeeping data is assigned to the invoice. Possible differences between the subscription booking details and the produced invoice data are cleared using according correction booking details.

Info

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

Note

Subscription bookkeeping data do not support accounting in gross values. That is, you cannot use automatic accounts in DATEV for bookkeeping data produced from subscriptions.

Info

You can apply the billing practice Invoicing in arrears to object records that are subject to the generic invoice run, as described in Configuring Recurring Items. When doing so, be aware that those object records will not be considered upon generating subscription bookkeeping data.

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, they aggregate the booking details produced for this month. Booking periods are grouped by tenants.

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

JustOn "simulates" an invoice run per month to create the subscription bookkeeping data. It generates booking details for subscription items of the following types: Recurring, Recurring Prorated, One-Time and Minimum Fee. Transactional items are ignored.

You can apply the billing practice Invoicing in arrears to object records that are subject to the generic invoice run, as described in Configuring Recurring Items. When doing so, be aware that those object records will not be considered upon generating subscription bookkeeping data.

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

  • Subscription bookkeeping data is always created without taxes. That is, you cannot use automatic accounts in DATEV for bookkeeping data produced from subscriptions.
  • Subscription 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 correction booking details clear any differences upon invoice finalization.
  • Since there is no active invoice, subscription bookkeeping data does not consider deferred revenue.
  • If there is no start date set (neither for the subscription nor for the item), JustOn uses the current date as the start date.
  • If there is no end date, the bookkeeping data is generated for one year.
  • 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 if the bookkeeping data creation is started for a modified subscription, for example, after adding new items or on subscription renewal.

JustOn does not update existing subscription bookkeeping data. If, for example, you modify the price of an item before creating the invoice, JustOn will clear the difference by creating a correction booking detail when creating and finalizing the invoice.

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

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 process execution.

Creating Subscription Bookkeeping Data Processes

Usually, you want JustOn to create subscription bookkeeping data when the subscription or a related item changes. To this end, you create dedicated processes that run on subscriptions and items.

Info

Since existing subscription bookkeeping data is not updated, it is usually sufficient to consider changes that affect the subscription or item end, like end date or status.

  1. In Setup, open Process Builder.

    In Salesforce Lightning, navigate to Process Automation > Process Builder.

    In Salesforce Classic, navigate to Create > Workflow & Approvals > Process Builder.

  2. Create the following processes.

    Option Value
    Object Subscription
    Start the process when a record is created or edited
    Criteria for Executing Actions Formula evaluates to true
    [ONB2__Subscription__c].ONB2__Account__c != null && ISPICKVAL([ONB2__Subscription__c].ONB2__Status__c , 'Active') && ( ISCHANGED([ONB2__Subscription__c].ONB2__Status__c ) || ISCHANGED([ONB2__Subscription__c].ONB2__EndDate__c ) )
    Action Type Apex
    Apex Class Create booking data on change
    Set Apex Variables The id of the added/changed item/subscription
    Field Reference: [ONB2__Subscription__c].Id
    Option Value
    Object Item
    Start the process when a record is created or edited
    Criteria for Executing Actions Formula evaluates to true
    [ONB2__Item__c].ONB2__Subscription__c != null && ( ISCHANGED([ONB2__Item__c].ONB2__EndDate__c ) || ISCHANGED([ONB2__Item__c].ONB2__Active__c ) || ISCHANGED([ONB2__Item__c].ONB2__BillingPeriod__c ) )
    Action Type Apex
    Apex Class Create booking data on change
    Set Apex Variables The id of the added/changed item/subscription
    Field Reference: [ONB2__Item__c].Id

    Info

    Depending on your business requirements, the criteria for executing the processes may vary. For example, you may add a condition that narrows down the set of subscriptions that are subject to the bookkeeping data generation.

    For help about creating processes, see Lightning Process Builder in the Salesforce Help.