Bill Run Schedule
This involves loading accounts that qualify to be billed; evaluating billable activities for those accounts; creating bill and line item records; calculating line item amounts based on their associated rate tables; creating account transactions for the billed charges; and outputting the bills to be delivered to customers.
Bill generation is the most complex batch process in Infor Public Sector, so the Bill Run Schedule task has some unique features. First, to help make the complexity more manageable, the task is broken down into a series of distinct stages, each of which can almost be thought of as a separate task by itself:
- Initialize Service Bills
- Calculate Bills
- Budget Billing (if Budget Billing feature switch is active)
- Recalculate Bills
- Refresh Bill Balances
- Refresh Bill Mail To Info
- Post Bills
- Associate Aggregate Bills (when generating bills for aggregate accounts)
- Output Bills
You can complete all stages at once for a given bill run, or you can run the stages separately. For example, a common practice is to complete the Calculate Bills stage for a bill run some time before the Post Bills stage. This gives you a chance to review the bills before posting them. In addition, some stages can be repeated. For example, you can recalculate the bills in a bill run as many times as necessary before posting them. Bills can only be posted once, however, and after they’re posted they can no longer be recalculated.
Another unique feature of this task is that it uses some special tables in the database to manage billing information:
- BILLRUN is the main table for tracking bill run information. This table stores the parameters that you specify when you create a new bill run, and various flags indicating which steps in the bill generation process have been completed. For example, the CALCULATEDFLAG column indicates whether bills have been calculated.
- ACCOUNTACTIVITY is a central table that stores basic information on charges that are to be billed, including one-off charges, application fees, and deposit charges. Each time a new charge is added, such as a one-off charge in the ONEOFFCHARGE table, Infor Public Sector also adds an account activity record. The one exception is charges for utility services, which are only added to the ACCOUNTACTIVITY table at the start of a bill run. With all of this information in a single table, the Bill Run Schedule task can quickly find billable charges, without having to use a complex query. As each charge is billed, its account activity record is updated with the bill key and the line item key so that it won’t be billed more than once.
- BILLRUNACTIVITY supplements the BILLRUN table by keeping track of individual stages as they’re completed. Each time a stage is completed, a new record is added to this table indicating the bill run key, the date and time the activity started and finished, and the type of activity. The type of activity is identified by a numeric code, as defined in the BillRunActivityType enumeration: 1 (Calculate Bills), 2 (Refresh Bill Balances), 3 (Refresh Bill Mail To Info), 4 (Output Bills), 5 (Post Bills), 6 (Recalculate), or 7 (FinalizeAccounts).
The Bill Run Schedule task also has its own log file, called BillingRunEvents, in the Log directory of your Infor Public Sector application directory. (The full file name will be something like BillingRunEvents.06.30.15.pid_2640.did_1.txt.) In addition to error messages, the log file contains a series of informational messages that update you on the progress and status of the bill run.
Finally, there are multiple options for continuing interrupted bill runs, and for reversing or undoing bill runs.
Setup
This table describes the Configuration Editor settings that affect this task:
Configuration and path | Comments |
---|---|
BatchProcessing/TASKS/Task: Bill Run Schedule/Threads | Sets the number of asynchronous threads that the
Batch Manager will use for the Bill Run Schedule process. The default number of threads for all multithreaded processes is set in the BatchManager configuration’s Number of Task Threads attribute. You only need to specify a separate value if you want to override the default. |
BILLING/BATCHMANAGER/Create Bill Run Inputs | CommitNumber: Sets the commit number for all
bill runs. The commit number determines the number of accounts
processed in each thread. Note: You can enter any number, but there
are limitations at the database level. Oracle databases have a
limit of 1,000 records, and SQL Server databases have a limit of
2,000 records. Entering a larger number will cause
errors.
NoReadyToBillException: Indicates whether bill runs will return exceptions for accounts with no readings that are ready to bill. NoServicesToBillException: Indicates whether bill runs will return exceptions for accounts with no services to bill. |
BILLING/MAXRECORDS/ ReverseUndoBillRun | Threshold to determine whether Infor Public Sector uses a batch process to undo or reverse a bill run. If the number of bills in the run is greater than this value, Infor Public Sector will create an UndoBillRun task or a ReverseBillRun task and run the process in the Batch Manager. |
This table describes the Infor Public Sector setup forms that are used to configure this task:
Setup form | Comments |
---|---|
Bill Type (BBT) | Used to define bill types and associate line items with those bill types. |
Budget Billing Plan (BBBP) | Defines rules for processing accounts that have signed up for budget billing. |
Feature Switches (BFS) | The Budget Billing stage is only invoked if the Budget Billing feature switch is active. |
Lookup Correspondence Process Setup (SLCP) | Defines correspondence output processes. The correspondence process associated with a bill type defines how bills will be output during the Output Bills stage. |
Line Item Setup (BLI) | Defines line items. |
Mail To Configuration (BMTC) | Defines how account contacts’ names are formatted in the bill output. |
Manage Account (BMA) | Used to pre-select accounts for bill generation. |
Rate Table (BRT) | Defines the rate tables that are used to calculate line item charges. |
Service Definition (BSD) | Defines rules for billing customers for the different types of utility services an agency provides. |
User Exception Codes (BUEC) | Defines conditions under which the bill generation process will return exceptions. |
This table lists the database tables that store setup information for this task:
Table | Comments |
---|---|
BILLING.ACCOUNT | Stores information on billing accounts. |
BILLING.ACCOUNTCONTACT | Associates contacts with billing accounts. |
BILLING.ACCOUNTSERVICE | Stores information on the services associated with an account. |
BILLING.AGGREGATEACCOUNTLOG | For aggregate billing, links sub accounts to master accounts. |
BILLING.BILLTYPE | Stores bill type setup information. |
BILLING.BILLTYPELINEITEM | Indicates which line items within a bill type surcharges and discounts will be applied to. |
BILLING.BILLTYPELINEITEMSETUP | Associates line item setups with bill types. (Bill types and line item setups are stored separately so that the same line item setups can be used for multiple bill types.) |
BILLING.BUDGETBILLINGPLAN | Stores budget billing information for accounts that are on budget billing plans. |
BILLING.BUDGETBILLINGPLANSETUP | Stores setup information for budget billing plans. |
BILLING.BUDGETEDAMOUNTHISTORY | Stores budgeted amounts for accounts on budget billing plans. |
BILLING.FIXCHGSU | Defines frequencies and billed-through dates for fixed charges. |
BILLING.LINEITEMSETUP | Stores line item setup information, including the condition formula, the rate code, and for service-based line items the service options key. |
BILLING.MAILTOCONFIGURATION | Stores the configuration defines in the Mail To Configuration form. |
BILLING.ONEOFFCHARGE | Stores information on billable one-off charges that have been added to accounts. |
BILLING.SENDBILLTO | Stores name and address information for the bill-to contact on each account. |
BILLING.SENDCOPIESTO | Stores name and address information for contacts who are to receive copies of bills for a particular account. |
BILLING.SERVICEDEFINITION | Stores general information on a type of utility service, such as water or garbage. Most of the details that are used to generate bills are stored in the SERVICEOPTIONS table. |
BILLING.SERVICEOPTIONS | Stores detailed billing information for a service definition, such as the type of asset used to meter the service, prorating options, and the percentage of metered usage for which accounts will be billed. |
CORE.BATCHPROCESSING. BATCHPROCESSEXCEPTION | Stores links between agency-defined user exception codes and the associated process types (such as bill types), as well as defining severity levels. |
CORE.BATCHPROCESSING. USEREXCEPTIONCODE | Stores agency defined User Exception codes and links to associated formulas. |
RESOURCES.RATETABLE | Stores rate table definition, which are used to calculate billing charges. |
In addition to the setup tables in the database, these stored procedures are used at different points in the bill generation process:
Procedure | Comments |
---|---|
BILLING.USP_BILLRUN_START | Adds custom code to be executed before bill generation starts. |
BILLING.USP_BILLRUN_END | Adds custom code to be executed after bill generation ends. |
BILLING.USP_UNDOBILLRUN | Deletes a bill run and all associated records, such as account activities, bills, line items, and transactions. |
BILLING.USP_UNDOSINGLEBILL | Deletes a single bill and all associated records. |
Parameters
This table describes each parameter for this task:
Form | Console | Description |
---|---|---|
Run Type | RunType (string) | Type of bill run (CDR, Interim, or Utility). |
Bill Type | BillType (int) | Indicates the bill type to be generated. |
Commit Interval | CommitInterval (int) | Number of accounts processed in each
batch. Note: You can enter any number, but there are limitations
at the database level. Oracle databases have a limit of 1,000
records, and SQL Server databases have a limit of 2,000 records.
Entering a larger number will cause errors.
|
Address Route | MeterReadingRoute (int) | Address route for which bills are being generated. |
Bill Date | BillDate (DateTime) | Bill date for the bills in the run. |
Due Date | BillDueDate (DateTime) | Due date for the bills in the run. |
Billing Period | BillingFromDate (DateTime) | Beginning date of the billing period for the run. |
To | BillingToDate (DateTime) | Ending date of the billing period for the run. |
CDR Product | CDRProductFamily (CDRProductFamily) | CDR module for which bills are being generated. |
CDR Type | CDRApplicationTypeKey (int) | CDR application, case, or license type for which bills are being generated. |
CDR Milestone | CDRApplicationProcessStateKey (int) | Milestone for which CDR bills are being generated. |
Post Bills | PostBills (bool) | Indicates whether you want to post bills for the bill run. |
Output Bills | OutputBills (bool) | Indicates whether you want to output bills for the bill run. |
Exclude Final Bills | ExcludeFinalBills (bool) | Select this check box if you do not want to generate final bills. Normally a bill run will include all final bills that are ready to be generated, including bills for accounts that don't meet the selection parameters. |
Billing Status | BillingStatus (string) | Account billing status for which bills will be generated. |
Billing Cycle | BillingCycle (string) | Billing cycle for which bills are being generated. |
Use Pre-selected Accounts | PreSelectedAccounts (bool) | Indicates whether you’re generating bills for pre-selected accounts. |
Account Area | AccountArea (string) | Account area for which bills are being generated. |
Account Class | AccountClass (string) | Account class for which bills are being generated. |
Account Group | AccountGroup (string) | Account group for which bills are being generated. |
Account Subgroup | AccountSubgroup (string) | Account subgroup for which bills are being generated. |