Overview: Virtual Bill Scripts
Virtual Bill Scripts (VBS) are powerful and flexible tools for bringing together cost information and interval usage data from varied sources. VBS are intended to provide additional data processing capability when the Calculated Account and Bill Splits features in EnergyCAP are insufficient. However, scripting expertise and a programming background are required to take advantage of possibilities offered by the VBS functionality.
Virtual Bill Creation Process
The scripting process is relatively straightforward:
First, determine the source for consumption data. This data must be:
- stored in the EnergyCAP database as channel data OR
- pulled from existing consumption data from a master meter in EnergyCAP OR
- defined as a script-based formula.
Then determine the source for cost data (formula, master meter, or other supported source.
Determine what information needs to appear on destination bill.
- Use (required)
- Cost (required)
- Start Date (required)
- End Date (required)
- optional?) Demand
- optional?) Accounting period
- optional?) Accounting period year
- optional?) Other desired data items
Determine how start and end dates of destination bill will be determined.
Once the scripts have been created, the user can generate virtual bills for all accounts by using the Virtual Bill Processor from the Tools menu or for a single account by selecting the applicable account in the Account Manager.
The Virtual Bill Processor executes VBS to create virtual bills. You must create a bill script version for an account before generating virtual bills. Energy CAP Enterprise maintains a history of an account's bill scripts in order to match its bill period to the applicable bill script version when creating virtual bills.
Examples: Source Account A with a monthly billing cycle has bill script versions effective 01/01/01-03/31/01, 04/01/01-09/30/01, and 10/01/01-12/31/01. When creating a virtual bill for the bill period June 2001, Energy CAP Enterprise looks at all bill versions for the account and selects the bill script version effective June 30, 2001, version 04/01/01-09/30/01.
You can create virtual bills by billing period (GetBillsByPeriod function) or for a specific creation date (GetBillsByDate function).
When using the billing period function, Energy CAP Enterprise recommends that you create virtual bills using the same billing cycle as the source account. If the source account billing cycle differs, Energy CAP Enterprise creates the virtual bill based on the availability of the source account's bills for the virtual bill period. Click here to view an example. When creating virtual bills, Energy CAP Enterprise reviews the source account bills at the end of its bill period (i.e., quarterly, the end of the third month) and if a source bill is available, EnergyCAP creates the virtual bill. If the source account does not have a bill for that bill period, an error is generated and logged in the Work Flow Manager Virtual Bill Processor Problem folder. Click here to view an example.
When using the creation date function, Energy CAP Enterprise looks for source account bills with creation dates between the start and end dates entered in the Bill Equation Processor.
To review a bill script sample, see the Virtual Bill Sample Script topic.

