4 Policy-Driven Charging

This chapter describes how to manage policy-driven charging of services by using Oracle Communications Billing and Revenue Management (BRM).

About Policy-Driven Charging in BRM

Policy-driven charging enables you to track a subscriber's service usage and, based on that usage, change the customer's quality of service (QoS) in real-time rating and in offline rating for offline events such as billing and adjustments.

For example, a subscriber purchases a plan for a certain QoS to download video content. The subscriber makes his choice from one of many plans that you have configured with gradations in the QoS based on usage amounts in megabytes, such as 100-150, 150-200, and 200-250 megabytes. When the subscriber starts downloading video content from the network, you can track the quantity of megabytes that the subscriber downloads during that session. When you find that the downloaded quantity crosses the upper threshold set for the selected QoS (for example 150 megabytes), you can use BRM's policy-driven charging to make a seamless change in the policy set for the subscriber's (video downloading) session on the network and allow a change to the QoS from the current to the next level.

About Setting Up Policy-Driven Charging

To set up policy-driven service charging:

  • Create offer profiles to define ranges in the QoS for the services you offer, and include the offer profiles in your price lists.

    For example, set up high, medium, and low QoS for downloading data from the network, using a noncurrency resource called Megabytes Used. Create an offer profile with a unique name (for example, Platinum). In the offer profile, specify the resource ID 100009 for the noncurrency resource and set the ranges to 100-150, 150-200, and 200-250 megabytes.

  • Link the offer profile to the product or discount with which it is associated so that BRM can track the usage correctly.

    For example, connect the offer profile called Platinum to a product or discount by using Platinum as the provisioning tag for the product or discount. Use the resource ID 100009 for the non-currency resource Megabytes Used configured in the offer profile as the non-currency resource in the rate plan for the product or discount.

  • Set up provisioning rules that state how the network is to provide and manage the services you offer.

    For example, when a subscriber's usage of a video downloading service reaches or crosses a threshold set in the offer profile (for example,150 megabytes of data download), a different rule can be enforced for the network session, based on the subscriber's profile, his balances, his usage of the resource, and the traffic on the network.

    You configure these provisioning rules in the application you use to provide network policy control. Policy controllers (such as Oracle Communications Policy Controller) manage the QoS, optimize high bandwidth traffic, and enforce usage quota levels for subscribers using the network.

    The policy controller installs the provisioning policy on the network element responsible for managing the enforcement of network policies on traffic passing through the network.

    Note:

    Setting up provisioning rules to use in policy-driven charging for network capacity and services is beyond the scope of this document. For more information, see the appropriate references.

In addition to configuring offer profiles for provisioning rules in the policy controller, you must configure the following:

  • Subscriber preferences for communications, such as whether the subscriber wants to be notified, in what language, and so on.

  • Other factors (such as rates) that you use to give better services to more valuable subscribers when network capacity is limited during peak time or in an area.

  • A network connectivity application to start, monitor, and end the online charging services for sessions in the network.

    Network connectivity applications (such as Oracle Communications Online Mediation Controller) communicate with BRM to manage charging sessions.

    Note:

    Setting up the network connectivity application for policy-driven charging is beyond the scope of this document. For more information, see the appropriate references.
  • Event notification to trigger policy-driven charging operations for real-time charging.

How Policy-Driven Charging Works

BRM uses the data you configure in offer profiles to provide you with offer profile threshold breach notifications for both in-session and out-of-session rating events.

Suppose you configure an offer profile called Platinum with specific usage ranges for downloading video content. The non-currency resource such as Megabytes (MB) Used and its usage ranges such as 100-150 megabytes, at 150-200 megabytes, over 200-250 megabytes are defined within a policy label (called Fair Usage).

When your subscriber initiates the downloading of a video,

  • The policy controller communicates with BRM to set up a provisioning policy for the session.

    A provisioning rule is established on the network for the session for an initial quantity, for example, 35 megabytes. The range for the current QoS for the subscriber is 100-150 megabytes.

  • The download begins with the network connectivity application managing the online-charging session.

Throughout that session, whenever the subscriber requests more quota, BRM calculates whether it can allocate the requested amount or if it must readjust the quota.

For example, BRM receives a request with the information that the subscriber has used 35 megabytes and needs 75 megabytes more. BRM does the following:

  • Calculates how much the subscriber has used.

    BRM uses the balance information and consumed reserved amount (across parallel sessions, iPhone, video, and computer) for that subscriber. For example, BRM calculates that the subscriber has used a total of 150 megabytes. With 100-150 megabytes as the range for the current QoS for the subscriber, his usage is at the threshold for the policy.

  • Reduces the allocation, if necessary.

    In the example case, the subscriber has used a total of 150 megabytes. The upper thresholds of the offer profiles are set at 150, 200, and 250 megabytes. The next threshold is 200 megabytes. The available quota for that QoS is 50 megabytes only (200-150). The subscriber has requested 75 megabytes, an amount which is greater than the available quota of 50 megabytes.

    In this scenario, BRM readjusts the quota allocation to 50 megabytes.

When the used amount for the resource crosses a set threshold (150, 200, 250, and so on), the provisioning rule (which was tied to the previous policy level) can no longer be applied for the session.

BRM and the policy controller ensure that a more appropriate rule is established for the session on the network in the following way:

  • BRM sends an offer profile threshold breach notification to the policy controller with information on the threshold breach (150 in our example case) and information on the subscriber's preferences for receiving communications.

  • The policy controller does the following:

    • Communicates with BRM to retrieve the latest information on the subscriber and his usage of the service.

    • Arrives at the new rule which enables the increase in bandwidth.

    • Establishes that provisioning rule for the session.

About Notifications Related to Offer Profiles Sent by BRM

When you set up policy-driven charging for your services, BRM sets up notification events for the following:

  • When you create, modify, or delete the following:

    • Offer profiles

    • Products associated with offer profiles

    • Discounts associated with offer profiles

  • Offer profile threshold breaches

    Offer profile threshold breaches can occur with your subscriber's usage of a resource in a prepaid session. Or, they can occur when BRM processes offline events, such as billing and adjustments.

BRM places these offer profile threshold breach notifications in a central Oracle Advanced Queuing (AQ) database queue for use by customer relationship management (CRM) applications. You can use these applications to retrieve data directly from the Oracle AQ database queue and use the information in these offer profile threshold breach notifications. See BRM Developer's Guide for more information on the Oracle AQ database queue.

BRM provides the following information in offer profile threshold breach notifications associated with policy-driven charging:

  • Service identifier

  • List of aliases that also identify this user/service (ALIAS_LIST)

  • Name of the resource

  • Resource ID

  • Status label from the offer profile

See "Sample Threshold Breach Notification".

Configuring Your BRM Environment to Support Policy-Driven Charging of Services

Configure your BRM environment to support policy-driven charging of services by completing the following:

  1. Set up offer profiles in your price lists. See "About Setting Up and Managing Offer Profiles".

  2. Configure BRM to track a subscriber's usage of the resources you offer. Set up BRM to create notifications tailored to the subscriber's preferences on how they want to be notified when their usage exceeds the threshold set in their offer profiles. See "About Configuring Resources for Tracking by BRM".

  3. Merge the event notification entries specific to policy-driven charging with the BRM event notification list. See "Configuring Event Notification for Policy-Driven Charging".

  4. Enable your enterprise applications to integrate with policy-driven charging in BRM. See "Enabling Enterprise Applications to Handle Policy-Driven Charging Events".

  5. Update the BRM database with reservation preferences configuration for policy-driven charging. See "Updating Reservation Preferences Configuration for Policy-Driven Charging".

  6. Ensure that the Connection Manager can forward the notifications associated with policy-driven charging. See "Updating the Connection Manager for Policy-Driven Charging".

About Setting Up and Managing Offer Profiles

You can create offer profiles when you create a price list or add your offer profile data to an existing price list. See "Setting Up Offer Profiles" for information on setting up the data for offer profiles.

About Using New Resource IDs in Your Offer Profiles

When you start (or restart) your BRM system, BRM caches the set of unique resource IDs that you have configured in your offer profiles. BRM processes a subscriber's usage only if the resource ID is present in its cache.

Note:

When you introduce a resource ID that has not been used in BRM, you must update the entries in this cache. To do so, stop and start the Connection Manager (CM).

Configuring Offer Profile Data

BRM provides sample offer profile data in the default pin_offer_profile_policy_labels.xml file.

This sample file uses the format detailed in the BRM_Home/PricingCenter/price_list.xsd file. BRM_Home is the directory in which you installed the BRM software. Maintain your offer profiles in the format used in the sample file. For more information on using the XML interface, see "Using the XML Pricing Interface to Create a Price List".

Important:

  • Offer profile names must be unique.

  • If you introduce a new resource ID in an offer profile you add to or modify in the database, you must restart the CM after your load the offer profiles.

To configure your offer profile data:

  1. Go to the BRM_Home/setup/scripts directory.

  2. Open the pin_offer_profile_policy_labels.xml file in an XML editor or text editor.

    Tip:

    Save a copy of the default file before you make any changes to it.
  3. Edit this file using the parameters as shown in the file. Table 4-1 describes the elements.

    Table 4-1 Elements Used to Store Offer Profiles

    Element Description

    label

    Name of the policy label

    offer_profile

    Array to hold offer profiles

    offer_profile_code

    Key identifier associated with an offer profile

    offer_profile_name

    Name of an offer profile

    policy_label

    Array to hold policy labels

    price_list

    Price List object within which the offer profile array resides

    resource_id

    Id used for the resource associated with a policy label

    resource_name

    Name of the resource associated with a policy label

    status_label

    Status label name indicating the level of the tier

    tier

    The tier as an array with each entry made up of a status label, and the start and end of the range for that tier level.

    tier_end_range

    Start of the range for a tier level

    tier_start_range

    End of the range for a tier level

    unit

    Unit of the resource associated with a policy label. The values are:

    • None. (0)

    • Second (2)

    • Minute (1)

    • Hour (3)

    • Day (4)

    • Byte (11)

    • Kilobyte (12)

    • Megabyte (13)

    • Gigabyte (14)

    The default value is 0.


    Example 3-1, "Sample Policy Label" shows a sample offer profile.

  4. Save the pin_offer_profile_policy_labels.xml file.

You are now ready to store the offer profiles in the BRM database.

Managing Offer Profile Data

BRM stores offer profiles in /offer_profile objects. Use the loadpricelist utility to load, retrieve, modify, and delete /offer_profile objects.

Note:

Before you use this utility, verify that:
  • The XML offer profile file is complete and follows the guidelines.

  • The Infranet.properties file in your CLASSPATH has the correct login information for the BRM database to which you want to connect.

For more information, see "Prerequisites for the XML Pricing Interface".

Storing Offer Profile Data

Important:

If you introduce a new resource ID in an offer profile you add to the database, you must restart the CM after you load the offer profiles.

To do so, stop and restart the CM.

Use the following command to load offer profiles into your BRM database:

loadpricelist -f -v -c pin_offer_profile_policy_labels.xml

where:

  • -f executes the command without prompting for a confirmation.

  • -v displays information about successful or failed processing as the utility runs

  • -c reads the offer price information from pin_offer_profile_policy_labels.xml and commits it to the BRM database.

The offer profile information is now stored in /offer_profile objects in the database.

Loading Modified Offer Profiles in the Interactive Mode

You can commit the modified offer profile data by using the loadpricelist utility when you are working in the interactive mode.

To load offer profile data only:

write PriceListFile offer_profile PriceObject

where:

  • PriceObject is the specified pricing object in the database.

  • PriceListFile is the entire price list in the database.

For more information on the utility, see "loadpricelist".

Retrieving Offer Profiles

To retrieve offer profile data, use the loadpricelist utility in the following ways:

  • Non-Interactive mode:

    loadpricelist -r PriceListFile
    
  • Interactive mode:

    read PriceListFile
    

The complete price list is returned in the PriceListFile XML file. Use your custom code to retrieve the offer_price objects contained in that price list.

Modifying Offer Profiles

Important:

If you introduce a new resource ID in an offer profile you modify, you must restart the CM after your load the offer profiles.

To modify the offer profile data in the BRM database:

  1. Retrieve the offer profile data and use your custom code to retrieve the offer_price objects. See "Retrieving Offer Profiles".

  2. Modify the offer_price objects as necessary.

  3. Configure the offer profile data in XML format. See "Configuring Offer Profile Data".

  4. Commit the modified offer profile data into the database. See "Storing Offer Profile Data".

  5. If you added a new resource ID to any offer profile, stop and restart the CM.

Deleting Offer Profiles

Delete offer profiles using the loadpricelist utility in the following ways:

  • Non-Interactive mode:

    loadpricelist -p
    

    This command deletes all the pricing objects from the database.

  • Interactive mode:

    delete offer_profile PriceObject
    

    Note:

    If you use the delete command without any parameters, all in-memory pricing information is deleted from the database.

About Configuring Resources for Tracking by BRM

Configure the resources that BRM should track by setting up provisioning tags for your services as shown in the BRM_Home/sys/data/config pin_offer_profile_provisioning_tags_policy_attributes.xml file. For each provisioning tag, configure the types of resources valid for that tag and provide information on the specific opcode which must be called to process changes to the product or discount associated with that provisioning tag.

The pin_offer_profile_provisioning_tags_policy_attributes.xml file contains the configuration for the default provisioning tag which BRM provides. See Example 5-1, "Default Provisioning Tag Configuration". The first section of this file lists the valid resources for the default provisioning tag. The next section contains information on the opcodes to be called when the product or discount containing the provisioning tag is purchased or canceled, the parameters that specify the fields to be added to the opcode's input flist, and the value for each field.

See "Configuring Provisioning Tags for Policy-Driven Charging" for more information.

Configuring Event Notification for Policy-Driven Charging

To configure event notification for policy-driven charging, you must merge the policy-driven charging event notification list with the general BRM event notification list.

Each event in an event notification list is mapped to the opcode or opcodes that are executed when the event occurs. The event notification list for policy-driven charging contains of entries for offer profiles and for the products and discounts associated with them.

Example 4-1 shows the event notification list for offer profiles:

Example 4-1 Event Notifications Related to Offer Profiles

1301    0      /event/notification/offer_profile/create
1301    0      /event/notification/offer_profile/update
1301    0      /event/notification/offer_profile/delete
1301    0      /event/notification/offer_profile/ThresholdBreach

BRM uses the Enterprise Application Integration (EAI) framework publishing opcode, PCM_OP_PUBLISH_GEN_PAYLOAD (number 1301), to set up event notifications for offer profiles. This opcode is internal to BRM.

Example 4-2 shows the event notification list for products and discounts associated with offer profiles:

Example 4-2 Billing and Product Event Notification Entries

301     0       /event/billing/product/action/purchase
301     0       /event/billing/product/action/modify
301     0       /event/billing/product/action/cancel
301     0       /event/billing/product/action/modify/status
301     0       /event/billing/discount/action/purchase
301     0       /event/billing/discount/action/modify
301     0       /event/billing/discount/action/cancel
301     0       /event/billing/discount/action/modify/status

The 301 entry is the opcode number for the PCM_OP_ACT_POL_EVENT_NOTIFY policy opcode. See "About the PCM_OP_ACT_POL_EVENT_NOTIFY Policy Opcode".

For more information on event notification, see "Using Event Notification" in BRM Developer's Guide.

Merging the Policy-Driven Event Notification List with the BRM Event Notification List

To merge the policy-driven event notification list with the BRM event notification list:

  1. Verify that the list entries for policy-driven charging are enabled. See "Verifying That Policy-Driven Charging Event Notification List Entries Are Enabled".

  2. Merge the list for policy-driven charging with the general BRM list. See "Merging Event Notification Lists".

  3. Load the updated event notification data into the BRM database. See "Loading the Updated Event Notification File into the BRM Database".

Verifying That Policy-Driven Charging Event Notification List Entries Are Enabled

To verify that the policy-driven charging event notification list entries are enabled:

  1. Open the BRM_Home/sys/data/config/pin_notify_ipc file in a text editor.

    Tip:

    Save a copy of the default file before you change it.
  2. Verify the following:

    • The offer profile notifications are enabled as shown in Example 4-1.

    • The billing event notifications for product and discount objects are enabled as shown in Example 4-2.

  3. Save and close the file.

For more information, see "Editing the Event Notification List" in BRM Developer's Guide.

Merging Event Notification Lists

Merge the event notification list in the pin_notify_ipc file with the event notification list in the pin_notify file. For more information, see "Merging Event Notification Lists" in BRM Developer's Guide.

Loading the Updated Event Notification File into the BRM Database

To enable event notification for policy-driven charging, run the load_pin_notify utility to load the merged event notification list into the BRM database. For more information, see "Loading the Event Notification List" in BRM Developer's Guide.

Enabling Enterprise Applications to Handle Policy-Driven Charging Events

Complete the following operations to enable your enterprise applications to handle policy-driven charging event notifications that BRM publishes:

  1. Verifying That BRM Is Integrated with Your Enterprise Applications

  2. Enabling Enterprise Applications to Process Policy-Driven Charging Events

  3. Specifying the Payload Configuration File to Use

For more information, see "Integrating BRM with Enterprise Applications" in BRM Developer's Guide.

Verifying That BRM Is Integrated with Your Enterprise Applications

For your enterprise applications to use the offer profile event notifications published by BRM, ensure that BRM is integrated with other applications in your enterprise. To do so, ensure that EAI Manager is installed.

For more information, see "About Installing EAI Manager" in BRM Developer's Guide.

Enabling Enterprise Applications to Process Policy-Driven Charging Events

You enable your enterprise applications to receive the notifications that BRM publishes when it processes policy-driven charging events.

When a customer buys, modifies, cancels a product or discount that is associated with an offer profile, BRM publishes a business event (such as ProductPurchase when the customer buys a product). If an offer profile is created, modified, deleted or there is an threshold breach, BRM publishes a related business event (for example, OfferProfileCreate, when an offer profile is initially stored in the database).

Business events associated with policy-driven charging are defined in the BRM_Home/sys/eai_js/payloadconfig_ipc.xml payload configuration file. BRM provides default definitions of business events in the BRM_Home/sys/eai_js/payloadconfig.xml payload configuration file.

If you already use a payload configuration file (for example, payloadconfig.xml) in your BRM environment, set up one payload configuration file to contain the definitions of all your business events.

Setting Up One Payload Configuration File

Set up one payload configuration file by doing the following:

  1. Merge the contents of payloadconfig_ipc.xml (the payload configuration file for policy-driven charging) with your current payload configuration file (such as, payloadconfig.xml).

    Tip:

    Save a copy of the default payload configuration files before merging them.
  2. Save the merged file under a different name (for example, your_payloadconfig.xml).

Specifying the Payload Configuration File to Use

To specify the payload configuration file to use:

  1. Open BRM_Home/sys/eai_js/Infranet.properties in a text editor.

    This is the payload generator external module eai_js properties file.

  2. Point the infranet.eai.configFile entry to the appropriate payload configuration file.

    For example:

    infranet.eai.configFile=/pinhome/pin201/opt/portal/7.5/sys/eai_js/your_payloadconfig.xml
    

    where your_payloadconfig.xml is the merged payload configuration file containing the business event entries associated with policy-driven charging.

  3. Save and close the file.

  4. Restart eai_js.

For more information, see "Configuring the EAI payload for the Synchronization Queue DM" in BRM Synchronization Queue Manager.

Updating Reservation Preferences Configuration for Policy-Driven Charging

To update the reservation preferences configuration for services associated with policy-driven charging:

  1. Add information on how the resource is to be rated (for example, by duration, by volume, by both duration and volume, or by occurrence). See "Updating Reservation Preferences Configuration Settings for Resources".

    Note:

    Policy-driven charging of services does not support prerated events.
  2. Load the reservation preferences into the BRM database. See "Loading Reservation Preferences for Policy-Driven Charging".

Updating Reservation Preferences Configuration Settings for Resources

BRM stores the default entries for reservation preferences associated with policy-driven charging in the pin_config_reservation_aaa_prefs_XXX file. For example:

  • pin_config_reservation_aaa_prefs_gsm_telephony (GSM telephony)

  • pin_config_reservation_aaa_prefs_gsm_data (GSM data)

  • pin_config_reservation_aaa_prefs_gprs (GPRS)

To configure the resource ID for the appropriate counters:

  1. Open the BRM_Home/sys/data/config/pin_config_reservation_aaa_prefs_XXX file in a text editor.

    For our example, open the BRM_Home/sys/data/config/pin_config_reservation_aaa_prefs_gsm_data file, where BRM_Home is the directory in which BRM is installed.

  2. Add an entry to specify the appropriate resource ID with the entity to be rated, such as duration (2), volume (3), duration and volume (4), or occurrence (8).

    For example:

    1 PIN_FLD_RESOURCE_ID INT [0] 1000009 in REQ_MODE 4
    

    Here, a noncurrency resource, (Megabytes Used) with the resource ID 100009 is associated with a volume-based request (REQ_MODE 4).

  3. Save and close the file.

For more information, see "Editing the Event Notification List" in BRM Developer's Guide.

Loading Reservation Preferences for Policy-Driven Charging

To load the reservation preferences list for policy-driven charging:

  1. Go to the BRM_Home/sys/data/config directory.

  2. Use the following command to run the load_config_reservation_aaa_prefs utility:

    load_config_reservation_aaa_prefs -d -v load_config_reservation_aaa_prefs_XXX
    

    where:

    • -d creates a log file for debugging purposes.

    • -v displays information about successful or failed processing as the utility runs.

    • load_config_reservation_aaa_prefs_XXX is the reservation configuration file.

    For example:

    load_config_reservation_aaa_prefs -d -v pin_config_reservation_aaa_prefs_gsm_data
    

    For information on the load_config_reservation_aaa_prefs utility, see "load_config_reservation_aaa_prefs" in BRM Telco Integration.

  3. To verify that the reservation preferences were loaded, display the /config/reserve object by using Object Browser or the robj command with the testnap utility.

  4. Stop and restart the CM.

For more information, see "Specifying Default Authorization and Reauthorization Values" in BRM Telco Integration.

Updating the Connection Manager for Policy-Driven Charging

If you use offer profiles in price lists, ensure that you update the CM configuration file, BRM_Home/sys/cm/pin.conf, for the following:

About Configuring the Required Memory for Offer Profiles Cache

The offer profile cache called fm_offer_profile_cache is loaded with all /offer_profile objects at the initialization of the fm_offer_profile library. The fm_offer_profile_cache cache stores the last updated timestamp along with each /offer_profile object.

Important:

Restart the CM after you make any change to the offer profile configuration entry in the pin.conf file.

To update the pin.conf file for the fm_offer_profile_cache entry, see "Updating the pin.conf Configuration File for Offer Profiles".

About Referencing Offer Profile Related Variables in pin.conf Files

You can reference the system environment variable for offer profiles in pin.conf configuration file to facilitate future migration of the pin.conf file to BRM implementations on other platforms. See "System Administration pin.conf Reference" in BRM System Administrator's Guide.

Important:

Restart the CM after you make any change to the /offer_profile object.

To update the pin.conf file for this entry, see "Updating the pin.conf Configuration File for Offer Profiles".

Updating the pin.conf Configuration File for Offer Profiles

To update the CM pin.conf file:

  1. Open the BRM_Home/sys/cm/pin.conf file in a text editor.)

  2. Configure the required memory for the offer profile cache using appropriate values for number_of_entries, cache_size, hash_size in the following command. Add this line, if necessary.

    - cm_cache fm_offer_profile_cache number_of_entries cache_size hash_size
    

    For example:

    - cm_cache fm_offer_profile_cache 20, 102400, 13
    

    For more information, see "Improving Performance for Loading Large Price Lists" in BRM System Administrator's Guide

  3. Verify that the following command to reference the offer profile environmental variable from within the pin.conf file is present in the file:

    - cm fm_module ${PIN_HOME}/lib/fm_offer_profile${LIBRARYEXTENSION} fm_offer_profile_config fm_offer_profile_init pin
    

    Uncomment this command if it is commented, or add this command if it is not present in the pin.conf file.

    For more information, see "Preparing for Platform Migration by Using Variables in pin.conf Files" in BRM System Administrator's Guide.

  4. Save the file.

  5. Stop and restart the CM.

For more information, see "Improving Connection Manager Performance" in BRM System Administrator's Guide.

Customizing Information Received from BRM

BRM uses the following opcodes to support offer profile threshold notifications:

  • PCM_OP_BAL_APPLY_MULTI_BAL_IMPACTS

  • PCM_OP_BAL_POL_APPLY_MULTI_BAL_IMPACTS

  • PCM_OP_OFFER_PROFILE_CHECK_POLICY_THRESHOLD

  • PCM_OP_TCF_AAA_POL_GET_SUBSCRIBER_PROFILE

  • PCM_OP_ACT_POL_EVENT_NOTIFY

This section describes these opcodes and how you can customize them, if necessary.

About the PCM_OP_BAL_APPLY_MULTI_BAL_IMPACTS Opcode

BRM uses the PCM_OP_BAL_ APPLY_MULTI_BAL_IMPACTS opcode to process both offline and online charging events. This opcode retrieves the current balance and calls PCM_OP_BAL_POL_APPLY_MULTI_BAL_IMPACTS policy opcode.

About the PCM_OP_BAL_POL_APPLY_MULTI_BAL_IMPACTS Policy Opcode

The PCM_OP_BAL_POL_APPLY_MULTI_BAL_IMPACTS policy opcode sets up an offer profile threshold breach notification when it encounters a threshold breach in a customer's usage of a resource defined in an offer profile (associated with the customer's purchased rate plan).

When the policy opcode is called by BRM as part of an authorization or reauthorization of a subscriber's request to use a service, it sets up an in-session notification for the offer profile threshold breach it encounters for the customer's usage of the resource. When the policy opcode is called by BRM during billing or accounts receivable operations, it sets up an out-of-session notification for the offer profile threshold breach it encounters for the customer's usage of the resource.

The PCM_OP_BAL_POL_APPLY_MULTI_BAL_IMPACTS policy opcode does not handle prerated events.

When you start (or restart) Connection Manager, BRM caches the set of unique resource IDs that you have configured in your offer profiles. The PCM_OP_BAL_POL_APPLY_MULTI_BAL_IMPACTS policy opcode uses this cache of resource IDs as the initial filter when applying the balance impact of each resource to retrieve the offer profile information and determine if an offer profile threshold notification is necessary. If a resource is not present in the cached entries, this policy opcode does not retrieve the offer profile information for that resource. Consequently, it will not set up an offer profile threshold breach notification, even if such a notification is necessary.

Important:

If you introduce a new resource ID, stop and restart the CM.

How Balances Are Processed for Out-of-Session Notifications

For out-of-session rating events, the PCM_OP_BAL_POL_APPLY_MULTI_BAL_IMPACTS policy opcode uses the offer profile associated with the product or discount that granted this resource (called the grantor object).

The policy opcode retrieves all the services associated with the balance group and records an offer profile threshold breach notification event for all the services where an offer profile threshold was breached.

How Balances Are Processed for Notifications for Prepaid Sessions

For in-session rating events, the PCM_OP_BAL_POL_APPLY_MULTI_BAL_IMPACTS policy opcode sets up offer profile threshold breach notifications for the subscriber only. It does not take resource sharing into consideration when it sets up these notifications.

This policy retrieves the offer profile associated with the purchased product or discount in the balance impact data it received from the rating process. It uses the offer profile information, the subscriber's current balances and the consumed reservation amount for the resource to determine whether an offer profile threshold was breached. If so, it records an offer profile threshold breach notification event.

Customizing Information in Offer Profile Threshold Breach Notifications

See "Sample Threshold Breach Notification" for the default information in an offer profile threshold breach notification. You can customize the PCM_OP_BAL_POL_APPLY_MULTI_BAL_IMPACTS policy opcode to retrieve other information on the resource usage.

About the PCM_OP_OFFER_PROFILE_CHECK_POLICY_THRESHOLD Opcode

The PCM_OP_OFFER_PROFILE_CHECK_POLICY_THRESHOLD opcode uses offer profiles passed in the input flist to retrieve the dynamic information for a given service identifier and resource ID.

BRM calls this opcode to perform the following operations:

For more information on the PCM_OP_OFFER_PROFILE_CHECK_POLICY_THRESHOLD opcode, see Opcode Flist Reference.

Determining Whether Balance Impacts Trigger Notifications

To determine whether any threshold breach notifications result from balance impacts due to the resource usages, BRM calls the PCM_OP_OFFER_PROFILE_CHECK_POLICY_THRESHOLD opcode with the balances (without current impact) stored in the BALANCES array of opcode's input flist.

The PCM_OP_OFFER_PROFILE_CHECK_POLICY_THRESHOLD opcode does the following:

  1. Calculates the sum of the current balance and the consumed reservation from the BALANCES array.

  2. Locates old used quota and the last threshold notification.

  3. Calls the PCM_OP_BAL_GET_PREPAID_BALANCES opcode with the resource ID to compute the new used amount.

    The PCM_OP_BAL_GET_PREPAID_BALANCES opcode returns the sum of the updated current balance and consumed reservation as the new used amount.

  4. Locates the status label, offer profile name and policy label name for the tier with the nearest threshold. To do so, it employs the new used amount and the range from the last threshold notification.

  5. Calculates the offset to the next threshold as the difference between the new used amount and the next threshold on that tier.

  6. Sets the PIN_FLD_INDICATOR field in the output to 0 if there is a breach. And returns the calculated offset to the next threshold.

Readjusting Quotas for Requests to Update and Authorize

BRM calls the PCM_OP_OFFER_PROFILE_CHECK_POLICY_THRESHOLD opcode with the additional quota reported by the network in the QUANTITY field of the input list.

The PCM_OP_OFFER_PROFILE_CHECK_POLICY_THRESHOLD opcode does the following:

  1. Calls the PCM_OP_BAL_GET_PREPAID_BALANCES opcode with the resource ID to retrieve the current balance and consumed reservation.

  2. Calculates the total used as the sum of the current balance, the consumed reservation, and the additional quantity reported by the network.

  3. Locates the status label, offer profile name, and policy label name for the tier with the nearest threshold with reference to the total used amount.

  4. Calculates the offset to the next threshold as the difference between the new used amount and the next threshold on that tier.

  5. Returns the calculated offset to the next threshold

Readjusting Quotas for Other AAA Requests

When called to readjust the quota for AAA requests other than the update and reauthorize request, the PCM_OP_OFFER_PROFILE_CHECK_POLICY_THRESHOLD opcode does the following:

  1. Retrieves the current balance and consumed reservation by calling the PCM_OP_BAL_GET_PREPAID_BALANCES opcode with the resource ID.

  2. Calculates the total used as the sum of the current balance and the consumed reservation.

  3. Locates the status label, offer profile name and policy label name for the tier with the nearest threshold with reference to the total used amount.

  4. Calculates the offset to the next threshold as the difference between the new used amount and the next threshold on that tier.

  5. Returns the calculated offset to the next threshold.

About the PCM_OP_TCF_AAA_GET_SUBSCRIBER_PROFILE Opcode

The PCM_OP_TCF_AAA_GET_SUBSCRIBER_PROFILE opcode returns the following information from the database:

  • All the information associated with a subscriber's mobile station ID (MSID)

  • Specific service only for a given object identifier (POID)

The PCM_OP_TCF_AAA_GET_SUBSCRIBER_PROFILE opcode uses the internal PCM_OP_OFFER_PROFILE_GET_OFFER_PROFILE opcode to fetch the necessary information. It returns the information in the PIN_FLD_RESULTS array with PIN_FLD_ACCOUNT containing information associated with the account and PIN_FLD_SERVICE_INFO containing information on the services.

The opcode returns the following information based on the value you input for the PIN_FLD_MODE entry when you call this opcode:

  • Static information on the resource used by a subscriber such as offer profiles and subscriber's preference data (PIN_FLD_MODE is 1)

  • Dynamic information such as current balances for the various resources (PIN_FLD_MODE is 2)

  • Both types of information (PIN_FLD_MODE is 3)

For more information on the PCM_OP_TCF_AAA_GET_SUBSCRIBER_PROFILE opcode, see Opcode Flist Reference.

Customizing Information Received from BRM

Use the PCM_OP_TCF_AAA_POL_GET_SUBSCRIBER_PROFILE policy opcode to customize the information your network policy controlling application retrieves from BRM.

By default, PCM_OP_TCF_AAA_POL_GET_SUBSCRIBER_PROFILE policy opcode calls the PCM_OP_TCF_AAA_GET_SUBSCRIBER_PROFILE opcode and returns the output from that opcode.

For more information on the PCM_OP_TCF_AAA_POL_GET_SUBSCRIBER_PROFILE policy opcode, see Opcode Flist Reference.

About the PCM_OP_ACT_POL_EVENT_NOTIFY Policy Opcode

When a product or discount associated with an offer_profile is purchased, canceled, or modified, the PCM_OP_ACT_POL_EVENT_NOTIFY policy opcode calls the PCM_OP_OFFER_PROFILE_GET_OFFER_PROFILE opcode to retrieve the associated offer profile data and adds it to the event notification. The PCM_OP_OFFER_PROFILE_GET_OFFER_PROFILE opcode is internal to BRM. See "About the PCM_OP_TCF_AAA_GET_SUBSCRIBER_PROFILE Opcode" for more information.

For more information on the PCM_OP_ACT_POL_EVENT_NOTIFY policy opcode, see Opcode Flist Reference.

Customizing Information in Event Notifications for Policy-Driven Charging

Use the PCM_OP_ACT_POL_EVENT_NOTIFY policy opcode to customize the event notification information associated with policy-driven charging that you want to receive from BRM.

Managing Offer Profiles with Opcodes

You can manage offer profile data using price list opcodes and offer profile opcodes.

Managing Offer Profile Data with Price List Opcodes

Use the PCM_OP_PRICE_SET_PRICE_LIST and PCM_OP_PRICE_GET_PRICE_LIST opcodes to manage your offer profiles.

Creating, Modifying, and Deleting Offer Profiles with PCM_OP_PRICE_SET_PRICE_LIST

The PCM_OP_PRICE_SET_PRICE_LIST opcode searches the database for each offer profile in the PIN_FLD_OFFER_PROFILES array. To create or modify offer profiles in the database, input the /offer_profile objects in the PIN_FLD_OFFER_PROFILES array. To delete an offer profile from the database, input the /offer_profile object in the PIN_FLD_OFFER_PROFILES array and specify the PIN_FLD_DELETE_FLAG entry in the input flist.

The PCM_OP_PRICE_SET_PRICE_LIST opcode searches the database for each offer profile in the PIN_FLD_OFFER_PROFILES array and does one of the following:

  • If the offer profile is not found, the opcode creates and stores an /offer_profile object with this data.

  • If the offer profile is found, the opcode retrieves that /offer_profile object and does one of the following:

    • If the PIN_FLD_DELETE_FLAG entry is not present in the input flist, the opcode updates /offer_profile, and stores the updated object.

    • If the PIN_FLD_DELETE_FLAG entry is present in the input flist, the opcode deletes the /offer_profile object from the database.

See "Managing Price Lists" for more information.

Retrieving Offer Profiles with PCM_OP_PRICE_GET_PRICE_LIST

Use the PCM_OP_PRICE_GET_PRICE_LIST opcode to retrieve the contents of an /offer_profile object from the database. The PIN_FLD_OFFER_PROFILES array in the output contains the /offer_profile objects.

See "Managing Price Lists" for more information.

Managing Offer Profiles with Offer Profile Opcodes

Manage offer profile data using the following:

About the PCM_OP_OFFER_PROFILE_SET_OFFER_PROFILE Opcode

Use the PCM_OP_OFFER_PROFILE_SET_OFFER_PROFILE opcode to create, modify, and delete offer profiles.

Input the offer profiles in the PIN_FLD_OFFER_PROFILES array. To delete an offer profile, specify the PIN_FLD_DELETE_FLAG entry for the offer profile in the input flist.

The opcode searches the database for the offer profiles in the PIN_FLD_OFFER_PROFILES array and does one of the following:

  • If the offer profile is not found, the opcode creates and stores an /offer_profile object with this data.

  • If the offer profile is found, the opcode retrieves that /offer_profile object and

    • If the PIN_FLD_DELETE_FLAG entry is not present in the input flist, it updates /offer_profile, and stores the updated object.

    • If the PIN_FLD_DELETE_FLAG entry is present in the input flist, it deletes the /offer_profile object.

For more information on the PCM_OP_OFFER_PROFILE_SET_OFFER_PROFILE opcode, see BRM Developer's Reference.

Customizing Subscriber Preferences Data for Policy-Driven Charging

BRM stores the default entries for subscriber preferences associated with policy-driven charging in the config_subscriber_preferences_map.xml file.

To customize subscriber preferences data for policy-driven charging:

  1. Open the BRM_Home/sys/data/config/config_subscriber_preferences_map.xml configuration file in a text editor.

  2. Edit the file as necessary. You can add other subscriber preferences.

    The elements in the XML file are described in the discussion on subscriber preferences in BRM Telco Integration.

  3. Save and close the file.

See "Managing Subscriber Preferences" in BRM Telco Integration.

Customizing Business Events Associated with Policy-Driven Charging

If you customize business events associated with policy-driven charging, include your definitions of these events in the payloadconfig_ipc.xml configuration file. For more information, see "About Publishing Additional Business Events" in BRM Developer's Guide.

Sample Threshold Breach Notification

Example 4-3 shows the contents of a sample offer profile threshold breach notification.

Example 4-3 Sample Offer Profile Threshold Breach Notification

PIN_EVENT_TY('ThresholdBreach', '<?xml version="1.0"?>
<ThresholdBreach Version="1.0">
   <service_obj>0.0.0.1 /service/telco 223789 7</service_obj>
   <account_obj>0.0.0.1 /account 10 1 </account_obj>
   <login>test</login>
   <alias_list>  
      <name>694-20120607-231907-3-9178 --157566752-slc.example.com</name>
   </alias_list>
   <resource_list>
      <resource_name>Megabytes Used</resource_name>
      <resource_id>100009</resource_id>
      <current_bal>35.28</current_bal>
      <unit>0</unit>
      <threshold_breach >
     <status_label>HIGH_QOS</status_label>
     <delta_to_next_threshold>14.72</delta_to_next_threshold>
     <policy_label>Fair Usage</policy_label>
     <offer_profile_name>platinum</offer_profile_name>
     </threshold_breach>
   </resource_list>
</ThresholdBreach>