10 Managing Business Profiles

This chapter explains how to manage Oracle Communications Billing and Revenue Management (BRM) business profiles.

About Business Profiles

Business profiles provide a way for BRM to validate bill units and other objects to determine how they are used. For example, business profiles can be used to classify bills as prepaid or postpaid to determine how bills and payments should be handled.

A business profile (/config/business_profile object) includes the following:

  • A set of requirements that a bill unit (/billinfo object) and its related objects must meet to be associated with the profile. These requirements are stored in validation templates linked to the business profile. You can create validation templates for the following objects:

    • /account

    • /balance_group

    • /billinfo

    • /group/sharing/charges

    • /group/sharing/discounts

    • /group/sharing/profiles

    • /ordered_balgrp

    • /profile/acct_extrating

    • /profile/serv_extrating

    • /purchased_discount

    • /purchased_product

    • /service

    See "About Validation Templates".

  • An array of key-value pairs used to retrieve information about the bill units that belong to the business profile. For example, a business profile object that includes the key Prepaid with the value Yes indicates that bill units belonging to the business profile are prepaid. A business profile set up for postpaid bill units includes the key Postpaid with the value Yes. To find out whether a bill unit is associated with a prepaid or postpaid bill, you check the value of this key in the bill unit's business profile. See "Getting Information about an Object's Business Profile".

To create business profiles, see "Setting Up Business Profiles and Validation Templates".

Note:

Customer Center does not support business profiles. You can, however, create a custom user interface (UI) that does the following:
  • Enables customer service representatives (CSRs) to assign bill units to business profiles.

  • Provides different interfaces based on the business profile of a bill unit. For more information on setting up business profiles and assigning bill units to them, see "Managing Business Profiles".

About Validation Templates

To belong to a business profile, a bill unit and all its related objects, such as services, balance groups, and sharing groups, must conform to any requirements associated with the business profile. Requirements are specified in validation template (/config/template subclass objects) linked to the business profile.

A validation template includes the following:

  • A set of iScript rules that determine whether a bill unit and its related objects meet the requirements of the business profile with which the template is associated. See "About Using iScripts to Validate Objects for Business Profiles".

  • An array of key-value pairs used to retrieve information about the bill units that belong to the business profiles to which the validation template is linked. For example, if a service template linked to a business profile includes the key IsServiceGold with the value Yes, that indicates that bill units belonging to the business profile are associated with a premium (”Gold”) service. To find out whether a bill unit is associated with a ”Gold” service, you check the value of this key in the templates linked to the bill unit's business profile. See "Getting Information about an Object's Business Profile".

    Note:

    Key-value pairs are not used in the validation process that determines whether a bill unit, balance group, or service object meets the requirements of a business profile.

A business profile can be associated with the validation templates listed below in Table 10-1:

Table 10-1 Validation Templates for Business Profiles

Validation Template Description

Bill unit validation template

(/config/template/billinfo object)

Contains the rules used to validate every /billinfo object associated with the business profile. Only one bill unit validation template can be associated with a business profile.

Balance group validation template

(/config/template/balance_group object)

Contains the rules used to validate every /balance_group object associated with the business profile. Only one balance group validation template can be associated with a business profile.

Group validation template

/config/template/group

Contains the rules used to validate every /group object associated with the business profile. Only one group validation template can be associated with a business profile.

Resource sharing group validation template

(/config/template/group/sharing/* objects)

Contains the rules used to validate every charge sharing, discount sharing, or profile sharing group associated with the business profile. Only one resource sharing group template can be associated with a business profile.

Ordered balance group validation template

(/config/template/ordered_balgrp object)

Contains the rules used to validate every ordered_balgrp object associated with the business profile. Only one ordered balance group template can be associated with a business profile.

Profile validation template

(/config/template/profile object)

Contains the rules used to validate every /profile/acct_extrating object or /profile/serv_extrating object associated with the business profile. Only one profile template can be associated with a business profile.

Purchased discount validation template

(/config/template/purchased_discount object)

Contains the rules used to validate every /purchased_discount object associated with the business profile. Only one resource sharing group template can be associated with a business profile.

Purchased product validation template

(/config/template/purchased/product object)

Contains the rules used to validate every /purchased_product object associated with the business profile. Only one resource sharing group template can be associated with a business profile.

Service validation templates

(/config/template/service/* objects)

Service objects are validated against the rules in the service template that most closely matches their service type. A business profile can be associated with only one template per base service (/service) and service type (/service/*).

For example, if a business profile is associated with a /config/template/service template and a /config/template/service/telco/gsm template, /service/ip objects are validated against the former template and /service/telco/gsm/data objects are validated against the latter template.


If a business profile is not associated with a validation template for a particular type of object, objects of that type are not validated because they do not have to meet any requirements to belong to the business profile.

To create validation templates, see "Setting Up Business Profiles and Validation Templates".

For more information on triggering business profile validation, see "About Using iScripts to Validate Objects for Business Profiles".

About Using iScripts to Validate Objects for Business Profiles

Each validation template contains a set of iScript rules used to verify that an object conforms to the requirements of the business profiles to which its template is linked.

The iScript validation mechanism is triggered for a bill unit and all of its related objects whenever any of the following actions takes place:

  • You assign a bill unit to a business group.

  • You modify a bill unit that belongs to a business group.

  • You create or modify an object related to a bill unit that belongs to a business group. For a list of valid objects, see "About Business Profiles".

BRM does not supply iScript validation rules because customer requirements vary. Instead, you must create custom rules to meet your business needs.

For more information on creating iScript validation rules, see "Creating iScripts and iRules" in BRM Developer's Guide.

For more information on adding the rules to validation templates, see "Defining Validation Templates".

About the Business Profile Configuration File

To create business profiles and validation templates, you edit the BRM_Home/sys/data/config/pin_business_profile.xml business profile configuration file, where BRM_Home is the directory in which you installed the BRM software. This file contains three default business profiles that can be used to set up cache residency distinction. See "Editing the Business Profile Configuration File".

After editing the configuration file, you use the "load_pin_business_profile" utility to load the file's contents into the BRM database. See "Setting Up Business Profiles and Validation Templates".

About Assigning Bill Units to Business Profiles

A bill unit (/billinfo object) can belong to only one business profile at a time. To assign a bill unit to a business profile, BRM puts the Portal object ID (POID) of the business profile object into the PIN_FLD_BUSINESS_PROFILE_OBJ field of the /billinfo object.

Before assigning a bill unit to a business profile, BRM verifies that the bill unit and all of its associated objects comply with the requirements specified in the business profile's validation templates. For a list of objects that have validation templates, see "About Business Profiles".

For more information, see "Assigning Bill Units to Business Profiles".

Setting Up Business Profiles and Validation Templates

To create, modify, or delete business profiles (/config/business_profile objects) and validation templates (/config/template subclass objects), edit the business profile configuration file (pin_business_profile.xml) and then load its contents into the BRM database:

  1. Open the pin_business_profile.xml file in an XML editor or a text editor.

    By default, the file is in the BRM_Home/sys/data/config directory.

  2. Enter the appropriate information into the file. See "Editing the Business Profile Configuration File".

  3. Save and close the file.

  4. Use this command to load pin_business_profile.xml file:

    load_pin_business_profile pin_business_profile.xml
    

    Important:

    • When you run the utility, the pin_business_profile.xml and business_configuration.xsd files must be in the same directory. By default, both files are in BRM_Home/sys/data/config. See "Validating Your Business Profile Configuration File Edits".

    • This utility needs a configuration (pin.conf) file in the directory from which you run the utility.

    • If you do not run the utility from the directory in which pin_business_profile.xml is located, include the complete path to the file. For example:

      load_pin_business_profile BRM_Home/sys/data/config/pin_business_profile.xml
      
  5. Open the localization file BRM_Home/sys/msgs/businessprofiles/business_profile_descr.locale in an XML editor or text editor.

  6. Update the file with the changes you made to the pin_business_profile.xml file. Include the localized business profile name, description, and business profile ID number. For example:

    DOMAIN = "Business profiles" ;
      STR
        ID = 1 ;
        VERSION = 1 ;
        STRING = "Convergent" ;
      END
      STR
        ID = 2 ;
        VERSION = 1 ;
        STRING = "Convergent Business Profile Description" ;
      END
      
    
  7. Save and close the file.

  8. Load the localized strings into BRM. See "Loading Localized or Customized Strings" in BRM Developer's Guide.

  9. To verify that the business profile and validation template information was loaded, display the /config/business_profile objects and /config/template subclass objects by using one of the following features:

    • Object Browser

    • robj command with the testnap utility

    For more information on reading an object and writing its contents to a file, see "Reading an Object and Writing Its Contents to a File" in BRM Developer's Guide.

Editing the Business Profile Configuration File

You configure all of the business profiles (/config/business_profile objects) and validation templates (/config/template subclass objects) in your BRM system in the BRM_Home/sys/data/config/pin_business_profile.xml file. This file contains prepaid, postpaid, and convergent business profiles by default.

To edit this configuration file, open it in an XML editor or text editor and then perform these tasks:

Defining Business Profiles

In the business profile configuration file, business profiles (/config/business_profile objects) are defined as BusinessProfile child elements of the BusinessProfileList parent element. A BusinessProfile child element consists of the following elements and attributes:

The syntax of a BusinessProfile child element is:

<BusinessProfileList>
 <BusinessProfile name="string" type="string">
  <Desc>string</Desc>
  <!-- Specify List of Templates --> 
  <TemplateId name="string" type="object_type" /> 
  <TemplateId name="string" type="object_type" />
  <TemplateId name="string" type="object_type" /> 
  <!-- Specify List of Key Values --> 
  <NameValue key="string" value="string" /> 
 </BusinessProfile>
</BusinessProfileList>
  

To create a business profile, add a BusinessProfile child element to the BusinessProfileList parent element. In the child element, specify values for the items listed in Table 10-2:

Table 10-2 Business Profile Elements

XML Element or Attribute Description Possible Values

BusinessProfile name

Character string used as the name of the business profile object (for example, PrepaidGold).

The name must be unique within your BRM system.

Minimum length is 1 character.

Maximum length is 255 characters.

Note: This string is mapped to the PIN_FLD_NAME field in the /config/business_profile object. Values in this field can be used to populate a list of business profiles in a user interface (UI). When creating the string, take any UI length restrictions into consideration.

type

An optional attribute that identifies a business profile.

Invoice

Desc

Character string that describes the type of bill units that belong to the business profile (for example, Bill units with credit balances).

Minimum length is 1 character.

Maximum length is 255 characters.

Note: This string is mapped to the PIN_FLD_DESCR field in the /config/business_profile object. Values in this field can be used to populate a list of business profile descriptions in a UI. When creating the string, take any UI length restrictions into consideration.

TemplateId

ID of a validation template associated with the business profile. In each TemplateId element, specify the following:

  • The name value of a validation template defined in the file's TemplateList element.

  • The type value of the same template.

See "Template name" and "Template type".

NameValue

Key-value pair used to retrieve information about objects associated with the business profile. In each NameValue element, specify the following:

  • key: Character string used with NameValue value to describe characteristics of the bill units belonging to the business profile (for example, IsSponsor).

  • value: Character string used with NameValue key to describe characteristics of the bill units belonging to the business profile (for example, Yes and No).

Minimum length of each character string is 1 character.

Maximum length of each character string is 255 characters.


Modifying Business Profiles

To modify a business profile already defined in your BRM system, redefine the business profile in your business profile configuration file (see "Defining Business Profiles"). You can change any aspect of a business profile except "BusinessProfile name".

When you load the contents of the configuration file into your BRM database (see "Setting Up Business Profiles and Validation Templates"), BRM incorporates your changes into the existing business profile object.

Deleting Business Profiles

To delete a business profile from your BRM system, add the following child element to the BusinessProfileList element in your business configuration file:

<BusinessProfile name="name_of_profile_to_delete" action="delete">

Important:

You cannot delete a business profile to which any bill unit belongs.

When you load the contents of the configuration file into your BRM database (see "Setting Up Business Profiles and Validation Templates"), BRM deletes the specified business profile.

Defining Validation Templates

In the business profile configuration file, validation templates (/config/template subclass objects) are defined as Template child elements of the TemplateList parent element. A Template child element consists of the following elements and attributes:

  • The name of the validation template ("Template name").

  • The type of object validated by the template's rules ("Template type").

  • A description of the validation template ("Desc").

  • The rules used to validate objects governed by the template ("Iscript").

  • A list of key-value pairs ("NameValue" elements). An unlimited number of key-value pairs can be associated with a validation template. See "About Validation Templates".

The syntax of a Template child element is:

<TemplateList>
 <Template name="string" type="object_type">
  <Desc>string</Desc>
  <!-- Specify the Rules for object_type --> 
  <Iscript /> 
  <!-- Specify List of Key Value --> 
  <NameValue key="string" value="string" /> 
 </Template>
</TemplateList>
  

To create a validation template, add a Template child element to the TemplateList parent element. In the child element, specify values for the items listed in Table 10-3:

Table 10-3 Template Elements and Values

XML Element or Attribute Description Possible Values

Template name

Character string used as the name of the validation template object (for example, Prepaid balance group).

Minimum length is 1 character.

Maximum length is 255 characters.

Note: This string is mapped to the PIN_FLD_NAME field in /config/template subclass objects. Values in this field can be used to populate a list of validation templates in a UI. When creating the string, take any UI length restrictions into consideration.

Template type

The type of object the template validates.

Can be any of the following object types:

  • /balance_group

  • /billinfo

  • /group/sharing

  • /group/sharing/*

  • /ordered_balgrp

  • /profile

  • /profile/*

  • /purchased_discount

  • /purchased_product

  • /service

  • /service/*

Desc

Character string that describes characteristics of the objects governed by the template (for example, Balance group for bill units with credit balances).

Minimum length is 1 character.

Maximum length is 255 characters.

Note: This string is mapped to the PIN_FLD_DESCR field in /config/template subclass objects. Values in this field can be used to populate a list of validation template descriptions in a UI. When creating the string, take any UI length restrictions into consideration.

Iscript

Set of iScript rules used to validate objects governed by the template.

See "Using iScripts in Validation Templates".

NameValue

Key-value pair used to retrieve information about objects associated with the validation template. In each NameValue element, specify the following:

  • key: Character string used with NameValue value to describe characteristics of the bill units associated with the validation template (for example, IsServiceGold).

  • value: Character string used with NameValue key to describe characteristics of the bill units associated with the validation template (for example, Yes and No).

Minimum length is 1 character.

Maximum length is 255 characters.


Using iScripts in Validation Templates

BRM does not supply iScript rules for business profile validation. Instead, users must create their own rules. For more information on creating iScript validation rules, see "Creating iScripts and iRules" in BRM Developer's Guide.

After creating the rules, add them to the "Iscript" element of the appropriate Template element (see "Defining Validation Templates").

When the validation templates are loaded into the BRM database (see "Setting Up Business Profiles and Validation Templates"), the "load_pin_business_profile" utility compiles the iScript rules associated with each template and checks for errors. At startup, the Connection Manager (CM) compiles each iScript once, stores it in its cache, and maps it to the Portal object ID (POID) of the validation template object.

BRM calls the compiled iScript whenever business profile validation is triggered (see "About Using iScripts to Validate Objects for Business Profiles").

Modifying Validation Templates

To modify a validation template already defined in your BRM system, redefine the validation template in your business profile configuration file (see "Defining Validation Templates"). You can change any aspect of a validation template except "Template name".

When you load the contents of the configuration file into your BRM database (see "Setting Up Business Profiles and Validation Templates"), BRM incorporates your changes into the existing validation template.

Deleting Validation Templates

To delete a validation template from your BRM system, add the following child element to the TemplateList element in your business configuration file:

<Template name="name_of_template_to_delete" type="type_of_template_to_delete" action="delete">

Important:

You cannot delete a validation template associated with a business profile.

When you load the contents of the configuration file into your BRM database (see "Setting Up Business Profiles and Validation Templates"), BRM deletes the specified validation template.

Validating Your Business Profile Configuration File Edits

After editing the pin_business_profile.xml file (see "Editing the Business Profile Configuration File"), you use the "load_pin_business_profile" utility to load the contents of the file into /config/business_profile objects and /config/template subclass objects.

Before loading the contents of the file, the utility validates the contents against the file's schema definition. If the contents do not conform to the schema definition, the load operation fails. The schema definition is in the BRM_Home/xsd/pin_business_profile.xsd file.

The XML file is not directly linked to its schema definition file. Instead, it is linked to the BRM_Home/sys/data/config/business_configuration.xsd reference file.

For more information on the XSD reference file, see "About Validating XML Configuration Files" in BRM System Administrator's Guide.

After validating the XML contents against the schema definition, the utility converts the XML file into an flist. From the flist's template array, the utility compiles the iScript rules. If any syntax errors occur, the load operation fails.

Assigning Bill Units to Business Profiles

You can assign a bill unit (/billinfo object) to a business profile (/config/business_profile object) during or after account creation.

To assign a bill unit to a business profile during account creation:

  1. Call the PCM_OP_CUST_COMMIT_CUSTOMER opcode.

    In the opcode's input flist, specify the /config/business_profile object's POID in the PIN_FLD_BUSINESS_PROFILE_OBJ field of the appropriate BILLINFO array element.

  2. PCM_OP_CUST_COMMIT_CUSTOMER passes the business profile information to the PCM_OP_CUST_CREATE_ACCT opcode.

  3. PCM_OP_CUST_CREATE_ACCOUNT calls the following opcodes to validate the /billinfo object and its balance groups and services against the rules in the validation templates associated with the business profile:

    • The PCM_OP_CUST_SET_BILLINFO opcode, which validates the /billinfo object against the bill unit validation template (/config/template/billinfo object) and sets the /billinfo object's PIN_FLD_OBJECT_CACHE_TYPE value.

    • The PCM_OP_CUST_SET_BAL_GRP opcode, which validates the balance group objects against the balance group validation template (/config/template/balance_group object) and sets the /balance_group object's PIN_FLD_OBJECT_CACHE_TYPE value. When a service is associated with a balance group, this opcode also validates the service object against the service validation template that corresponds to the service object type (/config/template/service or /config/template/service/*) and sets the /service object's PIN_FLD_OBJECT_CACHE_TYPE value.

      Note:

      If the business profile is not associated with a validation template that matches a particular object type, validation is not performed on the corresponding object type (see "About Validation Templates" for details). Skipping validation for this reason is not equivalent to validation failure and does not prevent the bill unit from being assigned to the business profile.
  4. One of the following results occurs:

    • If no validation errors occur, PCM_OP_CUST_CREATE_ACCOUNT calls PCM_OP_CUST_SET_BILLINFO to put the business profile POID in the PIN_FLD_BUSINESS_PROFILE_OBJ field of the new /billinfo object.

    • If validation errors occur, account and bill unit creation fail.

To assign a bill unit to a business profile after account creation, see "Changing a Bill Unit's Business Profile".

Changing a Bill Unit's Business Profile

Use the following procedure to perform either of these operations:

  • Assign a bill unit to a business profile after an account has been created.

  • Change the business profile of a bill unit that currently belongs to a different business profile.

To change a bill unit's business profile, call the PCM_OP_CUST_CHANGE_BUSINESS_PROFILE opcode and include the following information in its input flist:

  • The POID of the /billinfo object whose business profile you want to change.

  • The POID of the new /config/business_profile object to assign the /billinfo object to.

  • The POID of any associated /balance_group objects that must be modified for the new business profile and the required modifications.

  • The POID of any associated /service/* objects that must be modified for the new business profile and the required modifications.

PCM_OP_CUST_CHANGE_BUSINESS_PROFILE performs these operations:

  1. Validates the /billinfo object against the bill unit validation template (/config/template/billinfo object) associated with the new business profile and then does one of the following:

    If validation succeeds:

    1. Calls PCM_OP_CUST_SET_BILLINFO to change the /config/business_profile POID in the PIN_FLD_BUSINESS_PROFILE_OBJ field of the /billinfo object.

    2. If cache residency distinction is enabled, changes the /account object's PIN_FLD_OBJECT_CACHE_TYPE value if required, then validates all cache residency objects that are related to the account and are in the account context; for example, /profile/acct_extrating objects and account-level /purchased_product objects.

    If validation fails, returns an error.

  2. Creates a list of all the objects associated with the bill unit.

  3. For each balance group in the list, checks whether the input flist contains a requested modification.

    If a modification is requested, calls PCM_OP_CUST_SET_BAL_GRP to make the modifications and to validate the modified balance group object against the balance group validation template (/config/template/balance_group object) associated with the new business profile.

    If a modification is not requested, validates the balance group itself.

  4. After validating a balance group, creates a list of all the services associated with the balance group.

  5. If cache residency distinction is enabled, searches for objects related to each service in the list and validates them (for example, /purchased_discount and /profile/serv_extrating objects that belong to the account).

  6. For each service in the list, checks whether the input flist contains a requested modification.

    If a modification is requested, calls the PCM_OP_CUST_MODIFY_SERVICE opcode to make the modifications and to validate the modified service object against the service validation template that most closely corresponds to the service object type (/config/template/service or /config/template/service/* object) associated with the new business profile.

    If a modification is not requested, validates the service itself.

  7. Repeats steps 3 through 6 until all balance groups and services associated with the bill unit are validated.

    If any of the balance group or service validations fail, returns an error. If an error is returned, the business profile change initiated in step 1 does not take effect.

    Note:

    If the business profile is not associated with a validation template that matches a particular object type, validation is not performed on the corresponding object type (see "About Validation Templates" for details). Skipping validation for this reason is not equivalent to validation failure and does not prevent the bill unit from being assigned to the business profile.

For more information on cache residency, see "Configuring BRM for Cache Residency Distinction" in BRM System Administrator's Guide.

Getting Information about an Object's Business Profile

A business profile (/config/business_profile object) and the validation templates (/config/template subclass objects) linked to it include key-value pairs in their PIN_FLD_PAIR arrays. To get information about the objects belonging to a business profile, you can retrieve the values of the keys in the business profile and its associated validation templates. For example, if a bill unit belongs to a business profile that has a PIN_FLD_PAIR_KEY field set to IsPrepaidGold and a corresponding PIN_FLD_PAIR_VALUE field set to Yes, you know that the charges associated with the bill unit are prepaid with a gold credit card.

To get the value of a key in the business profile and validation templates associated with an object, call the PCM_OP_CUST_GET_BUSINESS_PROFILE_INFO opcode. Include the following information in the opcode's input flist:

  • The POID of the /config/business_profile object to which the related object belongs. These are the possible related objects:

    • /balance_group

    • /billinfo

    • /group/sharing/charges

    • /group/sharing/discounts

    • /group/sharing/profiles

    • /ordered_balgrp

    • /profile/acct_extrating

    • /profile/serv_extrating

    • /purchased_discount

    • /purchased_product

    • /service/*

  • The key whose value you want the opcode to get.

  • The type of object from which the key's value should be obtained. These are the possible object types:

    • /config/business_profile

    • /config/template/balance_group

    • /config/template/billinfo

    • /config/template/group

    • /config/template/sharing

    • /config/template/ordered_balgrp

    • /config/template/profile/*

    • /config/template/purchased_discount

    • /config/template/purchased_product

    • /config/template/service/*

For more information on key-value pairs, see "About Business Profiles" and "About Validation Templates".