42 Credit Limit and Threshold Checking during Batch Rating

This document describes how to manage credit limits when using Oracle Communications Billing and Revenue Management Pipeline Manager.

About Credit Limit and Threshold Checking during Batch Rating

During batch rating, Pipeline Manager determines whether a customer's noncurrency balance has breached a credit threshold. Pipeline Manager modules compare a customer's balance against noncurrency credit threshold values and then compile a list of events that crossed thresholds. A utility loads the list from Pipeline Manager into BRM.

Note:

Pipeline rating calculates balance impacts and credit threshold breaches immediately. However, the utility that loads the balance impacts into the BRM database is different from the utility that loads credit threshold breaches into BRM. This means that a notification for a credit threshold breach might be sent before the customer's balance is updated in the BRM database. Therefore, the customer balance shown on the threshold breach notification might temporarily differ from the balance in the customer's account.

The following pipeline modules are responsible for checking credit thresholds during the batch rating process:

  • DAT_PortalConfig retrieves credit profile information from the BRM database and stores it in its internal memory.

  • DAT_BalanceBatch retrieves the customer's current credit profile from the DAT_PortalConfig module, compares the customer's updated balance to the credit profile, and notifies FCT_ApplyBalance if a credit threshold or credit limit has been breached.

  • FCT_ApplyBalance updates the customer's current balance in the DAT_BalanceBatch internal memory and, if a credit threshold has been breached, writes the event detail record (EDR) into an internal list.

    To help you identify the exact event that caused the threshold breach, FCT_ApplyBalance adds the following event attributes to each threshold breach notification:

    • Event type (DETAIL.EVENTTYPE)

    • Call originator (DETAIL.A_NUMBER)

    • Call destination (DETAIL.B_NUMBER)

    At the end of the transaction, FCT_ApplyBalance writes all of the EDRs from the internal list to an XML output file. See "About the Format of the XML Output File Name".

After the XML output file is generated, Batch Controller uses the load_notification_event utility to load the notification events into BRM. See "About Loading Notifications from Pipeline Manager to BRM".

About the Format of the XML Output File Name

Pipeline Manager generates output XML files using the following file name format:

OutputPrefix_PipelineName_StreamName_TransactionID_SequenceNumber

where:

  • OutputPrefix is the prefix name specified in the OutputPrefix registry entry.

  • PipelineName is the name of the individual pipeline, such as ALL_RATE.

  • StreamName is based on the unitsPerTransaction parameter maintained at the input level of the pipeline. A value of 1 means that one input file generates one output file. A value greater than 1 means that multiple input files are merged into one output file. StreamName is replaced with the name of the last file merged into the output file. For example, if unitsPerTransaction was 3 and the files merged into the output file were file01, file02, and file03, StreamName would be replaced with file03.

  • TransactionID is the system-generated transaction ID number.

  • SequenceNumber signifies the order in which FCT_ApplyBalance created the XML output file within a transaction. For example, the first XML output file has a sequence number of 1, the second output file has a sequence number of 2, and so on.

For example:

balancenotification_ALL_RATE_file01_776_1

About Loading Notifications from Pipeline Manager to BRM

Notifications from Pipeline Manager are loaded into the BRM database by the load_notification_event utility. This utility is launched automatically by Batch Controller whenever Pipeline Manager writes an output XML file to a specified directory.

When Pipeline Manager writes an output XML file to the specified directory, notifications are loaded as follows:

  1. Batch Controller launches the SampleLoadHandler batch handler.

  2. SampleLoadHandler moves the output XML file to a processing directory and runs the load_notification_event utility.

  3. load_notification_event converts the notification events in the output XML file into flist format and loads them into BRM.

  4. The BRM event notification system sends an alert to the customer.

  5. SampleLoadHandler determines whether the utility successfully loaded the notification events into BRM:

    • If the utility was successful, SampleLoadHandler moves the output XML file from the processing directory to the archive directory.

    • If the utility failed, SampleLoadHandler moves the output XML file from the processing directory to the reject directory.

You must configure Batch Controller, the batch handler, and the load_notification_event utility to process the output XML files. See "Configuring Batch Controller to Run load_notification_event".

Setting Up the Batch Rating Process to Perform Threshold Checking

To set up your system to perform threshold checking during the batch rating process:

Enabling Threshold Checking in Pipeline Manager

By default, threshold checking is disabled for batch rating because it decreases pipeline rating performance.

You can enable threshold checking in batch rating by modifying a field in the multi_bal instance of the /config/business_params object.

To enable credit threshold checking during batch rating:

  1. Go to the BRM_home/sys/data/config directory and run the following command:

    pin_bus_params -r BusParamsMultiBal bus_params_multi_bal.xml
      

    This command creates an editable XML file named bus_params_multi_bal.xml.out in your working directory. If you do not want this file in your working directory, specify the path as part of the file name.

  2. Search the XML file for the following line:

    <CreditThresholdChecking>disabled</CreditThresholdChecking>
      
  3. Set the CreditThresholdChecking entry to the appropriate value:

    • enabledOffline specifies to check credit thresholds during the batch rating process.

    • disabled specifies to skip credit threshold checking during the batch rating process and thus increase pipeline processing performance. This is the default setting.

  4. Go to the BRM_home/sys/data/config directory and run the following command:

    pin_bus_params bus_params_multi_bal.xml
      

    This command loads your changes into the multi_bal instance of the /config/business_params object.

    Note:

    BRM uses the XML in this file to overwrite the existing multi_bal instance of the /config/business_params object. If you delete or modify any other parameters in the file, these changes affect the associated aspects of the BRM multi_bal configuration.

  5. Read the object with the testnap utility or Object Browser to verify that all fields are correct.

  6. Stop and restart the CM.

  7. (Multischema systems only) Run the pin_multidb script:

    pin_multidb -R CONFIG
      

Configuring Batch Controller to Run load_notification_event

Batch Controller is a cronjob application that monitors a processing directory and starts batch handlers. When configured for threshold checking, Batch Controller waits for output XML files to appear in the processing directory and then launches the SampleLoadHandler handler. The batch handler moves the output XML files to a separate directory and then calls the load_notification_event utility to load the notifications into the BRM database.

You configure Batch Controller by using the following configuration files:

  • The batch_controller.properties file connects the Batch Controller to the CM, specifies run-time parameters, identifies the batch handlers to run, and specifies when and how to run the batch handlers.

  • The load_notification_event pin.conf file connects the load_notification_event utility to the CM.

  • The SampleLoadHandler_config.values file specifies where the batch handler retrieves and deposits the XML files and which utility to run.

To configure Batch Controller for threshold checking:

  1. Open the BRM_home/apps/batch_controller/batch_controller.properties file in a text editor.

  2. Connect Batch Controller to the CM, if you have not already done so.

  3. Make sure the entries for the load_notification_event batch handler (BRM_home/apps/load_notification_event/SampleLoadUtilityHandler.pl) are correct. For example:

    SampleHandler.name = SampleHandler
    SampleHandler.max.at.lowload.time = 1
    SampleHandler.start.string = $PIN_HOME/apps/load_notification_event/SampleLoadUtilityHandler.pl
  4. Specify the handler's polling directory and the file pattern to look for. For example:

    event1.name = eventlabel1
    event1.handlers = SampleHandler
    event1.at = 115700
    event1.file.location = $HOME/ifw/data/out/notifybalancebreach/
    event1.file.pattern = *.xml
  5. Save and close the file.

  6. Connect the load_notification_event utility to the BRM database by editing the BRM_home/apps/load_notification_event/pin.conf file.

  7. Open the BRM_home/apps/load_notification_event/SampleLoadHandler_config.values file in a text editor.

  8. Specify the directory from which to retrieve the XML files in the $STAGING entry. For example:

    $STAGING = "$HOME/ifw/data/out/notifybalancebreach/"
  9. Specify the directory in which the handler archives the output XML files that loaded successfully into BRM in the $ARCHIVE entry. For example:

    $ARCHIVE = "$HANDLER_DIR/archive"
  10. Specify the directory in which the handler stores the output XML files that failed to load into BRM in the $REJECT entry. For example:

    $REJECT = "$HANDLER_DIR/reject"
  11. Save and close the file.

  12. Start Batch Controller.

Configuring Pipeline Manager to Perform Threshold Checking

To configure threshold checking, perform the following:

  1. Configure the DAT_BalanceBatch module.

  2. Configure the DAT_PortalConfig module.

  3. Configure the FCT_ApplyBalance module.

    When you configure the FCT_ApplyBalance module, you specify the following:

Configuring the Maximum Number of Notifications

You specify the maximum number of notification events that FCT_ApplyBalance writes into the XML output file by using the NumberOfNotificationLimit registry entry. When the file breaches the maximum number, FCT_ApplyBalance closes the file and begins writing notification events into a new XML output file.

Note:

You can identify the order in which XML output files were created by the sequence number used in the file name. See "About the Format of the XML Output File Name".

Configuring the Output XML File

After FCT_ApplyBalance identifies that an EDR caused a balance to breach a credit threshold, it writes the EDR to an output XML file. You can specify the prefix for the output file name by using the OutputPrefix registry entry and the directory in which to save the file by using the OutputDirectory registry entry.