11 Designing and Generating Invoices in Oracle Business Intelligence Publisher

You can design, generate, and customize Oracle Communications Billing and Revenue Management (BRM) invoice documents using Oracle Business Intelligence (BI) Publisher.

Topics in this document:

About Using BI Publisher for Invoicing

BI 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.

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

With BI 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 BI Publisher.

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

When you use the BRM-BI Publisher integration:

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

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

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

Figure 11-1 BRM and BI Publisher Invoice Generation Process

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

The BRM-BI Publisher integration generates invoice documents as follows:

Note:

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

  1. BRM associates bill units with a BI Publisher invoice and report. When accounts are created, BRM associates each bill unit (/billinfo object) with a BI 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 BI Publisher, you must store the invoice data in XML format. See "About Formats for Storing Invoices".

  4. The pin_inv_doc_gen utility:

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

    • 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 BI Publisher database. The utility stores the generated invoice documents in the BI Publisher Scheduler database. See "Storing the Invoice Document".

The BRM-BI Publisher invoicing integration package contains:

Designing Invoices

To help you design invoices, you can use the BI Publisher layout templates or the reports provided with the BRM-BI 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-BI Publisher invoicing integration package contains six layout templates in RTF for the consumer and corporate accounts which can be customized.

If the BRM-BI 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 BI Publisher server. See "Creating an Invoicing Configuration Business Profile".

BRM provides the following default templates for regular invoices:

  • BRM_Corporate_Invoice.rtf

  • BRM_Consumer_Invoice.rtf

BRM provides the following default Replacement Invoice templates:

  • 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 templates:

  • 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 BI Publisher associates with each of the previously listed default templates for invoices is:

  • BRM_Invoice_Bursting_Report.xdo

About BI Publisher Reports for Invoice Document Generation

The BRM-BI 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 BI 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-BI 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-BI 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

Setting Up Your System to Generate Invoice Documents Using BI Publisher

To use the BRM-BI Publisher integration framework to generate invoice documents:

  1. Install BI Publisher. To install BI Publisher, follow the instructions in the BI Publisher documentation.

  2. In BRM, specify the BI Publisher invoice report and layout templates names. See "Creating an Invoicing Configuration Business Profile".

  3. In BRM, specify the events that you want included in your invoices by editing the events.file file and then loading it into the BRM database with the pin_load_invoice_events utility. See "Including Payment, A/R, and Tax Details in Invoices".

  4. Install the BRM-BI Publisher invoicing integration package on the BI Publisher server. See "Installing the BRM-BI Publisher Invoicing Integration Package".

  5. Configure the pin_inv_doc_gen utility. See "Configuring the pin_inv_doc_gen Utility".

  6. Configure the data source and data model.

  7. Configure for multischema. Store and modify copies of the report in each schema.

Creating an Invoicing Configuration Business Profile

When the BRM-BI Publisher integration is enabled, BRM automatically performs the following during the bill unit creation process:

  • Reads the invoicing configuration business profile (/config/business_profile object) to determine which BI Publisher invoice report and layout template the bill unit should be associated with.

  • Creates an /associated_bus_profile object for the bill unit. This object specifies the names of the BI Publisher invoice report and layout template to use.

  • Links the bill unit to the /associated_bus_profile object it created.

To create an invoicing configuration business profile:

  1. Enable the BRM-BI Publisher integration. See "Enabling the BRM-BI Publisher Integration".

  2. Specify the requirements for a bill unit to be associated with an invoicing configuration business profile by creating a validation template.

  3. Specify the validation template, invoice report, and layout template to be associated with the bill unit.

  4. Load the business profile information into the BRM database by using the load_pin_business_profile utility. See "Loading Invoicing Business Profiles into the Database".

  5. If your system includes accounts that were created before you integrated BRM invoicing with BI Publisher, associate your existing /billinfo objects with /associated_bus_profile objects. See "Associating Pre-Existing Bill Units with Business Profiles".

Enabling the BRM-BI Publisher Integration

By default, BRM-BI Integration is disabled and invoices are stored in flist format. To use the BRM-BI integration, you must enable BRM-BI Integration and configure BRM to store invoices in XML format.

To enable the BRM-BI Publisher integration for 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. Enable integration by setting EnableInvoicingIntegration to enabled:

    <EnableInvoicingIntegration>enabled</EnableInvoicingIntegration> 
  4. Store invoices in XML format by setting InvoiceStorageType to 1:

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

  6. Load the XML file into the BRM database:

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

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

For more information about pin_bus_params, see "pin_bus_params" in BRM Developer's Guide.

Loading Invoicing Business Profiles into the Database

After editing the pin_business_profile.xml file, use the load_pin_business_profile utility to load the contents of the file into /config/business_profile objects in the BRM database. For more information, see "Managing Business Profiles" in BRM Managing Customers.

Associating Pre-Existing Bill Units with Business Profiles

All /billinfo objects created before your BRM-BI Publisher integration are not linked to an /associated_business_profile object, which prevents you from creating BI Publisher invoices for those /billinfo objects. For example, this occurs if you upgraded to BRM 12.0 from a prior release.

To generate BI Publisher invoice documents for /billinfo objects created before the BRM-BI Publisher integration, you must run the pin_upd_assoc_bus_profile utility.

The pin_upd_assoc_bus_profile utility is a standalone multithreaded application (MTA) that performs the following operations:

  • Searches for /billinfo objects in the BRM database that have an empty PIN_FLD_ASSOC_BUS_PROFILE_OBJ_LIST field.

  • Creates an /associated_bus_profile object for each /billinfo object with an empty field.

  • Links the /billinfo object to its /associated_bus_profile object by populating the /billinfo object's PIN_FLD_ASSOC_BUS_PROFILE_OBJ_LIST field.

To associate pre-existing bill units with business profiles:

  1. Make sure that the BRM-BI Publisher integration is enabled. See "Enabling the BRM-BI Publisher Integration".

    Note:

    The utility fails if you attempt to run it when the BRM-BI Publisher integration is disabled.

  2. (Optional) To associate only a subset of your pre-existing bill units with business profiles, create a text file that specifies the /billinfo objects to update. The file must use the following format:

    0 PIN_FLD_RESULTS     ARRAY [0] allocated 20, used 1
    1    PIN_FLD_POID      POID [0] 0.0.0.1 /billinfo 37395 1
    0 PIN_FLD_RESULTS     ARRAY [1] allocated 20, used 1
    1    PIN_FLD_POID      POID [0] 0.0.0.1 /billinfo 37488 3
    
  3. Go to the BRM_home/apps/pin_billd directory.

  4. Enter the following command:

    pin_upd_assoc_bus_profile [-file filename]

    where filename specifies the name and location of the file that lists the /billinfo objects to update.

    Note:

    pin_upd_assoc_bus_profile requires a configuration file in the directory from which you run the utility. The configuration file requires the standard CM connection and MTA entries. See "Configuring Your Multithreaded Application" in BRM Developer's Guide.

If you run the utility without any parameters, the utility searches all /billinfo objects in the BRM database. If you run the utility with the -file parameter, the utility searches only those /billinfo objects specified in the file.

Viewing Invoices Individually on the BI Publisher Console

In the BRM_Invoices reports directory (BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices/0.0.0n), the ViewInvoiceReport report is generated to view individually each invoice on the BI Publisher console.

Configure ViewInvoiceReport to point to the data source by editing the data model, configuring the data source, saving changes, and restarting BI Publisher. Enter the invoice POID for the input parameter and click Submit to see the report.

View the invoice on the console, by choosing the applicable template, such as Consumer Invoice, Corporate Invoice, Consumer Correction Invoice, Corporate Correction Invoice, Consumer Replacement Invoice, or Corporate Replacement Invoice.

Enabling the Display of Customer Details on the Web

By default, displaying contact details, account and bill numbers when using the Web is disabled in BI Publisher.

To enable the display of customer details on the Web:

  1. Go to the BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices/schema_number/schema_number.xdm directory.

  2. Open the _datamodel.xdm file in a text editor.

  3. Search for the following entry:

    <property name="include_rowsettag" value="false"/>
  4. Change false to true.

  5. Save and close the file.

Installing the BRM-BI Publisher Invoicing Integration Package

This section describes how to install the BRM-BI Publisher invoicing integration package. This package is set up on the BI Publisher server.

To install the BRM-BI Publisher invoicing integration package:

Note:

Install the BRM-BI Publisher invoicing integration package on the system on which BRM Reports is installed. If the BRM-BI Publisher invoicing integration package and BRM Reports are not installed on the same system, you cannot view an invoice in BI Publisher 12c.

Pre-Installation Requirements

The following must be completed before you run the BRM-BI Publisher invoicing integration package application:

  • BI Publisher 12c is installed.

  • BI Publisher home environment variable has been successfully set.

  • BRM 12.0 is installed. The patch set contains the pin_inv_doc_gen utility updates that are required for BI Publisher integration.

For more information on these requirements, see BRM Reports.

Removing Older BRM-BI Publisher Invoicing Integration Layout Template Files

When you install the BRM-BI Publisher invoicing integration package, the older versions of BRM-BI Publisher invoicing integration layout template files are not automatically overwritten. Before installing the BRM-BI Publisher invoicing integration package, you must manually remove all previous versions of BRM-BI Publisher invoicing integration layout template files.

To remove older BRM-BI Publisher invoicing integration layout template files:

  1. Go to BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices/SchemaNumber/BRM_Bursting_Invoice_Report.xdo/.

    where SchemaNumber is the directory for the BRM schema number to process BRM invoices; for example, 0.0.0.1.

  2. Manually remove the following layout template files:

    • BRM_Consumer_Correction_Invoice.rtf*

    • BRM_Consumer_Invoice.rtf*

    • BRM_Consumer_Replacement_Invoice.rtf*

    • BRM_Corporate_Correction_Invoice.rtf*

    • BRM_Corporate_Invoice.rtf*

    • BRM_Corporate_Replacement_Invoice.rtf*

  3. Go to BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices/SchemaNumber/ViewInvoiceReport.xdo/.

  4. Manually remove the following layout template files:

    • BRM_Consumer_Correction_Invoice_en_US.rtf*

    • BRM_Consumer_Invoice_en_US.rtf*

    • BRM_Consumer_Replacement_Invoice_en_US.rtf*

    • BRM_Corporate_Correction_Invoice_en_US.rtf*

    • BRM_Corporate_Invoice_en_US.rtf*

    • BRM_Corporate_Replacement_Invoice_en_US.rtf*

Install Billing and Invoicing Utilities

To install Billing and Invoicing Utilities, see "Installing Individual BRM Components" in BRM Installation Guide.

Installed Files

The BRM-BI Publisher invoicing integration program copies the following files listed in Table 11-1 to your computer during installation:

Table 11-1 BI Publisher-Related Files Placed on Your Computer

File Install Path Description

docgen.sh

BRM_home/apps/pin_inv_doc_gen

Batch script for setting environment variables and launching the pin_inv_doc_gen utility.

BRM_Consumer_Correction_Invoice.rtf

BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices/SchemaNumber

RTF file associated with layout template for consumer corrective invoice letter document.

BRM_Consumer_Invoice.rtf

BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices/SchemaNumber

RTF file associated with layout template for consumer invoice document.

BRM_Consumer_Replacement_Invoice.rtf

BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices/SchemaNumber

RTF file associated with layout template for consumer replacement invoice document.

BRM_Corporate_Correction_Invoice.rtf

BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices/SchemaNumber

RTF file associated with layout template for corporate corrective invoice letter document.

BRM_Corporate_Invoice.rtf

BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices/SchemaNumber

RTF file associated with layout template for corporate invoice.

BRM_Corporate_Replacement_Invoice.rtf

BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices/SchemaNumber

RTF file associated with layout template for corporate replacement invoice document.

Create_Xmlp_Invoice_Job.sql

BRM_home/apps/pin_inv_doc_gen

Script for creating XMLP_INVOICE_JOB table in BI Publisher Scheduler database.

invoice_bursting.plb

BRM_home/apps/pin_inv_doc_gen

Invoice bursting stored procedure.

Infranet.properties.sample

BRM_home/apps/pin_inv_doc_gen

Infranet.properties.sample file for pin_inv_doc_gen.jar. Contains the configuration entries for the pin_inv_doc_gen utility.

Important: Before running the pin_inv_doc_gen utility, save the Infranet.properties.sample file as Infranet.properties.

InvoiceList.xml

BRM_home/apps/pin_inv_doc_gen

XML file containing the details of accounts and bill units. The InvoiceList.xml file is passed along with –accts_list as an input parameter to pin_inv_doc_gen.

InvoiceList.xsd

BRM_home/apps/pin_inv_doc_gen

XSD file that validates the InvoiceList.xml.

pin_inv_doc_gen.jar

BRM_home/apps/pin_inv_doc_gen

JAR file for pin_inv_doc_gen application.

lib/ library

BRM_home/apps/pin_inv_doc_gen/lib

Directory containing dependent pin_inv_doc_gen libraries.

Upgrading Existing Reports from BI Publisher 11g to BI Publisher 12c

To use BI Publisher 11g templates in BI Publisher 12c, make the following BI Publisher modifications listed in Table 11-2:

Table 11-2 BI Publisher Template Modifications for BI Publisher 12c

Modification BI Publisher 11g BI Publisher 12c

XML Structure

[data source = web service]
   
<invoice>
                <POID>0.0.0.1 /bill 151665 3</POID>
…
</invoice>
[data source = sql query for bursting]
 
<ROWSET>
<INVOICE_POID>159696</INVOICE_POID>
  <ROW>
   <OBJ_ID0>159696</OBJ_ID0>
   <REC_ID>0</REC_ID>
   <BUFFER_BUF>
        <invoice>
                <POID>0.0.0.1 /bill 151665 3</POID>
…
        </invoice>
   </BUFFER_BUF>
  </ROW>
</ROWSET>

Referencing fields from the root

<?xdoxslt:set_variable($_XDOCTX,'currency',
/invoice/BILLINFO/CURRENCY)?>
<?xdoxslt:set_variable($_XDOCTX,'currency',/ROWSET/ROW/BUFFER_BUF/invoice/BILLINFO/CURRENCY)?>

‘Contains' function

<?if:contains(EVENT_OBJ,'adjustment')='true'?>
<?if:contains(EVENT_OBJ,'adjustment')?>

‘Doesn't contain' function

contains(ITEM_OBJ,'writeoff_reversal')!='true'
not(contains(ITEM_OBJ,'writeoff_reversal'))

Configuring the pin_inv_doc_gen Utility

The pin_inv_doc_gen utility creates, delivers, and stores your invoice documents in the BI Publisher Scheduler database.

Configuring pin_inv_doc_gen involves:

Configuring the Infranet.properties File for pin_inv_doc_gen with BI Publisher

The Infranet.properties file stores your network configuration entries for the pin_inv_doc_gen utility.

To configure the Infranet.properties file for pin_inv_doc_gen:

  1. Go to BRM_home/apps/pin_inv_doc_gen.

  2. Save the Infranet.properties.sample file as Infranet.properties.

    The Infranet.properties.sample file for the pin_inv_doc_gen utility includes the standard configuration entries. See "Using Configuration Files to Connect and Configure Components" in BRM System Administrator's Guide.

    Note:

    You must have read-write permissions to access the /invoice object. Your invoice data is stored in the /invoice object. The BRM system administrator creates this user and grants the required permissions.

  3. Open the Infranet.properties file in a text editor, and add your network entries and their values, as listed in Table 11-3.

    Table 11-3 Infranet.properties.sample File Entries

    Entry Description

    infranet.bip.password

    Specifies the password.

    Note: The password can be encrypted with Advanced Encryption Standard (AES) for security.

    infranet.bip.username

    Specifies the name of the BI Publisher server.

    infranet.bip.url

    Specifies the URL of BI Publisher in the following format

    http://BIP_Hostname:Port/xmlpserver

    Note: Enable HTTPS and the SSL port for secure communication. See: "Configuring HTTPS for Secure Communication".

    infranet.burst.threadpool.chunksize

    Specifies the maximum number of BRM invoices per BI Publishing bursting query.

    infranet.burst.threadpool.maxsize

    Specifies the maximum number of concurrent threads in the pool.

    infranet.burst.threadpool.size

    Specifies the number of core threads in the pool.

    infranet.connection

    Specifies the URL to the BRM service.

    infranet.dmsearchargs.size

    Specifies the number of account and bill unit pairs the utility should process at one time.

    The maximum value is 14.

    infranet.dupinvdir.path

    Specifies the directory path for storing duplicate invoice documents.

    infranet.dupinvoice.watermark.angle

    Specifies the angle of the watermark text.The default value is 45 (angle of text is 45 degrees).

    See the BI Publisher Java API documentation.

    infranet.dupinvoice.watermark.colorr

    Specifies the red component of the watermark text color.

    The default value is 0.7f.

    infranet.dupinvoice.watermark.colorg

    Specifies the green component of the watermark text color.

    The default value is 0.7f.

    infranet.dupinvoice.watermark.colorb

    Specifies the blue component of the watermark text color.

    The default value is 0.7f.

    infranet.dupinvoice.watermark.coordx

    Specifies the x-coordinate of the start of the watermark text.

    The default value is 200f (starting coordinate lower left x).

    infranet.dupinvoice.watermark.coordy

    Specifies the y-coordinate of the start of the watermark text.

    The default value is 250f (starting coordinate lower left y).

    infranet.dupinvoice.watermark.font

    Specifies the font of the watermark text.

    The default value is Arial.

    infranet.dupinvoice.watermark.fontsize

    Specifies the size of the watermark text.

    The default value is 48.

    infranet.dupinvoice.watermark.text

    Specifies the text to be displayed as the background watermark in the duplicate invoice.

    The default value is DUPLICATE.

    infranet.schedulerdb.url

    Specifies the scheduler database URL in the following format:

    jdbc:oracle:thin:hostname:port/service

    where hostname is the hostname of the scheduler database, port is the port number for the scheduler database, and service is the service name of the scheduler database.

    infranet.schedulerdb.user

    Specifies the user name for the scheduler database.

    infranet.schedulerdb.credentials

    Specifies the security credentials for connecting to the scheduler database.

    infranet.jdbcpool.size

    Specifies the initial number of connections maintained in the pool.

    The default is set to the same as burst.threadpool.size.

    infranet.jdbcpool.maxsize

    Specifies the maximum number of connections that can be created.

    The default is set to the same as burst.threadpool.maxsize.

    infranet.http.notification.server

    Specifies the name of the HTTP server used for notifications.

    Important: Enable HTTP notifications in BI Publisher. See the BI Publisher documentation for details.

    infranet.http.notification.userName

    Specifies the HTTP server login name.

    infranet.http.notification.password

    Specifies the HTTP server login password.

    infranet.log.file

    Specifies the log file name for the pin_inv_doc_gen utility.

    infranet.log.level

    Specifies the level of log for the pin_inv_doc_gen utility.

    infranet.login.type

    Specifies the type of login. A type 1 login requires the application to provide a user name and password. A type 0 login is a trusted login that comes through a Connection Manager (CM) proxy. It doesn't require a user name or password. Use 1 or 0.

    infranet.notify.http.when.success

    Specifies whether to receive HTTP notification when a BI Publisher job is successful. By default, HTTP notification is enabled and set to true. To disable HTTP notification, set this entry to false.

    infranet.notify.http.when.warning

    Specifies whether to receive HTTP notification when a BI Publisher job contains warnings. By default, HTTP notification is enabled and set to true. To disable HTTP notification, set this entry to false.

    infranet.polling.sleeptime

    Specifies the sleep time (in milliseconds) between polling calls while waiting for the BI Publisher schedule to complete. The default value is 5000 (5 seconds).

    infranet.threadpool.fetchsize

    Specifies the number of records that can be fetched by the thread. The default value is 5.

    infranet.threadpool.maxsize

    Specifies the maximum number of threads. The default value is 5.

    infranet.threadpool.size

    Specifies the number of threads. The default value is 3.

  4. Save and close the file.

Configuring the docgen.sh Batch Script

The docgen.sh batch script is used for setting environment variables and launching the pin_inv_doc_gen utility.

To configure the docgen.sh batch script:

  1. Go to the BRM_home/apps/pin_inv_doc_gen directory.

  2. Open the docgen.sh batch script in a text editor.

  3. Edit the default values available in the file to the values specific to your system environment.

    Note:

    The pin_inv_doc_gen utility runs only in the 32-bit mode. Set the Java executable in the docgen.sh file to the 32-bit Java version.

  4. Save and close the file.

Changing Command-Line Parameters for pin_inv_doc_gen

To change the command-line parameters for pin_inv_doc_gen utility, you update the docgen.sh batch script:

  1. Go to the BRM_home/apps/pin_inv_doc_gen directory.

  2. Open the docgen.sh batch script in a text editor.

  3. Search for the following line:

    invoicedocgen.pin_inv_doc_gen -status pending
  4. Add or replace the pin_inv_doc_gen command-line parameter with the required parameter. For syntax and parameter usage, see "pin_inv_doc_gen".

  5. Save and close the file.

  6. In the command prompt, navigate to the BRM_home/apps/pin_inv_doc_gen directory.

  7. Enter the following command which runs the docgen.sh batch script:

    docgen.sh

    The pin_inv_doc_gen utility runs with the updated command-line parameter.

Setting Scheduler Configuration

To set scheduler configuration, see the discussion of setting scheduler configuration options in the BI Publisher documentation.

Configuring the Email Server

To configure the email server in BI Publisher, see the discussion of setting up delivery options in the BI Publisher documentation.

Configuring HTTPS for Secure Communication

BI Publisher can be configured to support HTTPS for secure communication. In addition to setting up HTTPS in BI Publisher, you also configure the Infranet.properties file and pin_inv_doc_gen utility.

To configure HTTPS for secure communication:

  1. Enable HTTPS in BI Publisher. For more information, see the BI Publisher documentation.

  2. Open the Infranet.properties file in a text editor.

  3. Add the following line:

    infranet.bip.url=https://BIP_Hostname:SSL_port/xmlpserver

    where:

    • BIP_Hostname is the host name on which the BI Publisher server is installed.

    • SSL_port is your secure sockets layer port number.

  4. Save and close the file.

  5. In the command prompt, navigate to the BRM_home/apps/pin_inv_doc_gen directory.

  6. Enter the following command which runs the docgen.sh batch script:

    docgen.sh

    The pin_inv_doc_gen utility runs with the updated URLs.

  7. Enter yes for:

    Is it a trusted certificate?
Creating the XMLP_INVOICE_JOB Table in the Scheduler Database

The XMLP_INVOICE_JOB table stores the mapping of the job ID to the Invoice_POID for which an invoice document is generated.

To create the XMLP_INVOICE_JOB table in the Scheduler database:

  1. Go to BRM_home/apps/pin_inv_doc_gen.

  2. Open the Create_Xmlp_Invoice_Job.sql file.

  3. Search for <tablespacename>.

  4. Replace <tablespacename> with the tablespace name where all the BI Publisher Scheduler tables in the BI Publisher Scheduler database are created.

  5. Save and close the file.

  6. In a terminal, enter the following command to open SQL*Plus:

    sqlplus user_name@Database_Name
    Enter password: password

    where:

    • user_name is the user name for the Scheduler database.

    • password is the password for the Scheduler database.

    • Database_Name is the SID of the Scheduler database.

  7. At the SQL prompt, enter the following command:

    SQL> @Create_Xmlp_Invoice_Job.sql
  8. Configure the Java Naming and Directory Interface (JNDI) for invoiceXREF to allow the pin_inv_doc_gen utility to connect to the Scheduler database:

    1. Log on to the Oracle WebLogic Console.

    2. Click Services.

    3. Click Data Sources.

    4. Click the Lock and Edit button.

    5. Create a new data source.

    6. Enter JNDI details:

      Name=invoiceXREF

      JNDI name= jdbc/OracleBRM/invoiceXREF

    7. Click Next.

    8. Enter the Scheduler database details that you used when you installed the XMLP_INVOICE_JOB table.

    9. Click Next.

    10. Select the server on which the BI Publisher software is installed.

    11. Click Finish.

    12. Click Activate Changes.

    13. Stop and restart the BI Publisher server.

Configuring the BRM-BI Publisher Invoicing Integration to Support Multischema Systems

To configure the BRM-BI Publisher invoicing integration to support multischema systems, do the following:

Loading Stored Procedures

To load stored procedures, do the following:

  1. Go to BRM_home/apps/pin_inv_doc_gen

  2. Open SQL*Plus at the command line:

    sqlplus user_name@Database_Name
    Enter password: password
  3. Enter the following command:

    SQL>@invoice_bursting.plb
  4. Type exit to quit SQL*Plus.

Creating New JDBC Data Sources

The BRM-BI Publisher invoicing integration packages invoicing reports and the data model for BRM primary schema. To create new JDBC sources to support BRM multischema, you follow these procedures. For more information, refer to the BI Publisher documentation.

Creating Data Source for Each BRM Schema

To create a data source for each BRM schema:

  1. In a Web browser, enter the following URL:

    http://BI_Publisher_host:port/xmlpserver/
    

    where:

    • BI_Publisher_host is the host name on which the BI Publisher server is installed.

    • port is the console port. The default port is 9704.

      The BI Publisher Enterprise client opens.

  2. On the global header, click Administration.

  3. Under Data Sources, click JDBC Connection.

  4. On the JDBC page, click the Add Data Source button.

  5. Enter the following database connection details for the BRM schema:

    • In the Data Source Name field, enter the schema number in 0.0.0.n format. For example, 0.0.0.1 for the primary schema or 0.0.0.2 for the secondary schema.

    • In the Driver Type field, enter Oracle 12c.

    • In the Database Driver Class field, enter oracle.jdbc.OracleDriver.

    • In the Connection String field, enter your database connection details. For example:

      jdbc:oracle:thin:@Hostname:port:SID

      where Hostname is the host name for the database that contains the secondary schema.

  6. Click Test Connection, which verifies the connection to BRM schema.

    A confirmation message is displayed.

  7. Click Apply, which saves your changes.

  8. Repeat the previous steps for each schema.

Setting Up the Data Model Configuration for Multischema

To configure invoices for multischema:

  1. In the BRM_Invoices reports directory, copy reports directory 0.0.0.1 to 0.0.0.n.

  2. Rename the data model directory within 0.0.0.n. For example, to set up the data model configuration for 0.0.0.2, do the following:

    cd BIP_home/user_projects/domains/bifoundation_domain/config/bipublisher/repository/Reports/BRM_Invoices
    cp -r 0.0.0.1 0.0.0.2
    cd 0.0.0.2
    mv 0.0.0.1.xdm 0.0.0.2.xdm
  3. Edit the data source name specified in "Creating Data Source for Each BRM Schema".

    For example, in 0.0.0.2/0.0.0.2.xdm/ _datamodel.xdm, enter the data source name in defaultDataSourceRef and the BRM schema number in CDATA.

  4. Set the URL of the BRM bursting report data model to the secondary schema by modifying dataModel URL in 0.0.0.2/BRM_Bursting_Invoice_Report.xdo/_report.xdo.

  5. To configure pin_inv_doc_gen for multischema changes, edit the docgen.sh batch script. For example, you add -schema 0.0.0.n where n is the schema number after the -status pending flag of each schema.

    Note:

    The -schema 0.0.0.n parameter is optional. If it is not specified, schema information comes from the infranet.connection value in the Infranet.properties configuration file; the default is 0.0.0.1.

Generating BI Publisher Invoice Documents in BI Publisher

You use the pin_inv_doc_gen utility to generate invoice documents by integrating the capabilities of BRM and BI Publisher. This utility takes a set of input parameters, generates the invoice document, and stores the instance of the invoice document generated in the BI Publisher Scheduler database. Based on the input parameters you pass to pin_inv_doc_gen, the utility fetches the corresponding invoice POID, BI Publisher report name, and layout template name of an /invoice object.

To configure pin_inv_doc_gen utility with the Infranet.properties file, see "Configuring the Infranet.properties File for pin_inv_doc_gen with BI Publisher".

To run the pin_inv_doc_gen utility:

  1. Configure the docgen.sh batch script to run the appropriate pin_inv_doc_gen command. To view the utility's syntax and parameters, see "pin_inv_doc_gen".

  2. Go to the BRM_home/apps/pin_inv_doc_gen directory.

  3. Enter the following command which runs the docgen.sh batch script:

    docgen.sh

Generating BI Publisher Invoice Documents for a List of Accounts

You can generate BI Publisher invoice documents for a list of accounts by using the pin_inv_doc_gen utility -accts_list InvoiceList.xml parameter. The number of data units (accounts and bill units) in the InvoiceList.xml file should be within the permissible range for the Data Manager (DM) to search the /invoice objects from the BRM database.

You can specify the number of account and bill unit pairs the pin_inv_doc_gen utility should process at one time by using the infranet.dmsearchargs.size parameter in the Infranet.properties file. The maximum value is 14. For example, if the InvoiceList.xml file lists 20 account and bill unit pairs and the infranet.dmsearchargs.size value is set to 6, the pin_inv_doc_gen utility processes six account and bill unit pairs at a time.

In the InvoiceList.xml file, if you specify the account and bill unit pair of a corporate account, the invoice document is generated only for the specified account and bill unit. If the specified corporate account has child accounts that own only nonpaying bill units, the /invoice objects of those child accounts are not selected for generating the invoice document.

To generate invoice documents for a list of accounts and their bill units:

  1. Create an XML file that lists all of the accounts and bill units for which to create BI Publisher invoices. The XML file must be in the following format:

    Note:

    You can use the BRM_home/apps/pin_inv_doc_gen/InvoiceList.xml file as an example.

    <InvoiceDocGenConfig>
       <InvoicingList>
          <Account>101304</Account>
          <Billinfo>402678</Billinfo>
       </InvoicingList>
       <InvoicingList>
          <Account>405304</Account>
          <Billinfo>522678</Billinfo>
       </InvoicingList>
    <InvoiceDocGenConfig>
  2. Save and close the file.

  3. Go to the BRM_home/apps/pin_inv_doc_gen directory.

  4. Open the docgen.sh batch script in a text editor.

  5. Search for the following line:

    invoicedocgen.pin_inv_doc_gen -status pending
  6. Replace with:

    invoicedocgen.pin_inv_doc_gen -accts_list InvoiceList
    

    where InvoiceList specifies the name and location of the file that includes a list of accounts and bill units for which to create invoice documents. This is the file you created in step1.

  7. Save and close the file.

  8. Go to the BRM_home/apps/pin_inv_doc_gen directory.

  9. Enter the following command which runs the docgen.sh batch script:

    docgen.sh

Generating BI Publisher Invoice Documents Based on the Account Type

To generate invoices based on the account type:

  1. Go to the BRM_home/apps/pin_inv_doc_gen directory.

  2. Open the docgen.sh batch script in a text editor.

  3. Search for the following line:

    invoicedocgen.pin_inv_doc_gen -status pending
      
  4. Do one of the following:

    • To generate invoice document for consumer account types, replace with:

      invoicedocgen.pin_inv_doc_gen -type consumer
        
    • To generate invoice document for corporate account types, replace with:

      invoicedocgen.pin_inv_doc_gen -type corporate
        
  5. Save and close the file.

  6. In the command prompt, navigate to the BRM_home/apps/pin_inv_doc_gen directory.

  7. Enter the following command which runs the docgen.sh batch script:

    docgen.sh

Generating Duplicate Invoice Documents with BI Publisher

You can generate duplicate BI Publisher invoice documents for invoices that you have already generated by using the pin_inv_doc_gen utility -status generated parameter.

To generate duplicate BI Publisher invoice documents:

  1. Go to the BRM_home/apps/pin_inv_doc_gen directory.

  2. Make sure the infranet.dupinvdir.path entry in the utility's Infranet.properties file specifies the directory in which to write the file. See "Configuring the Infranet.properties File for pin_inv_doc_gen with BI Publisher".

  3. Open the docgen.sh batch script in a text editor.

  4. Search for the following line:

    invoicedocgen.pin_inv_doc_gen -status pending
      
  5. Replace with:

    invoicedocgen.pin_inv_doc_gen -status generated
      
  6. Save and close the file.

  7. In the command prompt, navigate to the BRM_home/apps/pin_inv_doc_gen directory.

  8. Enter the following command to run the docgen.sh batch script:

    docgen.sh

    Note:

    Oracle recommends DocMerger as the utility to generate a duplicate invoice with a DUPLICATE watermark. However, you can use this utility only for PDF documents. Hence, you can generate an invoice document with a DUPLICATE watermark only if the original invoice document was generated in PDF.

Generating Invoice Documents for Non-Invoice Accounts

Regardless of the payment type or delivery method, any invoice in pending status can be printed. Therefore, you can generate invoice documents for non-invoice accounts such as credit cards. BI Publisher generates PDFs for any invoice with a non-invoice payment type and stores them in the BI Publisher database.

To deliver invoice documents for non-invoice accounts, configure the delivery method of the bursting query by adding a delivery type (such as FTP) to the DEL_CHANNEL parameter and by adding the appropriate values to PARAMETER 1 through PARAMETER 8 as described in the Oracle Fusion Middleware Report Designer's Guide for Oracle Business Intelligence Publisher.

Generating Invoices for Hierarchical Bill Units with BI Publisher

Bill unit hierarchies enable customers to pay other customers' bills. For more information, see discussions about account and bill unit hierarchies in BRM Managing Accounts Receivable and BRM Configuring and Running Billing.

Generating trial and regular invoices with BI Publisher is suited for large bill unit hierarchies for the following reasons:

  • Each bill unit is processed within its own transaction, which is later used in the processing cycle.

  • Each bill unit is not loaded into RAM, which reduces RAM utilization.

  • Collation is run after the generation of each bill unit within the hierarchy. Each bill unit is arranged in a predetermined sequence and by default is rendered in PDF.

    Note:

    By default, if any bill unit in the hierarchy fails to generate, collation is halted, and an invoice is not produced.

Setting Up Invoicing for Hierarchical Bill Units with BI Publisher

To set up invoicing for hierarchical bill units with BI Publisher:

  1. Ensure that all the preliminary configurations required for billing are completed. See BRM Configuring and Running Billing.

  2. Enable the BI Publisher integration. See "Enabling the BRM-BI Publisher Integration".

  3. Set your system to generate invoice documents using BI Publisher. See "Setting Up Your System to Generate Invoice Documents Using BI Publisher".

  4. Verify that BRM is set up with the required templates to generate hierarchical invoices. See "Invoice Template for Hierarchical Bill Units".

  5. Associate bill units with a BI Publisher invoice and report.

  6. Load the business profile information into the BRM database. See "Loading Invoicing Business Profiles into the Database".

  7. Configure the pin_inv_doc_gen utility. See "Configuring the pin_inv_doc_gen Utility".

  8. Verify that both BI Publisher and BRM are set to generate the final invoice either with or without nonpaying child bill unit details. See "Setting Nonpaying Child Bill Unit Processing in BI Publisher and BRM".

  9. Verify that the BRM_home/apps/pin_trial_bill/pin.conf file's Threshold entry is commented out. Setting thresholds limits the number of nonpaying child bill units that are invoiced, which leads to errors when the parent account is trial billed.

Invoice Template for Hierarchical Bill Units

Use the BRM_Corporate_Invoice.rtf template for generating hierarchical bill unit invoices. The BRM_Corporate_Invoice.rtf template includes the following layout and formatting:

  • Depending on how the hierarchical bill unit tax is calculated, the template adds one of the following labels:

    • If the tax is calculated at the nonpaying child bill unit level, a Subord Total (Tax Included) label is added on the first page of the invoice.

    • If the tax is calculated at the paying parent bill unit level, a Subord Total (Tax Not Included) label is added on the first page of the invoice.

  • To distinguish the trial invoice from the regular invoice, a Trial Invoice watermark is added to all the pages after the first page. You can change the watermark text by customizing the PCM_OP_INV_POL_PREP_INVOICE policy opcode. See BRM Opcode Guide.

Setting Nonpaying Child Bill Unit Processing in BI Publisher and BRM

Note:

When generating invoices for hierarchies, both BI Publisher and BRM must be set to process the final invoice either with or without nonpaying child bill units:

  • If you require an invoice that includes nonpaying details, set BRM to process nonpaying child bill units and BI Publisher to generate a single invoice from a group of invoices.

  • If you require an invoice that does not include nonpaying details, set BRM not to process nonpaying child bill units and BI Publisher to generate individual invoices.

In BRM and BI Publisher, you can choose whether to include the full nonpaying bill unit details in the parent bill unit's invoice.

  • When you include the full nonpaying bill unit details, a separate invoice is generated for each nonpaying child bill unit and the totals rolled up into the paying parent's invoice. When the final invoice is generated, each nonpaying invoice is collated and merged into the final invoice.

  • When you do not include the full nonpaying details for hierarchical bill units, only one parent invoice is created, which contains totals from the nonpaying bill units.

To set nonpaying bill unit processing in BI Publisher and BRM for hierarchies:

  1. In BRM, set the threshold for the maximum number of nonpaying child bill units allowed in the parent invoice with the ThresholdSubordsSummary and ThresholdSubordsDetail business parameters.

    • To generate an invoice for each nonpaying child bill unit and include all of them in the final invoice, set the threshold value higher than the number of nonpaying child bill units.

    • To generate an invoice without nonpaying child bill unit details, set the threshold value to less than or equal to the number of nonpaying child bill units.

    For more information on how to set the ThresholdSubordsSummary and ThresholdSubordsDetail business parameters, see "Invoicing for Hierarchical Bill Units".

    Note:

    • A value of 0 disables the threshold parameter. BRM does not create separate invoices for nonpaying child bill units.

    • If nonpaying details are not captured in the final invoice, they are still available in the /invoice object of the nonpaying child bill unit.

  2. In BI Publisher, set the BRM_Bursting_Invoice_Report to generate individual invoices or a single invoice from a group of invoices as follows:

    1. Log in to BI Publisher.

    2. From the menu select Catalog, and then select BRM-Invoices.

    3. From the BRM-Invoices section, click the data model 0.0.0.1 link.

      The 0.0.0.1 page appears.

    4. In the Data Model section, expand the Bursting list and select BRM_Bursting_Invoice_Report_Bursting_Query.

    5. From the Split By list in the BRM_Bursting_Invoice_Report_Bursting_Query section, select one of the following:

      • To generate a single invoice from a group of invoices, select /ROW_SET/LIST_ROW/ROW/BILL_NO.

      • To generate individual invoices, select /ROW_SET/LIST_ROW/ROW/OBJ_ID0.

    6. Save the data model 0.0.0.1.

    7. Exit BI Publisher.

    By default the BRM report BRM_Bursting_Invoice_Report is set to create the final invoice from a group of invoices for hierarchical accounts. Invoices with the same bill number are generated and then collated and merged into the parent invoice as a single PDF.

Creating Hierarchical Bill Unit Trial Invoices with BI Publisher

To create hierarchical bill unit trial invoices with BI Publisher:

  1. Go to the BRM_home/apps/pin_trial_bill directory.

  2. Run the following command, which creates trial invoices for nonpaying child bill units:

    pin_trial_bill_accts -pay_type 10007
      
  3. Run the following command, which creates trial invoices for the paying parent bill units:

    pin_trial_bill_accts -pay_type  ID
      

    where ID is the element ID of the payment method for the parent bill unit. For more information, see "Default Payment Methods" in BRM Configuring and Collecting Payments.

  4. Go to the BRM_home/apps/pin_inv_doc_gen directory.

  5. Enter the following command to run the docgen.sh batch script:

    docgen.sh

Creating Hierarchical Bill Unit Regular Invoices with BI Publisher

To create hierarchical bill unt invoices with BI Publisher:

  1. Go to the BRM_home/apps/pin_billd directory.

  2. Run the following command, which runs billing for nonpaying child bill units:

    pin_bill_accts -pay_type 10007
  3. Run the following command, which runs billing for the paying parent bill units:

    pin_bill_accts -pay_type  ID

    where ID is the element ID of the payment method for the parent bill unit. For more information, see "Understanding Payment Methods" in BRM Managing Customers.

  4. Go to the BRM_home/apps/pin_inv_accts directory.

  5. Run the following command, which creates regular invoices for nonpaying child bill units:

    pin_inv_accts -hierarchy
  6. Run the following command, which creates regular invoices for the paying parent bill units:

    pin_inv_accts -pay_type  ID
  7. Go to the BRM_home/apps/pin_inv_doc_gen directory.

  8. Enter the following command to run the docgen.sh batch script:

    docgen.sh

Regenerating Failed Invoices for Hierarchical Bill Units

When an error occurs in trial billing, generation of the bill unit's invoice stops. You must rerun trial billing on the nonpaying child bill units before rerunning trial billing on the paying parent bill units. You must also regenerate trial invoices on the paying parent bill units that did not contain an error.

To regenerate invoices for hierarchical bill units that failed the last trial billing run:

  1. Fix the errors.

  2. Go to the BRM_home/apps/pin_trial_bill directory.

  3. Run the following command, which reruns trial billing on nonpaying child bill units that contained errors in the last billing run:

    pin_trial_bill_accts -pay_type 10007 -retry
  4. Run the following command, which reruns trial billing on the paying parent bill units that contained an error in the last billing run:

    pin_trial_bill_accts -pay_type ID -retry

    where ID is the element ID of the payment method for the parent account. For more information, see "Understanding Payment Methods" in BRM Managing Customers.

  5. Run the following command, which generates trial invoicing for the paying parent bill units that did not contain an error in the last billing run:

    pin_trial_bill_accts -pay_type ID
  6. Go to the BRM_home/apps/pin_inv_doc_gen directory.

  7. Enter the following command to run the docgen.sh batch script:

    docgen.sh
Purging Trial Invoices

To purge trial invoices, run the pin_trial_bill_purge utility.

By default, pin_trial_bill_purge purges invoices with the /invoice/trial POID type. If a custom /invoice subclass exists, invoices with /invoice/custom_subclass/trial POID type are purged.

Note:

If the /invoice class is partitioned, running the purge utility (partition_utils -o) on /invoice purges both regular invoices and trial invoices.

For a description of the syntax and parameters of this utility, see "pin_trial_bill_purge" in BRM Configuring and Running Billing.

For more information about partitioning and purging database tables, see the following in BRM System Administrator's Guide:

Deferred Taxation Limitations for Hierarchical Bill Units

BRM offers two options for deferred taxation: taxes can be consolidated into a single item for both the paying parent and nonpaying child bill units, or taxes can be calculated for each individual nonpaying child bill unit, which are listed as separate items on the parent bill:

  • When taxes are consolidated into a single item for both the paying parent and nonpaying child bill unit, the total tax is calculated at the parent level for the entire hierarchy using an aggregated total due as its basis. In this instance, the cycle_tax_interval entry in BRM_home/sys/cm/pin.conf configuration file is set as follows:

    -fm_bill cycle_tax_interval billing

    Note:

    This option is not supported when using trial billing or trial invoicing with BI Publisher for hierarchical bill units.

  • When taxes are calculated for each individual nonpaying child bill unit, the total tax is a summation of taxes that were calculated for each bill unit. In this instance the cycle_tax_interval entry in BRM Home/sys/cm/pin.conf configuration file is set as follows:

    -fm_bill cycle_tax_interval accounting

Note:

This option is supported when you use trial billing or trial invoicing with BI Publisher for hierarchical bill units, with the following limitations.

  • The total tax value can contain small rounding errors caused by the system calculating taxes on smaller totals of each bill unit rather than the grand total.

  • The basis for determining the tax rate is with the individual nonpaying child's bill unit rather than the parent. To avoid tax rate discrepancies between trial and production runs, all tax-affecting attributes (for example, address information and tax exemptions) for all bill units within the hierarchy must be synchronized to those of the parent bill unit.

Troubleshooting Issues with Hierarchical Bill Unit Invoice Generation

This section lists problems you might encounter while trying to generate hierarchical bill unit invoices and provides information on how to fix them.

Nonpaying child invoices not generated

Scenario: A parent account has a paying parent bill unit. Each of the parent account's two child accounts has a nonpaying child bill unit whose paying parent bill unit is owned by the parent account. The ThresholdSubordsSummary and ThresholdSubordsDetail business parameters are set to 1. The following command is run:

pin_inv_accts -pay_type 10018 -verbose

Solution: To create nonpaying child invoices, the pin_inv_accts utility requires the -hierarchy parameter. Run the following commands:

pin_inv_accts –hierarchy -verbose
pin_inv_accts –pay_type 10018 -verbose

Invoice generation is successful, but the billing amounts for the parent bill unit in the final invoice are incorrect

Scenario: One parent account has a paying parent bill unit. Each of the parent account's two child accounts has a nonpaying child bill unit whose paying parent bill unit is owned by the parent account. The ThresholdSubordsSummary and ThresholdSubordsDetail business parameters are set to 1. The following commands are run:

pin_inv_accts -pay_type 10007 -verbose
pin_inv_accts -pay_type 10018 -verbose

Solution: The BI Publisher template is configured with a bursting option, which is using the same invoice details twice. Change the BI Publisher template to a nonbursting option.

See "Setting Nonpaying Child Bill Unit Processing in BI Publisher and BRM".

Multiple /invoice objects are created instead of one, and after running the docgen.sh script, the invoice is generated, but the amounts are incorrect

Scenario: One parent account has a paying parent bill unit. Each of the parent account's two child accounts has a nonpaying child bill unit whose paying parent bill unit is owned by the parent account. The ThresholdSubordsSummary and ThresholdSubordsDetail business parameters are set to 0. The following commands are run:

pin_inv_accts -pay_type 10007 -verbose
pin_inv_accts -pay_type 10018 -verbose

Solution: BI Publisher is set to create invoices for nonpaying child bill units. Whereas the threshold business parameters setting in BRM is set not to create invoices for nonpaying child bill units. BI Publisher and BRM are in conflict. To solve the conflict, change the BI Publisher template to a nonbursting option.

See "Setting Nonpaying Child Bill Unit Processing in BI Publisher and BRM".

Error when running multiple trial invoicing runs for standalone accounts

Scenario: Unable to run multiple instances of trial billing on a standalone account. Invoices are not created for the second run. The following commands are run:

pin_trial_bill_accts -pay_type 10001 -verbose
pin_trial_bill_accts -pay_type 10001 -verbose

Solution: As the trial bill number is the same for both trial invoices, BI Publisher is attempting to collate each generated invoice for the final invoice. Include the docgen.sh script after each run to create a final invoice for each instance as follows:

pin_trial_bill_accts -pay_type 10001 -verbose
doc_gen.sh
pin_trial_bill_accts -pay_type 10001 -verbose
doc_gen.sh

Note:

The trial bill number is used to collate invoices in BI Publisher.

Storing the Invoice Document

You can store invoice documents in the BI Publisher Scheduler database. Oracle recommends configuring a separate database, other than the BRM database, to store invoice documents. See "Setting Scheduler Configuration".

Sending Invoice Documents to the Customers

After generating the invoice document, you can email it to the customers. To send the invoice document through email, you must:

  • Configure the Scheduler database in BI Publisher. See "Setting Scheduler Configuration".

  • Configure the email server and FTP in BI Publisher. See "Configuring the Email Server".

  • Configure the delivery option that is retrieved from the /payinfo object. For more information, see BRM Managing Customers.

Customizing Invoices

Note:

To customize the invoice layout, you should have template-designing experience. See the BI Publisher documentation for instructions on how to create and design layout templates.

You can use the following capabilities of BI Publisher to customize invoice documents:

  • Customizing invoice format: You can format the sample invoice layout templates or create new invoice templates. See "Customizing Invoice Layout Templates".

  • Enriching invoice data: You can enrich the data that is displayed in the invoice by getting data from various sources. See "Enriching Invoice Data".

Customizing Invoice Layout Templates

You can customize the invoice layout template by:

  • Updating the existing layout template file by using BI Publisher Desktop (Template Builder) and Microsoft Word. For more information about updating the layout template in RTF, see the discussion about creating an RTF template in the BI Publisher documentation.

  • Adding a new layout template file. To do so:

    1. Create a new layout template in BI Publisher.

    2. Create a new invoicing /config/business_profile object in BRM to reflect the addition of the new layout template. See "Creating an Invoicing Configuration Business Profile".

Enriching Invoice Data

After receiving invoice data from the BRM database, you might want to enrich the invoice data with marketing messages, customer information available in a customer relationship management (CRM) application, and special messages from the accounting department. BI Publisher provides this functionality by retrieving data from additional data sources.

Note:

The sample layout templates that are available with BRM-BI Publisher invoicing integration package display data fetched from only the BRM database. If you want to enrich your invoice document with additional data sources, you need to customize the sample layout templates. See "Customizing Invoice Layout Templates".

To enrich BRM invoice data:

  • The /invoice objects containing data in XML format should be present in the BRM database.

  • The additional data source must be configured in BI Publisher to enrich the invoice data. See the discussion of setting up data sources in the BI Publisher documentation.

  • Configure data and bursting queries to fetch data from custom data source.

    For detailed instructions on creating or updating BI Publisher reports based on multiple data sources, see the discussion of creating BI Publisher reports based on various data sources in the BI Publisher documentation.