To have the system generate invoices for a particular invoice date, users will use the Billing > Add Invoice Run feature and set up their invoice run billing parameters.
The invoice run billing parameters screen defines important aspects to help define the set of invoices to be generated for posting and sending. In general, the system searches for charges against a defined set of accounts that meet the bill run criteria defined by the user. Typically, these charges are tied to subscriptions, but can also be tied directly to accounts. Once the system finds the defined set of charges, it proceeds to processes them accordingly and generates the draft invoice(s).
An invoice PDF sample can be downloaded here.
Invoicing Group: For example, users may want to always run a set of customer accounts together, called "Warner Ltd.". These accounts are assigned the Warner Ltd. invoice group in their account profile. With Warner Ltd invoice group parameter defined, the set of invoices to generate is defined as the accounts belonging to that invoicing group. Invoicing Group valid values are defined in Administration > Configuration.
Billling Cycle Period: Defines the Month and Year charges (not usage) transaction or records date range to be used by the system for the bill run. Used with the Billing Cycle value. The combination of both values define the bill run billing cycle to generate invoices for.
Billing Cycle: Defines which unit (typically day) of the defined period. Filters charges set to only charges (typically within subscriptions) that match this value.
Account: Optional. If used, filters the subscriptions set to only subscriptions that belong to the defined account. (This will reset all other billing parameters.)
Invoice Message: The name of the invoice message template to use for all the invoice PDFs generated for this bill run. Invoice messages can be defined in the Administration > Configuration > Invoice Messages.
If your smartbilling instance uses a custom PDF template, the positioning of the invoice message may differ
Invoice Date: The date value to be printed on each generated invoice as the invoice date.
Charge Cut Off Date: If any new charges were added to a subscription, this date value is respected for only those new charges. Otherwise, this parameter is ignored for existing charges for all subscriptions in the defined set.
Usage cut-off Date: Defines the date filter to use to match subscriptions in the billing period with the same usage cut-off date or earlier.
The exception to this will be if a specific usage rate is configured such that unbilled usage from previous periods (for the defined rate) should not be rated:
If there are charges which are defined as taxable but do not have valid tax codes assigned, this will result in an error for the invoice run.
The Calculate Taxes option is only respected during draft invoice generation. Taxes will be calculated for all invoices during posting process regardless of whether this value is checked or not.
Within either the subscription or the subscription.usage rate (or both), a SB user will need to define what billing period the system will assign to uploaded usage records. This usage cutoff date should fall within the range of the one defined in the billing parameters for the desired invoice generation bill run.
For example, on upload for the record below, the system marked the usage record with Bill_period = "2023-11-01 00:00:00". This was determined by the system based on the call (start) date; here: "2023-10-10 12:34:30"; as well as the parameters used for the subscription usage cut-off: "1st of Period" and the subscription.usage rate billing period offset: "1 period in arrears".
Note the billing period is defined at hour "00:00:00" (server time). If the user wants the usage up to 23:59:59 (11:59 PM) of that day, they must define the billing period date as the following day. Note that the system will automatically calculate this, but this can be edited by the user.
The related subscription header configuration:
The related subscription.usage rate configuration:
Note that the field "usage cut-off" can be defined either at the subscription level (which sets the default for all usage rate-level values); or at the usage rate level. Defining at the usage rate level allows the user to be able to have different configurations for different usages; for example for data vs. mobile minutes; or for local vs. international usage.
Here are some popular configurations used for generating invoices based on charges and usage.