11 Using Oracle Analytics Publisher for Invoicing

Learn how to utilize Oracle Analytics Publisher to design, generate, and customize invoice documents in Oracle Communications Billing and Revenue Management (BRM).

Topics in this document:

About Using Oracle Analytics Publisher for Invoicing

Oracle Analytics Publisher enables you to create more stylized and detailed invoices in PDF format. BRM also includes sample RTF templates. You can configure and extend these templates for your specific business needs.

Oracle Analytics Publisher allows you to choose from a variety of desktop tools, such as Microsoft Word and Adobe Acrobat, to create document templates. While it support data sources such as databases, Web services, and files, the BRM-Oracle Analytics Publisher invoicing integration only uses SQL queries directly on the database as the data source for better performance. By default, the BRM-Oracle Analytics Publisher invoicing integration supports PDF as an output format and delivery options such as email, FTP, and SFTP.

With Oracle Analytics Publisher, you use an SQL bursting query, which is the process of splitting data into blocks and generating documents for those blocks. Bursting increases throughput performance in Oracle Analytics Publisher.

To use this feature, you must install Oracle Analytics Publisher and Oracle Analytics Publisher Desktop.

When you use the BRM-Oracle Analytics Publisher integration:

  • BRM generates the invoicing data in XML format and then passes the data to Oracle Analytics Publisher.

  • Oracle Analytics Publisher formats the invoice, delivers it, and then stores it in the Oracle Analytics Publisher database.

Figure 11-1 shows the BRM and Oracle Analytics Publisher invoice generation process:

Figure 11-1 BRM and Oracle Analytics Publisher Invoice Generation Process

Description of Figure 11-1 follows
Description of "Figure 11-1 BRM and Oracle Analytics Publisher Invoice Generation Process"

The BRM-Oracle Analytics Publisher integration generates invoice documents as follows:

Note:

The BRM-Oracle Analytics Publisher integration must be enabled. See "Enabling the BRM-Oracle Analytics Publisher Integration".

  1. BRM associates bill units with an Oracle Analytics Publisher invoice and report. When accounts are created, BRM associates each bill unit (/billinfo object) with an Oracle Analytics Publisher invoice report and layout template.

  2. BRM generates a bill. BRM creates a bill for each account bill unit when it runs the pin_bill_accts utility as part of the daily billing script. BRM needs a bill before generating an invoice. See "Running Billing Utilities" in BRM Configuring and Running Billing.

  3. BRM generates the invoice and stores it in the BRM database. When the pin_inv_accts utility is run, it stores the invoice data in an /invoice object in the BRM database. See "Generating Invoices".

    Note:

    To generate invoice documents in Oracle Analytics Publisher, you must store the invoice data in XML format. See "About Formats for Storing Invoices".

  4. The pin_inv_doc_gen utility:

    • Runs reports. This utility, based on the input parameters, starts and runs appropriate Oracle Analytics Publisher reports for invoice documents. It starts an Oracle Analytics Publisher invoicing report, with the SQL bursting data query, through a scheduled job. See "Generating Oracle Analytics Publisher Invoice Documents".

    • Calls the SQL bursting data query to pull the invoice data from the BRM database. The SQL bursting data query pulls the invoice data in XML format from the BRM database and returns the XML data necessary to generate invoice documents by the pin_inv_doc_gen utility.

    • Generates the invoice in the preferred format and sends it using the configured information. The delivery information is stored in the /payinfo/invoice object of the account /billinfo object.

    • Stores the invoice document in the Oracle Analytics Publisher database. The utility stores the generated invoice documents in the Scheduler database. See "Storing the Invoice Document".

The BRM-Oracle Analytics Publisher invoicing integration package contains:

Designing Invoices

To help you design invoices, you can use the Oracle Analytics Publisher layout templates or the reports provided with the BRM-Oracle Analytics Publisher invoicing integration package. You can also modify the templates to include late payment fees and finance charges.

About Invoice Layout Templates for Invoice Document Generation

The BRM-Oracle Analytics Publisher invoicing integration package contains six layout templates in RTF for the consumer and corporate accounts which can be customized.

If the BRM-Oracle Analytics Publisher integration framework is enabled, when you create an account, the bill units of the account are associated with an /associated_bus_profile object. The /associated_bus_profile object contains the report and template names that are used for generating invoice documents for this account on the Oracle Analytics Publisher server. See "Creating an Invoicing Configuration Business Profile".

BRM provides the following default template files for regular invoices:

  • BRM_Corporate_Invoice.rtf

  • BRM_Consumer_Invoice.rtf

BRM provides the following default Replacement Invoice template files:

  • BRM_Corporate_Replacement_Invoice.rtf

  • BRM_Consumer_Replacement_Invoice.rtf

When you use the default template for a replacement invoice, the resulting document contains all the line items and information from the previous bill or invoice. In addition, it lists the previous bill number, the previous bill date, the previous bill totals and the corrections totals. The item summary section lists the previous totals, the correction totals and the current totals for each item. The events details section lists the previous total, correction amount and current total for each event.

BRM provides the following default Invoice Correction Letter template files:

  • BRM_Corporate_Correction_Invoice.rtf

  • BRM_Consumer_Correction_Invoice.rtf

The invoice correction letter is in a letter format. When you use the default template for an invoice correction letter, the resulting document contains a brief explanation of the correction, a bill summary section and the details of only the corrections made to the previous bill or invoice. The invoice correction letter displays the previous bill number, the previous bill date, the previous bill total, the total correction amount and the current total.

The report file that Oracle Analytics Publisher associates with each of the previously listed default template files for invoices is:

  • BRM_Invoice_Bursting_Report.xdo

About Reports for Invoice Document Generation

The BRM-Oracle Analytics Publisher invoicing integration package contains two reports for consumer and corporate accounts. Details of the construction of these reports are:

  • The data source of the sample Oracle Analytics Publisher reports is the SQL bursting query.

  • Each report has a layout template in RTF associated with it that decides the look and feel of the invoice document.

  • The output formats supported for the invoice document are PDF, XML, RTF, PPT, Excel, and HTML. The default output format specified in the reports is PDF.

    Note:

    For the invoice documents to support data from various data sources, you need to configure additional data sources in the sample reports and customize the sample layout template.

Including Late Payment Fees in Invoices

If you are generating the final invoice document by using the BRM-Oracle Analytics Publisher Invoicing Integration framework, you can customize the invoice data to include the late payment fee.

To include late payment fees in the invoice data generated in XML format:

  1. Extend the /item storable class to include /item/late_fee. See "Creating Custom Fields and Storable Classes" in BRM Developer's Guide.

  2. Open the BRM_home/sys/data/pricing/example/config_item_types.xml file and define a type for the item. For example:

    <ItemTypeElement> 
        <ItemTag>LateFee</ItemTag> 
        <ItemDescription>Late_Fee</ItemDescription> 
        <ItemType precreate="false" type="cumulative">/item/late_fee</ItemType> 
    </ItemTypeElement>
  3. Save the file.

  4. Load the configuration item types by using the load_config_item_types utility:

    load_config_item_types config_item_types.xml
  5. Open the BRM_home/sys/data/pricing/example/config_item_tags.xml and define a tag for the new service. For example:

    <ItemTagElement> 
        <ItemTag>LateFee</ItemTag> 
        <EventType>/event/billing/late_fee</EventType> 
        <ServiceType>/account</ServiceType> 
    </ItemTagElement> 
  6. Save the file.

  7. Load the configuration item tags by using the load_config_item_tags utility:

    load_config_item_tags config_item_tags.xml

Including Finance Charges in Invoices

If you are generating the final invoice document by using the BRM-Oracle Analytics Publisher Invoicing Integration framework, you can customize the invoice data generated in XML format to include the finance charges.

To include finance charges in the invoice data generated in XML format:

  1. Extend the /item storable class to include /item/finance_charges. See "Creating Custom Fields and Storable Classes" in BRM Developer's Guide.

  2. Open the BRM_home/sys/data/pricing/example/config_item_types.xml file and define a type for the item. For example:

    <ItemTypeElement> 
        <ItemTag>FinanceCharges</ItemTag> 
        <ItemDescription>Finance_Charges</ItemDescription> 
        <ItemType precreate="false" type="cumulative">/item/finance_charges</ItemType> 
    </ItemTypeElement>
  3. Save the file.

  4. Load the configuration item types by using the load_config_item_types utility:

    load_config_item_types config_item_types.xml
  5. Open the BRM_home/sys/data/pricing/example/config_item_tags.xml and define a tag for the new service. For example:

    <ItemTagElement> 
        <ItemTag>FinanceCharges</ItemTag> 
        <EventType>/event/billing/finance_charges</EventType> 
        <ServiceType>/account</ServiceType> 
    </ItemTagElement> 
  6. Save the file.

  7. Load the configuration item tags by using the load_config_item_tags utility.

    load_config_item_tags config_item_tags.xml