Oracle BRM billing process
First, let’s take a look at an overall picture of what the Oracle BRM billing process does:
- Compiles the total amount of balance impacts that have occurred in the past month. This can include usage fees and subscription fees.
- Changes the status of all the bill items associated with the bill from pending to open so that they stop accumulating charges, and payments can be applied to them. In addition, a payment due date is added to the bill.
- Automatically requests payments from a credit card processor or requests payments by sending invoices.
- Automatically updates a customer’s account balance when a payment is recorded in the BRM database.
So, how is all this done in practice?
Before running a billing on production, it is necessary that all the prerequisite steps be executed. The first step is to prepare a copy of the production environment – this can either be a preproduction or some testing environment. This step includes the installation of the latest production release onto this environment and the copying of the production database. Next, the environment configurations have to reflect those of production. Here are the main configurations, which should be set appropriately:
• cm configuration ($HOME/pin/sys/cm/pin.conf),
o Verify loglevel entry is set to 1
o Change the entry for agent_return parameter to 0
o Change the entry for simulate_agent parameter to 1
These two last changes are done so as not to involve any provisioning action during the bill-run.
• dm_oracle configuration ($HOME/pin/sys/dm_oracle/pin.conf),
o Set dm_bigsize parameter to 8388608 or higher
o Set dm_shmsize parameter to 33554432 or higher
o Set dm_n_fe to 8
o Set dm_max_per_fe to 16
o Set dm_n_be to 24
o Set dm_trans_be_max to 22
• pin_bill_accts configuration ($HOME/pin/apps/pin_billd/pin.conf),
o Verify loglevel. Change it to the appropriate value depending on what needs to be checked during the bill test, either 1 or 3.
o Change children parameter for pin_billd and pin_mta to 5
o Change per_batch parameter for pin_billd and pin_mta to 20000
o Change fetch_size parameter for pin_billd and pin_mta to 150000
• pin_inv_accts configuration ($HOME/pin/apps/pin_inv/pin.conf),
o Verify loglevel. Change it to the appropriate value depending on what needs to be checked during the bill test, either 1 or 3.
o Change children parameter for pin_billd and pin_mta to 5
o Change per_batch parameter for pin_billd and pin_mta to 2000
o Change fetch_size parameter for pin_billd and pin_mta to 15000
To get the best possible simulation of production, the billrun pin_virtual_time has to be set to the date when the real billrun on production will be executed. Once that’s done, the billrun can be started.
We run billing monthly with pin_bill_day script which creates about 100.000 bills per hour. The script creates bills for accounts where the billing date is any day before midnight of the day we run billing. So what does pin_billd_day script actually do? It runs the following billing utilities:
- pin_deferred_act: Executes deferred actions; for example if an account should become inactive, this utility performs the status change on the scheduled date.
- pin_bill_accts: Calculates the balance due for accounts and creates a bill for the balance due.
- pin_collect: Collects the balance due for accounts that use credit cards and directs debit payment methods.
- pin_refund: Finds accounts that have refund items and makes online refund transactions.
- pin_inv_accts: Creates an invoice for each account that is billed.
- pin_cycle_fees: Applies the cycle forward fee balance impact to the customer’s account and cancels products that have an expired pending cancellation date.
To verify the progress and performance of the pin_bill_day script, we run queries against the database to get information on how many bills are done, how many are yet to be done, if there are any bills with errors, etc.
After the billing part is over and all the bills are created, invoicing starts. After the invoices are created, they are exported to XML documents, which are then converted into PDF format.
Besides the queries mentioned earlier, there are also other queries that need to be executed once billing and invoicing has finished, in order to verify the accuracy of the data generated by this process. We execute batch of queries; here are some of them:
• Has billing failed?
select * from billinfo_t where billing_state = 4 and bill_info_id<>’Bill Unit(1)’;
–Expected results: No rows found
• Are there any unbilled accounts?
select poid_id0, first_name,last_name,a.status from account_t a, account_nameinfo_t an where
a.poid_id0=an.obj_id0 and
created_t<<bill_cycle_end_date> and
not exists (select b.account_obj_id0 from bill_t b
where end_t=<bill_cycle_end_date> and
b.account_obj_id0=a.poid_id0);
–Expected results: No rows found
• Are there any bills without a bill number?
select * from bill_t where end_t=<bill_cycle_end_date> and bill_no is null;
– Expected: No rows found
Any problems found are then investigated and fixed through the versioning control system, where fixes are later included in the next release version.

Hi,
May I know, which platform are you using? What’s the sizing of the hardware to support this implementation?
Regards.
Hi Ayazul,
Our client uses two HP-UX Intanium servers.
BRM servers:
• 2 x HP Integrity RX6600
• 4 x Intel Itanium Dual Core 1.8 GHz
• 64 GB memory
• HP UX B.11.23 64 bit
• multiple Gbit ETH and 4Gb FC
BRM DB servers:
• 2 x IBM x36502
• 2x Intel Xeon Dual Core 3.16 GHz
• 48 GB memory; Red Hat Enterprise Linux 4 (Nahant Update
• 4 TB disk storage allocated
• multiple Gbit ETH and 4Gb FC
• Oracle 10.2 EE RAC database
Automatic Storage Management used for BRM in Active / Standby mode
Secondary BRM standby db RAC node used for mediation, reporting and other purposes
Storage:
• 1 x HP XP 24000
• dedicated disks for BRM database ASM managed
• 64 GB cache4 Gbit FC bandwidth for BRM database
Best regards,
Ales
can u pls clarify my doubts in oracle brm , after billing in same account some plans got incative and some not , y its happening if any flag or some other field data missed ,, if then let me know the class and field type …….. we r using pin_bill_day for billing …….
Hi, Abirami
There can be many different reasons why some deals, plans or products get inactive after billing.
Billing scripts run one or more billing utilities, pin_bill_day runs the following billing utilities:
* pin_deferred_act
* pin_bill_accts
* pin_collect
* pin_refund
* pin_inv_accts
* pin_deposit
* pin_cycle_fees
You can customize pin_bill_day to specify which billing utilities to run and set the parameters for each billing utility to specify how to run them.
By default, pin_deferred_act utility is included in the pin_bill_day script and is used to execute deferred actions. For example, if a CSR has scheduled an account to become inactive, the pin_deferred_act utility performs the status change on the scheduled date. This should be the most common reason why some plan become inactive after you do billing.
The second reason could be running pin_cycle_fees utility, that is also included in pin_bill_day script. pin_cycle_fees utility cancel products that have an expired pending cancellation date. For example, if a product is set to cancel at a future date, the pin_cycle_fees utility cancels the product.
As I mentioned you can set the parameters for each billing utility to specify how to run them and what actions they will perform. I suggest that you first pay attention on dates that specify when some plan should be cancel, cycle_end_t (cycle end time) and purchase_end_t (purchase end time) are set when you activate some plan, and they trigger status change (in your case to inactive) when you run billing.
I hope my answer will be useful to you, for more detail explanation I would need more specific information about accounts (plans) that become inactive and about billing utilities configuration.
Best Regards, Ales Cvetic
hi,
I have an issue here . In my databse there are three types of Products- cycle forward, one-off,cycle arrear . Cycle arrear products are just included in product list . However, when I am running pin_bill_day on 1st of the next month two duplicate events are getting generated in the system . As a result, two same lines are reflecting in the invoice which is generating invoice with double amount of what it should be . After initial analysis I found that due to two executables of pin_bill_day duplicate lines are coming for cycle arrear products . One is pin_bill_accts and another is pin_cycle_fees .
So, can you please let me know any way so that I can filter cycle arrear product fee calculation on pin_cycle_fees executed by pin_bill_day of 1st of the next month . Eager to know from you or let me know if further clarification is needed .
Regards,
Sayan
Hi,
I am new to Oracle BRM and would like to learn it. could you please help me as to where to start with. Are there any documents available online for the same.
Hi,
You can try searching around the internet. You should find some YouTube videos; moreover, you should find some Oracle BRM documents. As an Oracle Gold partner, we have Oracle Communications Billing and Revenue Management ( abbreviations Oracle BRM, OBRM, OCBRM) books. I suggest that you start with Oracle BRM Essentials, and then continue, based on your needs (OCBRM Development, OCBRM Pipeline development, OCBRM Pricing, OBRM administration, etc.).
Regards,
Ales
Thanks Ales, appreciate your suggestion.