10 Configuring Billing for Groups and Hierarchies

Learn how to configure the way Oracle Communications Billing and Revenue Management (BRM) bills sharing groups and account hierarchies.

Topics in this document:

Setting Up Billing for Charge and Discount Sharing Groups

By default, when billing is run, bill units are billed in this order:

  1. All nonpaying child bill units in all accounts.

  2. All remaining bill units in all accounts.

If you have discount or charge sharing groups in your BRM system, you must reconfigure your system to bill accounts in this order:

  1. All nonpaying child bill units in all accounts.

  2. All remaining discount group member bill units in all member accounts.

  3. All remaining charge sharing group member bill units in all member accounts.

  4. All remaining bill units in all accounts.

This ensures that billing is run for all member accounts before it is run for any discount or charge sharing group owner account.

Note:

If you do not reconfigure your system, discount and charge sharing group owner accounts might be billed before some of their member accounts. When this occurs, the members' sponsored charges are not included in the owner's bill for the current billing cycle. Instead, they are added to the owner's bill for the next billing cycle.

To enable this feature, run the pin_bus_params utility to change the BillingFlowSponsorship business parameter. For information about this utility, see BRM Developer's Guide.

The following setups ensure that two-level discount and charge sharing relationships are correctly billed. For sharing relationships that exceed two levels, the billing sequence might be incorrect, resulting in incorrect billing.

For example, suppose account A owns a sharing group to which account B belongs, and account B owns a sharing group to which account C belongs. Owner account A and member account B are billed in the correct order: member before owner. Owner account B and member account C, however, might not be billed in the correct order. This happens because B is an owner of account C's group and a member of account A's group. As a member, it is billed at the same time all other member accounts are billed and thus might be billed before account C.

To set up billing for charge sharing groups:

  1. Go to BRM_home/sys/data/config.

  2. Use the following command to create an editable XML file from the Billing instance of the /config/business_params object:

    pin_bus_params -r BusParamsBilling bus_params_billing.xml

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

  3. In bus_params_billing.xml.out, set the following entry:

    <BillingFlowSponsorship>value</BillingFlowSponsorship>

    where value is one of the following:

    • sponsorsFirst: Specifies to bill group owner accounts before member accounts.

    • sponsoreesFirst: Specifies to bill member accounts before owner accounts.

    • undefined: Specifies that the billing order of owner and member accounts does not matter. This is the default.

    Caution:

    BRM uses the XML in this file to overwrite the existing instance of the /config/business_params object. Use care when updating parameters in the file.

  4. Save and exit the file.

  5. Rename the bus_params_billing.xml.out file to bus_params_billing.xml.

  6. Use the following command to load your changes into the /config/business_params object:

    pin_bus_params bus_params_billing.xml

    You should run this command from the BRM_home/sys/data/config directory, which includes support files used by the utility. To run it from a different directory, see "pin_bus_params" in BRM Developer's Guide.

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

    For general instructions on using testnap, see "Using the testnap Utility to Test BRM" in BRM Developer's Guide. For information on how to use Object Browser, see "Reading Objects" in BRM Developer's Guide.

  8. Stop and restart the Connection Manager (CM).

    For more information, see "Starting and Stopping the BRM System" in BRM System Administrator's Guide.

To set up billing for discount sharing groups:

  1. Go to BRM_home/sys/data/config.

  2. Use the following command to create an editable XML file from the Billing instance of the /config/business_params object:

    pin_bus_params -r BusParamsBilling bus_params_billing.xml

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

  3. In bus_params_billing.xml.out, set the following entry:

    <BillingFlowDiscount>value</BillingFlowDiscount>

    where value is one of the following:

    • discountParentsFirst: Specifies to bill group owner accounts before member accounts.

    • memberDiscountFirst: Specifies to bill member accounts before owner accounts.

    • undefined: Specifies that the billing order of owner and member accounts does not matter. This is the default.

    Caution:

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

  4. Save and exit the file.

  5. Rename the bus_params_billing.xml.out file to bus_params_billing.xml.

  6. Use the following command to load your changes into the /config/business_params object:

    pin_bus_params bus_params_billing.xml

    You should run this command from the BRM_home/sys/data/config directory, which includes support files used by the utility. To run it from a different directory, see "pin_bus_params" in BRM Developer's Guide.

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

    For general instructions on using testnap, see "Using the testnap Utility to Test BRM" in BRM Developer's Guide. For information on how to use Object Browser, see "Reading Objects" in BRM Developer's Guide.

  8. Stop and restart the Connection Manager (CM).

    For more information, see "Starting and Stopping the BRM System" in BRM System Administrator's Guide.

Skipping Validation of Billing for Nonpaying Child Bill Units

If you use bill unit hierarchies, BRM validates that all nonpaying bill units have been billed successfully before billing the paying parent bill unit. When billing fails for a nonpaying child bill unit, the parent bill unit is not billed. In rare instances, however, when billing for the nonpaying child bill unit continuously fails and you want to proceed with billing the parent bill unit, you can skip validation of billing for the nonpaying child bill unit.

To enable this feature, run the pin_bus_params utility to change the SkipCheckForSubordinatesBilled business parameter. For information about this utility, see "pin_bus_params" in BRM Developer's Guide.

To skip validation of billing for nonpaying child bill units:

  1. Go to BRM_home/sys/data/config.

  2. Use the following command to create an editable XML file from the Billing instance of the /config/business_params object:

    pin_bus_params -r BusParamsBilling bus_params_billing.xml

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

  3. In bus_params_billing.xml.out, set SkipCheckForSubordinatesBilled to enabled:

    <SkipCheckForSubordinatesBilled>enabled</SkipCheckForSubordinatesBilled>

    Caution:

    BRM uses the XML in this file to overwrite the existing instance of the /config/business_params object. Use care when updating parameters in the file.

  4. Save and exit the file.

  5. Rename the bus_params_billing.xml.out file to bus_params_billing.xml.

  6. Use the following command to load your changes into the /config/business_params object:

    pin_bus_params bus_params_billing.xml

    You should run this command from the BRM_home/sys/data/config directory, which includes support files used by the utility. To run it from a different directory, see "pin_bus_params" in BRM Developer's Guide.

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

    For general instructions on using testnap, see "Using the testnap Utility to Test BRM" in BRM Developer's Guide. For information on how to use Object Browser, see "Reading Objects" in BRM Developer's Guide.

  8. Stop and restart the Connection Manager (CM).

    For more information, see "Starting and Stopping the BRM System" in BRM System Administrator's Guide.

About Changing the Billing Day of Month for Large Hierarchies

You can change the billing day of month (DOM) for parent accounts and child accounts in large hierarchies.

By default, BRM changes the billing DOM for the parent account and its child accounts as a single transaction. For accounts in a large hierarchy, the changes are first applied to the parent account followed by its child accounts. This locks the parent account, restricting any other operations during the process.

However, you can configure BRM to update the billing DOM for the parent account and its child accounts asynchronously. This is done through a multithreaded application that performs parallel updates for all accounts. It also removes the need to lock the parent account while updating the child accounts.

To change the billing DOM for large hierarchies synchronously, see "Editing a Bill Unit" in Billing Care Online Help.

To change the billing DOM for wholesale hierarchies asynchronously:

  1. Configure the parent account to use the appropriate business profile. See "Loading the Business Profile for Changing the Billing Day of Month Asynchronously".

  2. Change the billing DOM for the wholesale hierarchy. See "Changing the Billing Day of Month Asynchronously for All Accounts in Large Hierarchies".

  3. Run the pin_update_bdom utility regularly. See "Processing Asynchronous Change in Billing Day of Month".

Loading the Business Profile for Changing the Billing Day of Month Asynchronously

Note:

The change in the billing DOM takes effect from the next billing cycle.

To enable BRM for changing the billing DOM asynchronously, you need to load the AsyncBDOMChange business profile, or a custom profile that contains the AsyncBDOMChange key set to yes, into the BRM database. You can do this by loading the standard business profiles or editing your custom business profile to include the AsyncBDOMChange key set to yes and then loading your custom profile.

For the standard business profile:

  1. Go to the directory that contains the pin_business_profile.xml file. By default, this file is in the BRM_home/sys/data/config directory.

  2. Load the pin_business_profile.xml file into the database by running the following command:
    load_pin_business_profile pin_business_profile.xml

For your custom business profile:

  1. Open the file containing your business profiles in an XML editor or a text editor.

  2. Inside your custom profile, add a new NameValue as follows:

    <NameValue key="AsyncBDOMChange" value="yes" />
  3. Save and close the file.

  4. Load the file into the database by running the following command:

    load_pin_business_profile yourFileName

    where yourFileName is the name of the file containing your custom business profile.

For general information about business profiles, see "Creating and Managing Business Profiles" in BRM Managing Customers.

Changing the Billing Day of Month Asynchronously for All Accounts in Large Hierarchies

There are several different ways to change the billing DOM asynchronously for all accounts in large hierarchies. To change the billing DOM for the parent account asynchronously, you must set its Business Profile to AsyncBDOMChange or to a custom profile that contains the AsyncBDOMChange key set to yes.

You can change the billing DOM for all the accounts in large hierarchies using:

  • Billing Care. For more information, see "Changing the Billing Day of Month for Wholesale Billing Hierarchy" in Billing Care Online Help.

  • A custom client application calling the PCM_OP_CUST_SET_BILLINFO opcode. See "Updating Bill Units" in BRM Opcode Guide.

  • A custom client application calling the following Billing Care REST API endpoint:

    /bcws/webresources/v1.0/billunits/account/{id}

    For more information, see REST API Reference for Billing Care.

Processing Asynchronous Change in Billing Day of Month

You use the pin_update_bdom utility to process deferred billing DOM jobs. You can run the utility regularly by creating a cron job or by using Business Operations Center.

Note:

The utility performs jobs for open and inactive accounts only.

The utility does the following:
  1. Searches the /job/bdom object for jobs associated with the specified parent account or bill unit.

    If the utility is run without parameters, it finds /job/bdom jobs with a status of NEW or PARTIALLY_COMPLETE.

  2. Finds all child bill units whose account receivables (A/R) field in the /billinfo object matches the /billinfo object provided for the wholesale parent.

  3. Updates the job’s status to IN_PROGRESS.

  4. For each bill unit, it generates a thread that calls the PCM_OP_CUST_SET_BILLINFO opcode to update the bill unit’s billing DOM.

  5. Determines whether the job processed successfully.
    • If all bill units were updated successfully, it sets the job’s status to SUCCESS.

    • If any bill unit could not be updated, it sets the job’s status to ERROR.

    • If the pin_update_bdom utility is run with the -count option, it sets the job status to PARTIALLY_COMPLETE once the job is completed.

For more information on how to run the utility, see "pin_update_bdom".

If the utility runs into errors or crashes, rerun the utility with the -retry option to continue to process bill units in all jobs with errors. For example:

pin_update_bdom -retry

To do this for a specific job, also include the -billinfo option. For example:

pin_update_bdom -retry -billinfo POID
The status of the job changes based on its current stage, which is one of the following:
  • NEW: Indicates that there is no change in billing DOM for any bill units so far.

  • PARTIALLY_INCOMPLETE: Indicates that some of the bill units have been updated.

  • IN_PROGRESS: Indicates that the change in billing DOM is in progress.

  • ERROR: Indicates that the utility has run into an error.

  • SUCCESS: Indicates that all the bill units have been updated successfully.