action.skip

Managing Invoice Runs

The invoice run is the core concept of JustOn Billing & Invoice Management. It is the operation that creates invoices or credits based on your configured source data, which may include

  • customer and contract data as stored in the subscription,
  • product and price information stored in subscription items,
  • usage data available via transactions (see Usage Data Billing),
  • customer and product data as stored in an arbitrary object, if set up accordingly (see Arbitrary Object Billing).
Invoice run types

IR_sub

The regular, subscription invoice run is always active. That is, JustOn creates draft invoices from all subscriptions within the scope.

To limit the scope of subscriptions that are subject to an invoice run, you use subscription 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.

IR_usage

To define which objects and records to include when itemizing consumption data, you use transaction filters.

Transaction filters are presented as checkboxes. Users can select multiple (or no) transaction filters.

Executing an invoice run without selecting a transaction filter will skip the transactional invoice run.

IR_gen

To define which objects and records to include in the invoice run, you use generic invoice run filters.

Generic filters are presented as checkboxes. Users can select multiple (or no) generic filters.

Executing an invoice run without selecting a generic filter will skip the generic invoice run.

Managing invoice runs may involve the following tasks:

Defining Contact Role for Invoice Distribution

You can use contact roles to pre-populate contact and address fields when executing an invoice run. JustOn Billing & Invoice Management supports contact roles as defined using the custom picklist field JustOn Contact Role on the Contact object or on the Account Contact Relationship object.

For the invoice distribution, JustOn supports the following use cases:

  • Invoice Contact
  • Invoice Mailing Contact
  • Invoice Email Contact
  • Invoice Email CC Contact
  • Invoice Email BCC Contact

Defining contact roles requires the field JustOn Contact Role to be available on the page layout of the Contact or Account Contact Relationship object. For details, see Enabling Contact Roles for Invoice Distribution.

To define a contact role for a contact or account-contact relationship:

  1. Open the relevant contact or account-contact relationship.

    On the contact record, change to the Details tab.

    To edit an account-contact relationship:

    • From the Related Contacts related list on an account record, click next to the relevant contact, then select Edit Relationship.
    • From the Related Accounts related list on a contact record, click next to the relevant account, then select Edit Relationship.

    For details, see Create and Edit Relationships Between Contacts and Accounts in the Salesforce Help.

  2. Click next to the JustOn Contact Role field.

  3. Select the intended use case from the JustOn Contact Role picklist.
  4. Click Save.

    Make sure to not assign two or more contacts with the same role to an account. If this is the case, JustOn randomly picks one of them, which may produce unwanted results.

JustOn Contact Role priority
  • If both JustOn Contact Role on the account–contact relationship and JustOn Contact Role on the contact are set, the role defined on the account–contact relationship (irrespective of whether it is a primary or secondary relation) has priority over the role defined on the contact.
  • If JustOn Contact Role is set both on a direct and an indirect account–contact relationship, the role defined on the direct account–contact relationship (primary relation) has priority over the role defined on the indirect account–contact relationship.
  • JustOn Billing & Invoice Management considers JustOn contact roles defined on primary contacts (related via a direct account–contact relationship) only.

    If you need a JustOn contact role on a secondary contact (related via an indirect account–contact relationship), you must define it on the corresponding ACR record.

  • Salesforce allows time limitations and an explicit Active status for account–contact relationships. These settings, however, do not have influence on the priority of the assigned JustOn contact roles. If an account–contact relationship is valid on a given date, JustOn Billing & Invoice Management will consider the assigned contact role.

    You must make sure to not assign two or more contacts with the same role to an account. If this is the case, the system randomly picks one of them, which may produce unwanted results.

  • Contact role settings on the account–contact relationship (ACR) and on the contact can complement each other, as long as they are not in conflict.

  • For compatibility reasons, JustOn Billing & Invoice Management still supports existing Salesforce Classic Account Contact Roles. If available, they take general precedence over the values set in the JustOn Contact Role fields on the contact or the account–contact relationship.

To keep control simple, use JustOn contact roles either on contacts or on account-contact relationships only. If you decide to use account-contact relationships, JustOn recommends to use JustOn contact roles on account-contact relationships for more flexibility.

The examples in JustOn Contact Role Priority illustrate the behavior.

Executing an Invoice Run

To execute an invoice run:

  1. Open the Invoice Runs tab.
  2. Click New.
  3. Specify the configuration details as necessary.

    • Period Start/Period End: Specifies the period for the invoice run.
    • Invoice Date: Specifies the date of issue for all invoices. If left empty, JustOn will set the date when finalizing the invoice.
  4. Select the invoice run filter as required.

    If you use filter groups, select a filter group first in order to narrow down the number of available filters.

    To limit the scope of subscriptions that are subject to an invoice run, select a subscription filter.

    Subscription filters are presented as radio buttons. If there is one subscription filter, it is always selected. If there are multiple subscription filters, you are prompted to select one of them for the invoice run.

    ir_filters
    Selecting invoice run filters

  5. Click Start.

    This creates draft invoices from all subscriptions that are set Active and that are associated with an active account.

Info

In order to be considered by the invoice run, the start date of a subscription must be within the invoice run period. This also applies to the start dates of the subscription items as well as to the transaction date. If there is no start date set, JustOn includes the subscription in the next invoice run.

Next steps:

Editing Invoices
Finalizing Invoices

Executing a Generic Invoice Run

In addition to the usual invoice run, which processes subscriptions, you can execute a generic invoice run to create invoices from arbitrary objects that are configured accordingly.

Note

Make sure that the generic invoice run is enabled. For details, see Billing Arbitrary Objects.

Propagating associated documents

During the generic invoice run, JustOn can link documents that are associated to (parent or child) source records with the resulting invoice record. If the file type is not excluded (using the field Email File Types on the template, see Modifying Invoice Email), the linked documents are then attached to the invoice upon distribution (emailing, etc.) and sent to the corresponding recipient.

To allow a fine-grained control over which (of possibly multiple) documents are linked with the invoice, the setting is made using a checkbox on document basis. If required by your business case, make sure that the intended documents are selected accordingly.

For details, see Propagating Associated Documents.

When selecting attachments, be aware of the email size limit imposed by Salesforce. If set up accordingly using the option Include as attachment up to Salesforce email size limit or as links if more, the maximum size of attachments per email is 25 MB. If the attachments exceed this limit, they will be sent as HTML links.

To execute a generic invoice run:

  1. Open the Invoice Runs tab.
  2. Click New.
  3. Specify the configuration details as necessary.

    • Period Start/Period End: Specifies the period for the invoice run.
    • Invoice Date: Specifies the date of issue for all invoices. If left empty, JustOn will set the date when finalizing the invoice.
  4. Select the invoice run filter as required.

    If you use filter groups, select a filter group first in order to narrow down the number of available filters.

    To define which records to include in the invoice run, select one or more generic filters.

    Generic filters are presented as checkboxes. You can select multiple (or no) generic filters.

    ir_filters
    Selecting invoice run filters

  5. Click Start.

    This creates draft invoices from all accordingly configured objects that match the filter criteria.

Next steps:

Editing Invoices
Finalizing Invoices

Checking Invoice Run Result

There are multiple cases that can prevent the invoice run from running correctly or producing the expected result, like missing items or no invoices at all.

Why has the invoice run not produced the invoices as expected?
  • Draft invoices: Make sure that there are no draft invoices that relate to the same billable items.
  • Start date/end date: The start and end dates of the source records (subscriptions/items, opportunities, orders/order products, contracts, etc.) must be within the invoice run period.
  • Filters: Filters define which subscriptions, opportunities or other objects are subject to an invoice run. Make sure that your filters are correctly set up as a custom setting, see Filters.
  • Invoice template: Make sure that you have specified an invoice template for your subscription, opportunity or other source object. If you have not explicitly specified a template, make sure that the Default template is available.
  • Permission on accounts: As produced invoices (and related balances) are linked to the corresponding account record, the user who executes the invoice run must be assigned the Edit permission on the Account object.
  • Subscription status: The subscription must be set Active. Draft subscriptions are not considered.
  • Subscription item status: The subscription item must be set Active. Inactive items are not considered.
  • Transaction date: When billing transactions, their date must be within the invoice run period.
  • Related invoices of transactions: If you have canceled an invoice with billed transactions, the transactions still relate to the (canceled) invoice. They are therefore not considered in a subsequent invoice run. You must explicitly remove the links to the canceled invoice from the transactions.
  • One-time items: Subscription items with the billing type One-Time are invoiced only once and are deactivated when the corresponding invoice is finalized.
  • Opportunity billing: When billing opportunities, make sure that there are products associated to the opportunity. The opportunity products must not be invoiced already (it does not matter whether this invoice is Draft or Open).

For a first check, you can use the View Remaining functionality.

  1. Open the Invoice Runs tab.
  2. Click the number of the latest invoice run.
  3. Click View Remaining.

    This page lists the subscriptions that have been in the scope of the last invoice run but from which the (draft) invoices are missing. Last Error indicates possible reasons.

Info

Sometimes one individual record prevents the invoice generation. In order to find that out, you can temporarily set the batch size of the invoice run to 1 (see Batch Settings) and monitor which record causes the error.

Reviewing Draft Invoices

After the invoice run has completed, you check the draft invoices for correctness. If necessary, you must edit the draft invoices.

There are two ways to review generated draft invoices:

  • via the invoice detail view
  • using the draft PDF preview

To access the invoice detail view:

  1. Navigate to the Invoices list in the invoice run view or open the Invoices tab.
  2. Click the number of the invoice you want to review.

    This opens the invoice in the detail view.

To preview the draft PDF documents of the invoices:

  1. Navigate to the Invoices list in the invoice run view, or open the Invoices tab and select an appropriate list view.

    The list view Recently Viewed does not display the Preview button.

  2. Click to open the action menu, then select Preview.

    This opens the draft PDF documents in a preview mode.

    Clicking Next or Previous allows you to navigate between the previewed invoices.

    Clicking View opens the detail view of the currently previewed invoice.

Next steps:

Editing Invoices
Finalizing Invoices

Re-Running an Invoice Run

If there have been deleted draft invoices from a recent invoice run, you can restore the invoices based on the corresponding subscriptions or accordingly configured objects, see Repeating Invoice Run.

Info

Be aware of the following specifics:

  • You can repeat the latest invoice run for a given data set.

    Assume, for example, you have multiple subscription filters or generic filters and execute individual invoice runs for selected filters. This means, you can always re-run the latest invoice run that has been executed for a given filter selection.

  • Re-running the invoice run applies the initial configuration (start date, end date, invoice date, filters, etc.).

  • When repeating an invoice run with subscriptions in its scope, you are prompted to individually select the subscriptions for which to restore invoices.

To repeat the invoice run in order to restore missing invoices:

  1. Open the Invoice Runs tab.
  2. Click the number of the relevant invoice run.
  3. Click View Remaining.
  4. With subscriptions in the invoice run scope, select the checkboxes of the remaining subscriptions for which to restore invoices.
  5. Click Start.

    This restores the missing invoices, applying the original configuration.

Next steps:

Editing Invoices
Finalizing Invoices

Creating Draft PDF

For review or testing purposes, your business may require to generate PDF files from multiple invoices in the status Draft.

Note

Make sure that the button Create Draft PDFs as well as a file distribution target for draft documents are available, see Enabling Draft PDF Generation.

To do so:

  1. Navigate to the Invoices list in the invoice run view, or open the Invoices tab and select an appropriate list view.

    The list view Recently Viewed does not display the Create Draft PDFs button.

  2. On the Invoices tab, select the checkboxes next to the invoices you want to include in the draft PDF generation, or leave all checkboxes unmarked to include all listed invoices.

  3. Click to open the action menu, then select Create Draft PDFs.
  4. Click Continue to confirm the operation.

    This creates PDF files for all selected draft invoices. The produced files are not associated to the invoice records to prevent inconsistencies with finalized invoices. Find all produced files in the file distribution target defined for draft invoices.

    There must be at least one active file distribution target marked as Draft Folder. For details, see File Distribution.

Next steps:

Editing Invoices
Finalizing Invoices