37 Configuring Discounting Modules and Components

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

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.

  • 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 selector data to the FCT_DiscountAnalysis module. See "DAT_ModelSelector".

  • DAT_Discount. This module supplies discount 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 Balance Elements Impacted by Discounts

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

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

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

    If the validity periods of all first-usage balance elements in the bundle should be synchronized, DAT_BalanceBatch adds information about those balance elements to the EDR.

  • FCT_ApplyBalance. This module sets the validity period information in the EDR for all first-usage balance elements 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 Balance Elements".

To set the validity period of first-usage balance elements 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 Balance Element Validity End Time

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

To restrict the validity end time of first-usage balance elements, 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.

When you restrict balance element validity end time, DAT_BalanceBatch sets the end time of the balance element validity period to the end time of the charge offer or discount offer that grants the balance element if it is earlier than the balance element validity end time.

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

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.

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.

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.

  • 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 balance elements in their account balance to use a requested service. For more information, see "FCT_CreditLimitCheck".

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
...

About Dumping Discount Information during Run Time

You can dump discount 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 configuration information. You can write discount configuration information for one or all discounts 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.

    Note:

    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.

  • Run-time operations, set the IgnoreEDROnLock semaphore entry to True.

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.

Configuring Custom Business Events for Pipeline Discounting

A business event is a BRM operation that you define in the Payload Generator EM configuration file (payloadconfig.xml).

To enable custom business events in Pipeline Manager, you need to list them in the DAT_BalanceBatch CustomEvents registry entry. For example, this entry enables an event named CycleRollover20days:

CustomEvents
{
   CycleRollover20days
 }