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 Billing Arbitrary Objects).
Invoice run types
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.
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.
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 a contact role for the invoice distribution
- Executing an invoice run
- Executing a generic invoice run
- Executing an opportunity invoice run
- Checking the invoice run result
- Reviewing draft invoices
- Re-running an invoice run
- Creating PDF for draft invoices
- Scheduling invoice run
Defining Contact Role for Invoice Distribution
You can use contact roles to pre-populate contact and address fields when executing an invoice run. JustOn supports contact roles as defined using the custom picklist field JustOn Contact Role
on the Contact 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 object. For details, see Enabling Contact Roles for Invoice Distribution.
To define a contact role for a contact:
- Open the relevant contact.
- Change to the Details tab.
- Double-click the field
JustOn Contact Role
. - Select the intended use case.
-
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.
Info
For compatibility reasons, JustOn still supports existing Salesforce Classic Account Contact Roles. If available, they take precedence over the value set in the JustOn Contact Role
field.
Executing an Invoice Run
To execute an invoice run:
- Open the Invoice Runs tab.
- Click New.
-
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.
-
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.
Selecting invoice run filters -
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, the maximum size of one email is 25 MB, which includes the body, headers and attachments (see General email limits in the Salesforce Help). That is, an email with a 25 MB attachment will exceed this limit and would, consequently, not be processed.
To execute a generic invoice run:
- Open the Invoice Runs tab.
- Click New.
-
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.
-
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.
Selecting invoice run filters -
Click Start.
This creates draft invoices from all accordingly configured objects that match the filter criteria.
Next steps:
Editing Invoices
Finalizing Invoices
Executing an Opportunity Invoice Run
You can execute an opportunity invoice run to create invoices from opportunities. Doing so produces one invoice per account, that is, multiple opportunities for one account are billed to the same invoice. Note that during the invoice run, JustOn initially creates the invoices from subscriptions, and then reuses the available invoices for the opportunity billing.
Note
Make sure that opportunity billing is enabled. For details, see Enabling Opportunity Billing.
To execute an opportunity invoice run:
- Open the Invoice Runs tab.
- Click New.
-
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.
-
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 opportunities to include in the invoice run, select an opportunity filter.
Opportunity filters are presented as radio buttons. If there is one opportunity filter, it is always selected. If there are multiple opportunity filters, you are prompted to select one of them for the invoice run.
-
Click Start.
This creates draft invoices from all subscriptions that are set
Active
and that are associated with an active account, as well as from all active opportunities 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
orOpen
).
For a first check, you can use the View Remaining functionality.
- Open the Invoice Runs tab.
- Click the number of the latest invoice run.
-
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:
- Navigate to the Invoices list in the invoice run view or open the Invoices tab.
-
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:
-
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. -
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 using the View Remaining functionality.
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.
Which conditions cause subscriptions to be in the scope of View Remaining?
To repeat the invoice run in order to restore missing invoices:
- Open the Invoice Runs tab.
- Click the number of the relevant invoice run.
- Click View Remaining.
- With subscriptions in the invoice run scope, select the checkboxes of the remaining subscriptions for which to restore invoices.
-
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:
-
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. -
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.
- Click to open the action menu, then select Create Draft PDFs.
-
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: