10 Storing Invoices

You can configure the format in which invoices are stored and the schema in which they are stored in the Oracle Communications Billing and Revenue Management (BRM) database.

Topics in this document:

About Formats for Storing Invoices

BRM stores each invoice as an object in the database. By default, invoices are stored in the same database schema as the accounts you are invoicing, but you can configure BRM to store invoices in a separate schema. For more information, see "Storing Invoices in a Separate Database Schema".

Invoices are stored in at least one of these formats:

  • pin_flist: The internal BRM data structure. By default, BRM stores invoice data in this format and then reformats it into HTML format to display in the Invoice Viewer.

    This is the most useful format for these reasons:

    • Self-Care Manager requires pin_flist storage format to display HTML invoices.

    • All the available display options work with invoices stored in pin_flist format.

    • You can write a program that saves the pin_flist invoices in any other format. This is useful when providing invoice data to third-party invoice viewers. For information about the pin_flist format, see "Understanding Flists and Storable Classes" in BRM Developer's Guide.

  • XML: You must use XML format if you are generating the final invoice document by using the BRM-BI Publisher Invoicing Integration package. In addition, you might use this storage format if you are using XML to design and display invoices. See "Designing and Generating Invoices in Oracle Business Intelligence Publisher".

    To use XML as an alternative or additional storage format, modify the PCM_OP_INV_POL_FORMAT_INVOICE and PCM_OP_INV_POL_FORMAT_INVOICE_XML opcodes. See "Customizing the Format for Printed Invoices" and "Customizing the Format for XML Invoices" in BRM Opcode Guide.

    Note:

    You can store invoice data in both pin_flist and XML formats at the same time. To do so, modify the PCM_OP_INV_POL_FORMAT_INVOICE policy opcode.

You have the option of also storing invoices in HTML or DOC1 format. These are primarily display formats and, in most cases, storing invoices in these formats is not useful. However, you might need to store invoices in the same format you use to display them.

Storing invoices in HTML or DOC1 format requires extensive programming. Use the PCM_OP_INV_POL_FORMAT_INVOICE_HTML and PCM_OP_INV_POL_FORMAT_INVOICE_DOC1 policy opcodes. See "Customizing the Format for HTML Invoices" and "Customizing the Format for DOC1 Invoices" in BRM Opcode Guide.

Specifying the Default Format in Which to Store Invoices in BRM

By default, BRM stores invoices in flist format. You can configure BRM to store invoices in XML format by modifying a field in the invoicing instance of the /config/business_params object.

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

To specify the default format in which to store invoices:

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

  2. Create an XML file from the /config/business_params object:

    pin_bus_params -r BusParamsInvoicing bus_params_Invoicing.xml
  3. Do one of the following:

    • To specify flist as the output format, set InvoiceStorageType to 0. This is the default.

    • To specify XML as the output format, set InvoiceStorageType to 1.

    For example, to specify XML format:

    <InvoiceStorageType>1</InvoiceStorageType>
  4. Save the file as bus_params_Invoicing.xml.

  5. Load the XML file into the BRM database:

    pin_bus_params bus_params_Invoicing.xml 
  6. Stop and restart the CM.

  7. (Multischema systems only) Run the pin_multidb script with the -R CONFIG parameter. For more information, see BRM System Administrator's Guide.

Storing Invoices in a Separate Database Schema

Note:

Storing invoices in a separate database schema is supported only on Oracle databases.

By default, your invoices are stored in the same database schema that contains the invoiced accounts. However, using a separate schema to store invoices provides the following benefits:

  • Speeds up the invoicing process.

  • Potentially stores a large number of invoices.

  • Enables you to view, email, and print invoices without affecting performance of the main schema.

The procedures for storing invoices in a separate schema include the following:

  1. Installing the Invoice Data Manager

  2. Configuring BRM to Use a Separate Invoice Database Schema

  3. Configuring Invoice Applications to Use a Separate Invoice Database Schema

  4. Starting the Invoice Data Manager

Installing the Invoice Data Manager

Note:

The Invoice Data Manager (DM) is supported only on Oracle databases.

The Invoice DM is not installed by default when you install BRM. To install the Invoice DM:

  1. Make sure you have a separate database schema installed and available to use for storing invoices.

    See "Installing a Multischema System" in BRM Installation Guide and "Adding Database Schemas to a Multischema System" in BRM System Administrator's Guide.

  2. On the machine containing BRM, open the BRM_home/setup/pin_setup.values file in a text editor.

  3. Add "dm_invoice" to the @COMPONENT_LIST line:

    @COMPONENT_LIST = ("dm_oracle", "dm_invoice", "cm");
    

    Note:

    Make sure "dm_invoice" appears after "dm_oracle".

  4. Modify the entries in the pin_setup.values file shown in Table 10-1:

    Table 10-1 Entries to be Modified in pin_setup File

    Entry Description

    $INVOICE_DB{'user'}

    Must contain the user name to log in to your invoice schema. This user name must be different from the one used for any other schema in the database.

    $INVOICE_DB{'password'}

    Must contain the password to log in to your invoice schema.

    $INVOICE_DB{'alias'}

    Must contain the database alias of the invoice schema.

    $INVOICE_DB{'Host'}

    Must contain the host name of the machine running the invoice schema.

    $INVOICE_DB{'tables_group'}

    Must contain the name of the data tablespace.

    $INVOICE_DB{'indexes_group'}

    Must contain the name of the index tablespace.

    $DM_INVOICE{'port'}

    Must contain the port number of the Invoice DM.

    $DM_INVOICE{'db_num'}

    Must contain the database schema number of the invoice database.

  5. Install dm_invoice by using one of these methods:

    • To install all BRM components, run this script:

      BRM_home/setup/pin_setup
      
    • To install only the Invoice DM, run this script:

      BRM_home/setup/scripts/pin_cmp_dm_invoice.pl
      

    For the complete installation procedure, see "Installing BRM" in BRM Installation Guide.

Configuring BRM to Use a Separate Invoice Database Schema

You must configure the CM to use the invoice DM and separate invoice database schema. To configure the CM, perform the following procedure on the machine containing the CM:

  1. Open the Connection Manager (CM) configuration file (BRM_home/sys/cm/pin.conf).

    For information about configuration files, see "Using Configuration Files to Connect and Configure Components" in BRM System Administrator's Guide.

  2. In the invoice_db entry, enter the invoice database schema number.

    For example:

    - fm_cust_pol invoice_db 0.0.6.1 /invoice 0 
    

    0.0.6.1 is the BRM default database schema number for the invoice schema.

    The customer Facilities Module (FM) uses this entry to store the invoice database schema numbers for new customers. BRM uses that information to store the invoices each time you generate invoices.

    Note:

    The invoicing utilities do not use this entry.

  3. Make sure you have a dm_pointer entry for the invoice schema referenced in the invoice_db entry. The pin_inv_accts utility uses this entry.

    For more information, see the documentation in the CM configuration file.

  4. Make sure you have a dm_attributes entry for the invoice schema:

    - cm dm_attributes 0.0.6.1 assign_account_obj,searchable
    

    For more information, see the documentation in the CM configuration file.

  5. Save and close the file.

  6. Stop and restart the CM.

Configuring Invoice Applications to Use a Separate Invoice Database Schema

To use a separate database schema for storing invoices:

  1. Open the invoice configuration file (BRM_home/apps/pin_inv/pin.conf) in a text editor.

  2. In the Invoice DB number section for the pin_inv_send and pin_inv_export applications, change the invoice_db parameter value to your invoice database schema number. The following examples use the BRM default invoice database schema number, 0.0.6.1:

    # - pin_inv_send invoice_db 0.0.6.1 /invoice 0
    # - pin_inv_export invoice_db 0.0.6.1 /invoice 0
    
  3. Save and close the file.

Starting the Invoice Data Manager

To start the Invoice DM, enter the pin_ctl start dm_invoice command.

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

Configuring the Invoice pin.conf for Multiple Database Schemas

In a multischema environment, to store invoices in the database schema 0.0.0.2:

  1. Open the invoice configuration file (BRM_home/apps/pin_inv/pin.conf).

  2. Change the login name in the following entry to your login name:

    - nap login_name name 
    
  3. Change the database parameter value to 0.0.0.2 in the following entries:

    - pin_inv_accts database 0.0.0.2 /search 0
    - pin_inv_send database 0.0.0.2 /search 0
    - pin_inv_export database 0.0.0.2 /search 0
    
  4. Save and close the file.

For information on running invoice utilities in a multischema environment, see "Setting Up Invoicing on Multiple Database Schemas".