12 Configuring Discounting Modules and Components

This chapter describes how to configure discounting in the Oracle Communications Billing and Revenue Management (BRM) Pipeline Manager.

For information about Pipeline Manager discounting, see "About Discounts".

For information about discounting pipelines, see "Understanding the Discounting Architecture".

Configuring a Batch Discounting Pipeline

Batch discounting is typically performed in a separate discounting pipeline.

Configure the following data modules:

  • DAT_AccountBatch. This module provides account data to Pipeline Manager. This module loads account data into memory when you start Pipeline Manager, and updates it when it is changed in the BRM database. See "DAT_AccountBatch" and "Adding Customer Balance Impact Data to EDRs" in BRM Setting Up Pricing and Rating.

  • DAT_BalanceBatch. This module provides balance data for the FCT_Discount module when discounting is run in batch. This module loads balance data into memory when you start Pipeline Manager, and keeps the balance data synchronized between the Pipeline Manager database and the BRM database. See "DAT_BalanceBatch".

  • DAT_ModelSelector. This module provides discount model selector data to the FCT_DiscountAnalysis module. See "DAT_ModelSelector".

  • DAT_Discount. This module supplies discount model information to the discount function modules. See "DAT_Discount".

Configure the following function modules:

  • FCT_Discount. This module performs the discount calculations and adds discounting data to the event data record (EDR). See "FCT_Discount".

  • FCT_DiscountAnalysis. This module selects applicable discounts and prioritizes them. See "FCT_DiscountAnalysis".

  • FCT_Rounding. This module rounds the balance impacts of discounting. Use the Mode registry entry to specify Discounting. See "FCT_Rounding".

  • FCT_ApplyBalance. This module is used only for batch discounting. This module adds the discount balance impact to the EDR and updates the Pipeline Manager memory. See "FCT_ApplyBalance".

About settIng the Validity of Resources Impacted by Discounts

The effective period of a granted resource can start when a subscriber first consumes the resource balance.

For more information, see "About Balance Impacts That Become Valid on First Usage" in BRM Setting Up Pricing and Rating.

The following modules are used to set the validity period of resources that start on first usage when they are impacted for the first time:

  • DAT_BalanceBatch. This module calculates the resource validity period based on the EDR timestamp and initializes the validity period in memory.

    If the validity periods of all first-usage resources in the deal should be synchronized, DAT_BalanceBatch adds information about those resources to the EDR. (For information about synchronizing the first-usage validity of resources, see "About Synchronizing First-Usage Validity of Resources in Deals" in BRM Setting Up Pricing and Rating.)

  • FCT_ApplyBalance. This module sets the validity period information in the EDR for all first-usage resources whose validity needs to be set. It then sends the entire EDR to an output stream.

    You specify the first-usage validity output stream in the FCT_ApplyBalance registry. See "FCT_ApplyBalance".

    You configure the output stream in the batch rating pipeline. See "Configuring Pipeline Output for First-Usage Products, Discounts, and Resources".

To set the validity period of first-usage resources sent to the output stream, you configure Universal Event (UE) Loader. See "About Updating Validity Period Information in the BRM Database".

Configuring Batch Discounting to Restrict Resource Validity End Time

When the validity period of a granted resource starts on first usage and ends relative to the start time, you can restrict the resource end time to ensure the resource balance cannot continue to be consumed after the product or discount expires.

For more information, see "About Restricting The End Time Of Granted Resources That Start On First Usage" in BRM Setting Up Pricing and Rating.

To restrict the validity end time of first-usage resources, configure "DAT_BalanceBatch" to use the RestrictResourceValidityToOffer business parameter setting from the BRM database.

You configure DAT_BalanceBatch to use business parameter settings from the BRM database by performing the following:

  • Configuring the "DAT_PortalConfig" module in your registry file. This module must be listed before all other data modules in the registry file.

  • Connecting the "DAT_BalanceBatch" module to DAT_PortalConfig by using the PortalConfigDataModule registry entry.

See "Using Business Parameter Settings From The BRM Database" in BRM System Administrator's Guide.

When you restrict resource validity end time, DAT_BalanceBatch sets the end time of the resource validity period to the end time of the product or discount that grants the resource if it is earlier than the resource validity end time.

Important:

If you restrict resource validity for pipeline rating, you must also restrict resource validity for real-time rating. See "Configuring Real-Time Rating To Restrict Resource Validity End Time" in BRM Setting Up Pricing and Rating.

Calculating the Match Factor of Parallel and Sequential Discounts

The match factor in discounting is the percentage of usage that is discounted by a single discount when more than one discount is applied. The match factor is used with cascading discounts in which a discount can be applied only to the portion of usage that has not already been discounted.

For example, if an account owns two cascading discounts and the first one discounts 75% of the usage, the match factor is .75. The second discount, therefore, can be applied only to 25% of the usage.

By default, discounting does not calculate the match factor for parallel and sequential discounts. Should you need to calculate the match factor for parallel and sequential discounts, set the AvoidMatchFactorCalculation entry to False in the FCT_Discount module registry. See "FCT_Discount".

Configuring a Real-Time Discounting Pipeline

Important:

Real-Time Discounting is an optional feature that requires a separate license.

You can use a real-time discounting pipeline to calculate discounts for events that are rated by real-time rating. This allows you to discount all events in real time, so customer discount balances are always current.

For information about real-time discounting pipelines, see "Real-Time Discounting Architecture".

To configure real-time discounting:

  1. Configure a real-time discounting pipeline. See "Configuring a Real-Time Discounting Pipeline".

  2. Configure the Input registry section. See "Configuring the Input Registry Section".

  3. Configure the Connection Manager (CM) to send discounting requests to the NET_EM module. See "Configuring The NET_EM Module For Real-Time Processing" in BRM System Administrator's Guide.

Configuring a Real-Time Discounting Pipeline

Configure a real-time discounting pipeline that includes the following real-time discounting modules:

  • INP_Realtime. This module handles flist-to-EDR format translation for a real-time pipeline. See "INP_Realtime".

    Use this entry for the OpcodeMapping entry:

    OpcodeMapping = ./formatDesc/Formats/Realtime/discount_event.xml
    
  • OUT_Realtime. This module handles EDR-to-flist format translation for a real-time pipeline. See "OUT_Realtime".

  • NET_EM. This module provides an interface to the CM for the INP_Realtime and OUT_Realtime modules and an interface to the BRM database for the DAT_AccountRealtime and DAT_BalanceRealtime modules. See "NET_EM" and "Configuring The NET_EM Module For Real-Time Processing" in BRM System Administrator's Guide.

  • DAT_AccountRealtime. This module provides account cycle data to the FCT_Discount module. The DAT_AccountRealtime module gets data from the BRM database by connecting with the NET_EM module. It does not store data in memory, so it does not load data when you start Pipeline Manager. See "DAT_AccountRealtime".

  • DAT_BalanceRealtime. This module provides balance data for the FCT_Discount module for real-time discounting. The DAT_BalanceRealtime module gets data from the BRM database by connecting with the NET_EM module. It does not store data in memory, so it does not load data when you start Pipeline Manager. See "DAT_BalanceRealtime".

  • FCT_CreditLimitCheck. This module is used only for real-time discounting. This module is used during the prepaid authorization process to determine whether event owners have enough resources in their account balance to use a requested service. For more information, see "FCT_CreditLimitCheck" and "How BRM Authorizes Users To Access Prepaid Services" in BRM Telco Integration.

In addition, configure the following standard discounting modules:

  • FCT_Discount. This module performs the discount calculations and adds discounting data to the EDR. See "FCT_Discount".

  • FCT_DiscountAnalysis. This module selects applicable discounts and prioritizes them. See "FCT_DiscountAnalysis".

Configuring the Input Registry Section

To manage real-time discounting efficiently, you must enable the Input registry UnitsPerTransaction entry. Use the following entry in the Input registry section:

Input
{
   UnitsPerTransaction = 1
   NoThread = true
...

For more information on the UnitsPerTransaction entry, see "Combining Multiple CDR Files Into One Transaction" in BRM System Administrator's Guide.

About Dumping Discount Model Information during Run Time

You can dump discount model configuration information during run time. Dumping the information writes it to a file or to the terminal. This is useful should you need to verify, compare, or provide discount configuration information during run time for troubleshooting purposes.

You can use the DAT_Discount and DAT_ModelSelector modules to write discount model configuration information. You can write discount configuration information for one or all discount models in your system by using the DiscountModel and DataFileName semaphores. See "DAT_Discount" and "DAT_ModelSelector".

About Discount Transaction Management

To maintain data integrity in a pipeline, discounting uses transactional processing on two levels:

  • Standard pipeline transactions, managed by the Transaction Manager (TAM). If a transaction fails, the input is stopped and all open transactions are rolled back. After rolling back the data, the input is restarted.

    Important:

    To enable transaction management, the redoEnable registry parameter of the TAM must be set to True. If the redo mechanism is not enabled, discounting will block any other sequential transactions.
  • EDR transactions, managed by the discounting modules. An EDR might contain multiple charge packets that are manipulated by the FCT_Discount module. The module might find errors in some charge packets and not be able to finish processing the EDR. Therefore, all changes made in one EDR are logged. If there are no errors, the data is committed, otherwise the changes made by the module are rolled back and the EDR is not committed.

About Processing Balance Groups Locked by Other Transactions

During discount calculations in BRM, when discounting data is added to the event data record (EDR), the associated balance group is locked by the transaction. By default, there is a dependency between concurrent transactions involving the same balance group. If transaction A locks a balance group, then, by default, transaction B waits for transaction A to commit or roll back before it locks the same balance group.

You can enhance pipeline throughput performance in BRM by configuring the IgnoreEDROnLock entry in the FCT_Discount module to ignore an event data record, if the associated balance group object is locked by another transaction.

For more information on the IgnoreEDROnLock registry entry in the FCT_Discount module, see "FCT_Discount".

To configure the FCT_Discount module for:

  • Batch operations, set the IgnoreEDROnLock registry entry to True. See the description for using registry files to control Pipeline Manager in BRM System Administrator's Guide.

  • Run-time operations, set the IgnoreEDROnLock semaphore entry to True. See the description for using semaphore files to control Pipeline Manager in BRM System Administrator's Guide.

When the FCT_Discount module processes concurrent transactions involving the same locked balance group objects, if IgnoreEDROnLock entry is set to True, it places the ignored or rejected EDRs with the locked balance group in the discountError directory.