6 Including Invoice Data from Custom Applications

Learn how to include invoice data from custom applications in your customers' invoices in Oracle Communications Billing and Revenue Management (BRM).

Topics in this document:

See also:

Including Invoice Data from Custom Applications

If you process events that originate in a custom application, you can create a template to specify the event invoice data so that it can be included in your invoices.

BRM provides a default template file (pin_invoice_data_map) located in BRM_home/sys/data/config. This file includes a default template for invoice data. You can modify the template or add new templates to the file.

To use this feature, you must do the following:

Using Data Map Templates

Templates in the pin_invoice_data_map file define the fields in invoice data records. If you use different invoice record formats, you can create a template for each record format. The data map file can include any number of templates.

When you define templates, you specify the BRM flist fields that map to the invoice record fields. When the invoice data is processed, the fields are passed in an flist to the invoicing opcodes for processing.

The default template defines the invoice data. You can modify the template or create new templates.

To create or modify templates in the pin_invoice_data_map file:

  1. Open the BRM_home/data/config/pin_invoice_data_map file.

  2. Change the template or add a new template to the end of the file. Use the following syntax:

    ID template_name
    field_level   field_name
    field_level   field_name
    field_level   field_name
    ...

    where:

    • template_name is the name of the template.

    • field_level is the level of the field in the flist.

    • field_name is the associated BRM field.

    For example:

    ID INTEGRATE
    0 PIN_FLD_CALLING_NUMBER
    0 PIN_FLD_CALLED_NUMBER
    . . . 
    0 PIN_FLD_BAL_IMPACTS
    1 PIN_FLD_RATE_TAG
    1 PIN_FLD_AMOUNT
    
  3. Save and close the file.

The order of the fields in the template must correspond to the order of the fields in the invoice record. Any custom invoice data records that you process must follow these rules:

  • Fields must be separated by a pound symbol: #

  • Arrays and substructs must be enclosed in angle brackets: < >

  • Each balance impact element must end with a pipe symbol: |

    Note:

    The pipe is optional after the last element.

  • The first field in the record must be the name of the corresponding invoice data template and be preceded by the @ symbol.

    For example: @INTEGRATE

  • The template name in the record must match the template name in the load_pin_invoice_data_map file.

Loading the Invoice Data Map Templates

After defining invoice data map templates, you load them into the BRM database by running the load_pin_invoice_data_map utility.

Note:

  • When you run load_pin_invoice_data_map, it overwrites the existing invoice data templates. If you are updating a set of templates, you cannot load new templates only. You must load complete sets of invoice data templates each time you run the utility.

  • To connect to the BRM database, load_pin_invoice_data_map needs a configuration file in the directory from which you run the utility. See "Connecting BRM Utilities" in BRM System Administrator's Guide.

  • If you defined a custom field for invoicing, you must add the full path name of the mapping file to the load_pin_invoice_data_map utility's pin.conf file. For more information, see "Making Custom Fields Available to Your Applications" in BRM Developer's Guide.

To load the data map templates:

  1. Go to the directory that contains the utility's configuration file.

  2. Run load_pin_invoice_data_map to load the data map template by using this syntax:

    load_pin_invoice_data_map -d -v pin_invoice_data_map