28 Understanding and Migrating Discount Data

This chapter provides an overview of Portal™ Discount Data Migration. It describes the process of migrating and upgrading discount and rollover data from the Pipeline Rating Engine 6.5 database to the Portal 7.3 database. In addition, this document provides reference information on Discount Data Migration utilities.

Note:

You need to migrate discount data only if you are upgrading from Infranet Release 6.5 to Portal 7.3.

Before you read this document, you should be familiar with the following topics:

You should also have detailed knowledge of the following areas:

  • A thorough understanding of the Portal database and the Pipeline Manager database.

  • Sufficient programming skills to use Portal utilities and opcodes.

  • XML and XSLT formats.

About Discount Data Migration

When you upgrade from Infranet Release 6.5 to Portal 7.3, you must migrate discount data to the Portal 7.3 database to use the new discounting features. Discount data migration is required because of changes to the discount architecture, pricing model, balance structure, and discount data storage location in Portal 7.3.

In Infranet Release 6.5, discount information is stored as a part of your rate plans in the Pipeline Rating Engine database. In Portal 7.3, discount data is stored as separate discount objects in the Portal database. You then associate discounts with deals that your customers can purchase.

For more information on the differences between the 6.5 and 7.3 discounting architecture, see "Discounting Differences between Infranet 6.5 and Portal 7.3".

Discount Data Migration provides a set of utilities to migrate discount data to the Portal 7.3 database based on the configuration settings you specify.

You must migrate the following types of discount data:

  • Discount configuration data: Data used to configure a discount model, such as discount model codes, discount masters, discount triggers, discount rules, discount steps, discount conditions, discount balance impacts, resources, and rollover data.

  • Subscription mapping data: Data used to manage customer discounts, such as rate plan names, deal names (for deals containing discount and rollover products), and the service types linked to the rate plans and discount model codes.

  • Discount balance data: Data used to update the customer's discount balance information, such as discount balances, rollover resources, and aggregation counters.

Discounting Differences between Infranet 6.5 and Portal 7.3

Table 28-1 describes the differences between discounting in Infranet 6.5 and Portal 7.3:

Table 28-1 Discounting Differences between Infranet 6.5 and Portal 7.3

6.5 Discounting 7.3 Discounting

Discounts are part of Pipeline Rating Engine rate plans. They can be purchased only by purchasing rate plans.

Discounts are defined in separate objects called discount objects, which are stored in the Portal database.

Discount configurations are stored only in the Pipeline Rating Engine database in the form of discount models, discount rules, discount triggers, and discount masters.

The discount model code of the discount object is stored in the Portal database. All other discount information such as discount configuration data (discount master, discount rules, discount triggers, and so on) are stored in the Pipeline Manager database.

Supports discount processing by the batch pipeline only.

Supports discount processing by both real-time and batch pipelines.

Discount balance information is maintained by the DAT_Discount module.

Discount balance information is maintained by the DAT_BalanceBatch or DAT_BalanceRealtime modules.

Discount balance information is stored in the discount work files in the Pipeline Manager database in the location specified in the Pipeline Manager registry file.

Discount balance information is stored in the Portal database and updated using Rated Event (RE) Loader.

Discount balance is read from files when Pipeline Manager starts. Pipeline Manager processes all events queued in the Portal database.

Discount balance is read from the Portal database when Pipeline Manager starts and then processes the events.

Does not support discount balance impact.

Supports discount balance impact (including currency and non-currency impacts), a new pricing component.

Supports discount rollovers only for balances.

Supports systemwide rollovers and Pipeline Manager rollovers.

Events are mapped to discount models through discount bundles and discount owner ERAs.

Events are mapped to discount models through discount objects.

Supports Discount Bundle, Discount Owner, Discount Account, and Discount Model ERAs.

Supports only Discount Bundle and Discount Owner ERAs.

Note: Discount Bundle and Discount Owner ERAs are supported for backward compatibility only and should not be used in new implementations.

Discount triggers and discount rules contain discount masters.

Only discount rules contain discount masters.

Aggregation counters are not configurable and are automatically created when Pipeline Manager rating starts. Aggregation counters are stored in the discount work files.

Aggregation counters are configurable and stored in the Portal database.

Does not support discount sharing and sponsored accounts. Sponsored accounts cannot share discount resources.

Supports discount sharing where accounts that sponsor other accounts can share discount resources (for example, snowball discounting).

Supports only billing-time discounts.

Supports item, subscription, and systemwide discounts.

Supports complex discounting only for data usage.

Supports complex discounting for both voice and data usage.

Supports cascading and parallel mode discounting.

Supports cascading, parallel, and sequential mode discounting.

Does not support reverse discounts through billing time discount.

Supports reverse discounts through billing time discount.

Discount rules and discount trigger conditions are used to determine the balance impacts.

Expression tokens, which represent charge and quantity values in the charge packet, are used to define discount rules, conditions, and balance impacts in the new discount model.

Ratable Usage Metrics (RUMs) are used to measure events for discounting.

Discounting Ratable Usage Metrics (DRUMs) are used to measure events for discounting.

Discounting Ratable Usage Metrics (DRUMs) are not supported.

Discount rules contain three new fields-DRUM_EXPRESSION, DRUM_TYPE, and RULE_TYPE.

Discounting can be applied to delayed events.

Discounting can be applied to both real-time and delayed events.

Supports only one-time discounts and billing-time discounts.

Supports one-time, billing-time, threshold, and tier discounts.


Migrating Discount Data

The following section explains how to set up and use Portal utilities to migrate discount data, subscription mapping data, and balance data from the Pipeline Rating Engine 6.5 database to the Portal 7.3 database.

Before you read this document, you should be familiar with the following Portal concepts and architecture. See

Overview of the Discount Data Migration Process

The discount data migration process consists of the following steps:

  1. Upgrading your Portal database from Release 6.5 to Portal 7.3. See "Upgrading Your System to Portal 7.3".

  2. Migrating data from your Pipeline 6.5 database to your upgraded Portal 7.3 database. See "Migrating Discount Data from the Pipeline 6.5 Database to the Portal 7.3 Database".

  3. Upgrading your Pipeline database from Release 6.5 to Pipeline Manager 7.3. See "Upgrading Your System to Pipeline Manager 7.3".

  4. Performing post-migration updates, such as updating cross-product discounts and creating system discounts. See "Performing Post-migration Updates".

Upgrading Your System to Portal 7.3

If you have not already done so, upgrade your Portal database from Infranet Release 6.5 to Portal 7.3.

Migrating Discount Data from the Pipeline 6.5 Database to the Portal 7.3 Database

Important:

You must upgrade your Portal database to Portal 7.3 before migrating your discount data.

You migrate discount data by extracting your data from the Pipeline Rating Engine Release 6.5 database and then loading it into your upgraded Portal 7.3 database.

To migrate your discount data, perform these steps:

  1. Re-create your custom resource IDs on the Portal 7.3 database. See "Re-creating Your Custom Resource IDs on the Portal 7.3 Database".

  2. Retrieve the discount migration utility. See "Retrieving the Discount Migration Utility".

  3. If your release 6.5 system includes multiple Pipeline Rating Engine service codes mapped to a single Infranet service type, modify the discount.sql file. See "Modifying Service Code Mappings".

  4. Extract your discounting data from the Pipeline 6.5 database. See "Extracting Discount Data from the Pipeline 6.5 Database".

  5. Load your discount configuration data into the Portal 7.3 database. See "Loading Discount Configuration Data into the Portal 7.3 Database".

  6. Retain your discount model ERAs from the Portal 6.5 database. See "Retaining Discount Model ERAs from Portal Release 6.5".

  7. Load your subscription mapping data into the Portal 7.3 database. See "Loading Subscription Mapping Data into the Portal 7.3 Database".

  8. Load your discount balance data into the Portal 7.3 database. See "Loading Discount Balance Data into the Portal 7.3 Database".

Re-creating Your Custom Resource IDs on the Portal 7.3 Database

The discount data migration scripts do not migrate custom resource IDs from your Pipeline 6.5 database to your Portal 7.3 database. If your system uses any custom resource IDs, you must manually re-create them in your upgraded Portal 7.3 database.

To re-create your custom resource IDs in the Portal 7.3 database:

  1. Look up your existing resource IDs in your Pipeline Rating Engine 6.5 database:

    Use Pricing Center to connect to your Pipeline 6.5 database. In Pricing Center, launch Resource Editor and write down all custom resource IDs that you see.

    Tip:

    Custom resources use ID numbers 1000001 through 4000000000.
  2. Manually re-create your custom resource IDs in your Portal 7.3 database:

    Use Pricing Center to connect to your Portal 7.3 database. In Pricing Center, launch Resource Editor and manually enter all of your custom resource IDs.

Retrieving the Discount Migration Utility

The utility that extracts discount data from your Pipeline 6.5 database is packaged with Pipeline Manager 7.3. Therefore, to retrieve the extraction utility, DMTDscntMig, you must install Pipeline Manager 7.3 on your pipeline system.

Caution:

When you install Pipeline Manager 7.3, DO NOT set the Portal framework environment or configure the Pipeline database. Otherwise, you will overwrite your 6.5 discount data.

To retrieve the utility, perform the following on your Pipeline system:

  1. Shut down Pipeline Rating Engine. See ”Starting and Stopping the BRM system” in BRM System Administrator's Guide.

  2. Make a complete backup of your Pipeline Rating Engine 6.5 system.

  3. Uninstall Pipeline Rating Engine 6.5.

  4. Install Pipeline Manager 7.3 by following the instructions in ”Installing Pipeline Manager” in BRM Installation Guide, but DO NOT set the Portal framework environment or configure the Pipeline database.

If installation completes successfully, the DMTDscntMig utility is installed in Pipeline_Home/bin, the library files are installed in Pipeline_Home/lib, and the application files are installed in Pipeline_Home/tools/DMTDscntMig.

Modifying Service Code Mappings

If your release 6.5 system includes multiple Pipeline Rating Engine service codes mapped to a single Infranet service type, the DMTDscntMig utility generates multiple discount objects for each product. For example, if the TEL, SMS, and DATA Pipeline Rating Engine service codes are mapped to the /service/telco/gsm Portal service type, DMTDscntMig generates the following three discount objects:

DECU2|Deal-dmDECU2-TEL|/service/telco/gsm|dmDECU2 DECU2|Deal-dmDECU2-SMS|/service/telco/gsm|dmDECU2 DECU2|Deal-dmDECU2-DATA|/service/telco/gsm|dmDECU2 
  

For more information about service code mapping, see ”Mapping Service Codes and Service Classes” in BRM Setting Up Pricing and Rating.

To generate only one discount object for each product, you must modify the discount.sql file before you extract data from your Pipeline 6.5 database. Modify the file to map a service type to only one service code.

To modify your service code mappings:

  1. Open the Pipeline_Home/tools/DMTDscntMig/discount.sql file in a text editor.

  2. Search for the following line:

    select unique TO_CHAR(h.VALID_FROM, 'YYYYMMDDHH24MISS') VALID_FROM, g.REF_PARAM, f.PIN_SERVICETYPE, f.SERVICECODE, e.RATEPLAN, (select CODE from ifw_rateplan where rateplan = e.rateplan)
      
    
  3. Between f.PIN_SERVICETYPE and f.SERVICECODE, add the following DECODE statement:

    Note:

    The DECODE statement must be extended for all service types specified in the IFW_SERVICE table.
    f.PIN_SERVICETYPE, DECODE(f.PIN_SERVICETYPE,'ServiceType', 'ServiceCode') f.SERVICECODE
      
    

    where:

    • ServiceType is the Portal service type, such as /service/telco/gsm.

    • ServiceCode is the one Pipeline Rating Engine service code that ServiceType now maps to, such as TEL.

    For example, if the TEL, SMS, and DATA service codes are mapped to the /service/telco/gsm service type and the GPR, GPR2, and GPR3 service codes are mapped to the /service/ip/gprs service type, modify the file to map /service/telco/gsm to only TEL and to map /service/ip/gprs to only GPR. For this example, enter the DECODE statement shown in bold below:

    ...
    select unique TO_CHAR(h.VALID_FROM, 'YYYYMMDDHH24MISS') VALID_FROM, g.REF_PARAM, f.PIN_SERVICETYPE, DECODE(f.PIN_SERVICETYPE,'/service/telco/gsm', 'TEL', '/service/ip/gprs', 'GPR') f.SERVICECODE, e.RATEPLAN,
    ...
    
  4. Save and close the file.

Extracting Discount Data from the Pipeline 6.5 Database

You extract data from your Pipeline database by using the DMTDscntMig utility. You configure how the utility connects to the Pipeline database and the name and location of the output files by using a registry file.

To extract the discounting data from your Pipeline Rating Engine 6.5 database, perform these steps on your Pipeline system:

  1. Go to the Pipeline_Home/tools/DMTDscntMig directory and open the sample.reg file in a text editor.

  2. Enter your configuration settings in the sample.reg registry file. Pay particular attention to these registry entries:

    • Use LogFileName to specify the name and location of the log file.

    • Use UserName to specify the user name for the Pipeline database.

    • Use PassWord to specify the password for the Pipeline database.

    • Use DatabaseName to specify the name of the Pipeline database.

    • Use AccessLib to specify the name of the database library files.

    • Use RootNode to specify the root node name to write in the XML output file.

    • Use Name to specify the name of the parent node for storing the SQL query output.

    • Use Query to specify the file name of the SQL Query. Portal provides a rollover.sql file and a discount.sql file. To create custom queries, see "Using Custom Queries".

    • Use OutputFile to specify the name and location of the XML and DAT output files.

    For more information, see "Registry Entries" in "DMTDscntMig".

  3. Save and close the file.

  4. Load the registry configuration file by using this command:

    DMTDscntMig -r registry_config_file_name
      
    

    where registry_config_file_name is the name and location of the sample.reg file.

If the utility runs successfully, it creates two output files in the location specified in the OutputFile registry entry:

Using Custom Queries

In rare cases, you might need to enhance performance by creating custom SQL queries in addition to the standard queries provided with Discount Data Migration. A typical scenario is when you must migrate a million records. You can create custom queries to migrate smaller sets of data until the job is complete. For example, the custom queries can migrate records 1 to 20,000 first and the rest later.

In this case, you must also modify the OpenRootNode and CloseRootNode entries in the discount configuration registry file to include more entries for the custom queries. For more information, see "Registry Entries" in "DMTDscntMig".

By default, the registry file includes entries for two queries (rollover.sql and discount.sql).

The first entry uses:

OpenRootNode = True

CloseRootNode = False

The second entry uses:

OpenRootNode = False

CloseRootNode = True

This enables the resulting XML file to have only one root node element because creating multiple root node elements in the same XML file causes an error.

To suit your business requirements, you can also customize the XSL file that Discount Data Migration provides by changing some default values for fields such as price list, deals, products, and discounts.

Loading Discount Configuration Data into the Portal 7.3 Database

You load the discount configuration data that was extracted by the DMTDscntMig utility into the Portal 7.3 database by using the loadpricelist utility.

To load the discount configuration data, run loadpricelist on your Portal 7.3 system:

loadpricelist -cf XML_file_name
  

where XML_file_name is the name of the XML file that contains the discount configuration data. For more information, see "loadpricelist" and ”Using the XML Pricing Interface to Create a Price List” in BRM Setting Up Pricing and Rating.

You can use Pricing Center to verify that the discounts loaded successfully.

Retaining Discount Model ERAs from Portal Release 6.5

By default, Portal deletes any DISCOUNTMODEL ERAs associated with accounts when migrating discount data from Release 6.5 to Portal 7.3. If you want accounts to retain the DISCOUNTMODEL ERAs from Release 6.5, modify the delete_discount_era entry in the pin_sub_mig configuration file (Portal_Home/apps/pin_sub_mig/pin.conf).

Important:

If you migrate shared discounts instead of deleting them, you cannot retain DISCOUNTMODEL ERAs during migration; do not modify the delete_discount_era entry.

To retain discount ERAs from Release 6.5:

  1. Open the pin.conf file in Portal_Home/apps/pin_sub_mig.

  2. Change the value of the delete_discount_era entry to 0:

    - pin_sub_mig delete_discount_era 0
      
    
  3. Save and close the file.

Loading Subscription Mapping Data into the Portal 7.3 Database

You load the subscription mapping data that was extracted by the DMTDscntMig utility into your Portal database by using these scripts:

  • pin_smt_create_obj.pl: Creates an /smt_acct_mig object for storing the subscription mapping data. It also creates temporary tables for storing the subscription mapping data before it is migrated.

  • pin_smt_create_procs.pl: Creates the stored procedures, which collect the relevant accounts for subscription migration.

  • pin_smt: Loads subscription mapping data into the Portal 7.3 database.

You configure these scripts by using the smt.cfg configuration file.

To migrate subscription mapping data, perform these steps on your Portal 7.3 system:

  1. Install Patch 4489.

  2. Open the Portal_Home/apps/pin_sub_mig/smt.cfg file in a text editor.

  3. Edit the entries listed in Table 28-2 so that the script can connect to your Portal 7.3 database:

    Table 28-2 smt.cfg Entries to Edit

    Entry Description

    DB_NUMBER

    The Portal database number. By default, this is set to 0.0.0.1.

    DB_USER

    The database user name. By default, this is set to pin.

    DB_PASSWD

    The user password. By default, this is set to pin.

    DB_NAME

    The Oracle database name. By default, this is set to pindb.

    DM_HOST

    The server or host name where the Data Manager (DM) is running.

    DM_PORT

    The DM port number.

    SOURCE_FILE

    The name and location of the DD_OBJECTS_SMT source file. By default, this is set to Portal_Home/sys/dd/data/dd_objects_smt.source.

    SQL_FILES

    The location of the SQL files. By default, this is set to Portal_Home/apps/pin_sub_mig/sql_files.

    CTL_FILES

    The control file location. This file is required by SQL loader for loading the input file, *.dat, into the database. By default, this is set to Portal_Home/apps/pin_sub_mig/ctl_files.

    DATA_FILES

    The data file location. This is where the input.dat file is located. By default, this is set to Portal_Home/apps/pin_sub_mig/data_files.

    LOG_FILES

    The directory where the log files will be placed. By default, this is set to Portal_Home/apps/pin_sub_mig/log_files.

    LOG_LEVEL

    The log level. The values can be:

    1 - Error

    2 - Debug

    By default, this is set to 2.

    LIB_FILES

    The location of the libraries for the subscription migration utility. By default, this is set to Portal_Home/apps/pin_sub_mig/lib.

    Note: Verify that the PERL5LIB environment variable is a system variable and contains the path of the LIB_FILES.


  4. Save and close the file.

  5. Go to the Portal_Home/apps/pin_sub_mig/scripts directory and run the pin_smt_create_obj.pl script:

    cd Portal_Home/apps/pin_sub_mig/scripts
    perl pin_smt_create_obj.pl
      
    

    To verify that the script executed successfully, check the smt.pin log file. This log file is created in the directory specified by the LOG_FILES configuration entry.

  6. Go to the Portal_Home/apps/pin_sub_mig/scripts directory and run the pin_smt_create_procs.pl script:

    cd Portal_Home/apps/pin_sub_mig/scripts
    perl pin_smt_create_procs.pl
      
    

    To verify that the script executed successfully, check the smt.pin log file.

  7. Go to the Portal_Home/apps/pin_sub_mig directory and run the pin_smt utility:

    cd Portal_Home/apps/pin_sub_mig
    pin_smt -i input_file_name
      
    

    where input_file_name is the DAT file generated by the DMTDscntMig utility. For more information, see "DMTDscntMig".

    If the utility runs successfully, the subscription mapping data is loaded into the Portal 7.3 database. Results are printed to the log file in the location specified in the smt.cfg file.

  8. Check the log file for errors. If there are errors, you must correct them manually and rerun the pin_smt utility. For more information, see "pin_smt".

Loading Discount Balance Data into the Portal 7.3 Database

Your Pipeline Rating Engine 6.5 discount balance data is stored in the discount data work file (DscAccountsWork.acc), which is maintained by the DAT_Discount module. You load this file into your Portal 7.3 database by using the migrate_discount_balances script.

To load discount balance data into your Portal 7.3 database, perform these steps on your Portal system:

  1. Open the Portal_Home/upgrade/65_73/upgrade.cfg file in a text editor.

  2. Edit the following entries listed in Table 28-3 so that the script can connect to your Portal 7.3 database:

    Table 28-3 upgrade.cfg Entries to Edit

    Entry Description

    OWNER

    Specifies the Portal database user name. By default, this is set to pin.

    PASSWD

    Specifies the Portal database password. By default, this is set to pin.

    DBNAME

    Specifies the name of the Portal database you are upgrading. By default, this is set to pindbdb.

    DISCOUNT_BALANCES_FILE

    Specifies the name and location of the discount data work file. By default, this is set to Portal_Home/upgrade/65_73/DscAccountsWork.acc.

    CHARGE_RESOURCE_ID

    Specifies the charge resource ID. By default, this is set to 1000997.

    QUANTITY_RESOURCE_ID

    Specifies the quantity resource ID. By default, this is set to 1000998.

    EVENT_RESOURCE_ID

    Specifies the event resource ID. By default, this is set to 1000999.


  3. Save and close the file.

  4. Load the discount balance data into the Portal 7.3 database by running the migrate_discount_balances.pl script:

    cd Portal_Home/upgrade/65_73
    perl migrate_discount_balances.pl
      
    

    For more information on this script, see "migrate_discount_balances.pl".

    If the utility runs successfully, the discount balance data is loaded into the Portal 7.3 database. Results are printed to the log file in the SQL log directory.

  5. Check the SQL log file for errors:

    • If no errors are listed, the balance data loaded successfully.

    • If errors are listed, the script failed to load the balance data. The entire transaction was rolled back and all changes were undone in the Portal 7.3 database. You must fix the errors and then rerun the migrate_discount_balances.pl script.

Upgrading Your System to Pipeline Manager 7.3

After you migrate your 6.5 discounting data to the Portal 7.3 database and verify that the data loaded successfully, you can safely upgrade your Pipeline database.

Caution:

You must ensure that your discount data loaded successfully into the Portal 7.3 database before you upgrade the Pipeline Manager database. If migration fails, you can try again to extract the data from the Pipeline Manager database. A second attempt would not be possible if you already upgraded the Pipeline Manager database.

Performing Post-migration Updates

After you have successfully migrated your discount data to Portal 7.3 and have upgraded to Pipeline Manager 7.3, you must perform the following tasks:

Updating Cross-Product Discounts after Migrating Discount Data

When you migrate discount data from a release prior to Portal 7.3, you must modify how discounting updates aggregated usage counters for all cross-product usage discounts.

In releases prior to Portal 7.3, usage accumulated automatically, making it unnecessary to update an aggregation counter in the discount.

In Portal 7.3, you must impact the aggregation counter resource.

Use Pricing Center to update cross-product discounts.

To update cross-product discounts, modify the discount that aggregates service usage by changing the following components in the discount model configuration:

  1. In the discount trigger, delete the condition. When there is no condition, the discount is automatically applied.

  2. In the discount rule:

    • If the step has a limited threshold, change it to unlimited (0 to infinity).

    • Modify the balance impact configuration that applies no balance impact. Change it to increment the aggregation counter resource and apply the impact to the current cycle. For example, enter these values:

      Impact/Consume = Counter_resource_ID

      Amount = 1; Beat = 1

      Base Expression = TotalC if the counter tracks charges or TotalQ if the counter tracks a non-currency quantity such as minutes.

      Impact: Current cycle

Creating System Discounts after Migrating Discount Data

When you migrate discount data from a release prior to Portal 7.3, you must create system discounts to be applied to all the accounts in the system before discounting can be used.

Use Pricing Center to create system discounts.

To create system discounts:

  1. Load the following resource IDs by using the load_pin_beid utility. See "load_pin_beid" in BRM Setting Up Pricing and Rating.

    • $CHARGE_RESOURCE_ID = 1000997. Specifies the charge resource ID. The default is 1000997.

    • $QUANTITY_RESOURCE_ID = 1000998. Specifies the quantity resource ID. The default is 1000998.

    • $EVENT_RESOURCE_ID = 1000999. Specifies the event resource ID. The default is 1000999.

  2. Create the discount master. See Pricing Center Help.

  3. Create the discount rule and three balance impacts, one for each resource ID. See Pricing Center Help.

    Enter these values:

    Drum Expression = 1.0

    Rule Type = Tiered

    Drum Type = Quantity

    Threshold From = 0

    Threshold To = Infinity

    Impact/Consume = 1000997, Aggregation charge counter

    Applied To = Event Owner

    Percentage = 100%

    Base Expression = TotalC

    Impact/Consume = 1000998, Aggregation quantity counter

    Applied To =Event Owner

    Percentage =100%

    Base Expression= TotalQ

    Impact/Consume =1000999, Aggregation event counter

    Applied To = Event Owner

    Percentage =100%

    Base Expression =1.0

  4. Create a discount trigger. See Pricing Center Help.

    Enter these values:

    Condition Expression = 1.0

    Condition Operator = Greater Than or Equal

    Condition Value = 0

  5. Create a discount model. See Pricing Center Help.

    Enter these values:

    Version = 1

    Status = Active

    Discount Trigger = Select the discount trigger created in step 4.

    Discount Rule = Select the discount rule created in step 3.

    Multiple Discount per event = Parallel

  6. Create a discount object. See Pricing Center Help.

    Enter these values:

    Discount Type = System

    Priority = 100

  7. Associate the discount object with the discount model created in step 5.

  8. Stop and restart the Portal processes. See ”Starting and stopping the BRM system” in BRM System Administrator's Guide.

Using Discount Data Migration Utilities

This section provides reference information for Oracle Communications Billing and Revenue Management (BRM) Discount Data Migration utilities.

DMTDscntMig

Description

Extracts discount configuration data and subscription mapping data from your Pipeline database. See "Extracting Discount Data from the Pipeline 6.5 Database".

Note:

This utility is packaged with Pipeline Manager 7.3.

Location

Pipeline_Home/bin

Syntax

DMTDscntMig -r registry_config_file_name

Parameters

-r registry_config_file_name

Specifies the path and file name for the registry file. This file specifies how to connect to the pipeline database and the location of your XML and XSL files.

Note:

You can use the sample registry file (Pipeline_Home/tools/DMTDscntMig/sample.reg) as a starting place.

Registry Entries

Table 28-4 contains the registry entries for DMTDscntMig.

Table 28-4 Registry Entries for DMTDscntMig

Entry Description Mandatory

LogFileName

The application log file name that includes the path where the log file is stored.

Yes

UserName

The login name to use for connecting to Portal.

Yes

PassWord

The password for the specified user name.

Note: The password is encrypted. Use the dbpassword utility supplied with Pipeline Manager to encrypt the password.

Yes

DatabaseName

The database alias name.

Yes

AccessLib

The database library. Specifies the name of the database access library, without the lib prefix and .so suffix:

  • Use oci61 for Oracle9i databases.

  • Use oci10g61 for Oracle10g databases.

  • Use oci10g63 for Linux operating systems.

Yes

RootNode

The root node that must be written to the output XML file. By default, the sample script is named output. However, you can change the name.

Yes

DataModule

The database module that DBTransformation must connect to.

Yes

Name

The name of the parent node in which the output of the SQL query is stored.

Yes

Query

The input query file name. By default, rollover.sql, the sample query file, is displayed as the input query file name. However, if you write a query, ensure that it is a single line query that ends with a semicolon. See "Using Custom Queries".

Yes

OutputFile

The output file name. This should include the path where it will be stored.

Yes

OpenRootNode

Specifies whether to use the <rootnode> start tag. If set to True (default), the start tag of the root node element is defined in the XML file.

Note: Every XML file must contain only a single root node element. You can limit the number of root node elements in the XML file by setting the OpenRootNode tag to False. Results from the SQL files (rollover.sql and discount.sql) are contained within the root node element in the XML file.

No

CloseRootNode

Determines whether the end-tag of the root node element </rootnode> must be defined in the XML file. If set to True (default), the end-tag of the root node element is defined in the XML file.

No

inputXMLFile

The name of the input XML file.

Yes

inputXSLFile

The name of the XSL file that includes the rules to apply to the input XML file.

Yes

Output XML File

The name of the output XML file in which the results are stored.

Yes


Sample Registry File

XSL
 {
  LogFileName = path/logfilename
  DataPool
    {
     Login
      {
        Module
         {
           UserName = DBUSERNAME
           PassWord = Encrypted_DB_password
           DatabaseName = DB_service
           AccessLib = oci61
         }
      }
 }# end of data pool
XMLTransform
 {
  RootNode = output
  Transform1
    {
     DataModule = Login1
     Module
      {
        Name = rollover
        Query = rollover.sql
        OutputFile = DBData.xml
        OpenRootNode = True
        CloseRootNode = False
      }
    }
  Transform2
    {
      DataModule = Login2
      Module
       {
         Name = discount
         Query =./discount.sql
         OutputFile = ./DBData.xml
         OpenRootNode = False
         CloseRootNode = True
       }
    }
 }
XSLTransform
 {
   XSLTTransform1
    {
      Module
        {
          inputXmlFile = ./DBData.xml
          inputXSLFile = ./Intermediate1.xsl
          outputFile = ./Intermediate1.xml
        }
    }
   XSLTTransform2
    {
      Module
        {
          inputXmlFile = Intermediate1.xml
          inputXSLFile = Intermediate2.xsl
          outputFile = Intermediate2.xml
        }
    }
   XSLTTransform3
    {
      Module
        {
          inputXmlFile = ./Intermediate2.xml
          inputXSLFile = ./SbscrpMigFile.xsl
          outputFile = ./SbscrpMigFile.dat
        }
    }

 }#End of Registry

migrate_discount_balances.pl

Description

Use the migrate_discount_balances.pl script to load discount balance data into the Portal 7.3 database.

To load data, the script requires a discount balance work file in the directory specified in the DISCOUNT_BALANCES_FILE entry of the upgrade.cfg file. See "Loading Discount Balance Data into the Portal 7.3 Database".

Location

Portal_Home/upgrade/65_73

Syntax

perl migrate_discount_balances.pl

Results

If the migrate_discount_balances.pl script does not notify you that it was successful, see the log files in the SQL log directory to find any errors.

This script runs in a single transaction. If migration fails, the script rolls back the entire transaction and undoes all changes in the Portal 7.3 database. You can then fix any problems and rerun the script.

pin_smt

Description

Use the pin_smt utility to perform the following:

  • Load subscription mapping data into the Portal database.

  • Purchase required add-on deals for a customer account.

Discount ERAs are bundled with deals. The deal names that contain these extended rating attributes (ERAs) are provided by the discount configuration utility in a DAT file. When the deals are loaded into the Portal database, the ERAs that exist in the Pipeline Manager 6.5 database are loaded into the Portal 7.3 database. This may duplicate the deals that are already loaded; therefore, one of the deals in the database must be deleted to avoid redundancy. The pin_smt utility searches for redundant deals and deletes them.

Important:

To connect to the Portal database, the pin_smt utility needs a configuration file in the same directory. See ”Creating Configuration Files for BRM Utilities” in BRM System Administrator's Guide.

Location

Portal_Home/apps/pin_sub_mig

Syntax

pin_smt [-i input_filename] [-r] [-h]

Parameters

-i input_filename

Populates the /smt_account_mig object with the account details specified in the input.dat file where input_filename is the input.dat file containing subscription mapping data for the subscription migration utility. If the utility runs successfully, the subscription mapping data is migrated to the Portal database. For all the accounts that are migrated successfully, it updates the status to 0 in the /smt_account_mig object. For the accounts that had errors, it updates the status to 1.

-r

Processes only those accounts that are not migrated or have errors.

-h

Displays help information for pin_smt.

Results

If the pin_smt utility does not notify you that it was successful, look in the utility log file (default.pinlog) to find any errors. The log file is in a directory specified in the configuration file. If there are errors, you must correct them manually and rerun the utility using the following option:

pin_smt -r