Implementation Guide for Oracle Billing Insight > Customizing the Payment Consolidator Integration Module > Creating Customized Payment Consolidation Templates >

The Record XML Templates


The record XML templates contain instructions for the payment consolidation jobs to read the data in the input file and map it to the Java objects in Oracle Billing Insight. Similarly, individual record XML templates are used by the payment consolidation jobs to generate output files with the data required by the consolidator.

For each type of input and output file required by your consolidator, you must create a separate record XML template file for each part of the file record:

  • File header record. Marks the beginning of the file and provides the file creation and identification information.
  • File tail record. Marks the end of the file and always contains statistical information such as how many types of records are in the file and the total number of each.
  • Detail record. Detail records appear between the file header and tail records and contain information on each account, depending on the purpose of the file. It could be account enrollment, account deactivation, account update or bill summary.
  • (If supported) Batch header and tail records. If the payment consolidator supports batch processing, then the detail records in the input file will be grouped by batch record. Batch header is stored at the beginning of a batch and the tail record goes at the end of a batch and enclose detail records.

Figure 27 shows the common file layout, consisting of a file header, file tail, and detail records.

Figure 27. Common File Layout for Payment Consolidation

Figure 28 shows the common file layout for a payment consolidator that uses batch processing.

Figure 28. Common File Layout for Payment Consolidation With Batch Processing

Components of the Record XML Template Files

The record XML template files require the following components:

  • A root element name. Use the record prefix plus your consolidator's record type code as the root element name, as shown in the following table.
    Record Type
    Record Prefix
    Example of a Consolidator's Record Type Code
    Root Element Name

    File Header

    PC_FileHeader_

    0000

    PC_FileHeader_0000

    Batch Header

    PC_BatchHeader_

    1111

    PC_BatchHeader_1111

    Detail

    PC_Detail_

    2050

    PC_Detail_2050

    Batch Tailer

    PC_BatchTailer_

    2222

    PC_BatchTailer_2222

    File Tailer

    PC_FileTailer_

    9999

    PC_FileTailer_9999

  • The <record> element. Enclose all data element XML tags between <record> and </record>, for example:

    <PC_Detail_2050>
    <record><recordType pos="1" len="1" required = "Y" target='%detailRecord.setRecordType(?)%'></recordType>
    <billerID pos="2" len="16" fmt="AN" required = "N" target='%detailRecord.setBillerExternalID(?)%'></billerID></record>
    </PC_Detail_2050>

  • A data element for the record type. The record XML template must include a subelement called recordType within the <record> element.
  • Delimiters. The template engine only executes template statements that are enclosed in a pair of delimiters. In the record template XML file the delimiter is a percentage sign (%).

    NOTE:  In the file structure XML template, the delimiter is a dollar sign ($).

  • Record element tags. For input files, each template XML file must specify:
    • Where the data text is located in the input file using the pos and len attributes.
    • (Optional) How to transform the data by specifying fmt and fract attributes.
    • Whether the data field is mandatory by specifying the required attributes.
    • Which class member to use for storing the data field using the target attributes.

      When parsing an input data file such as the account enrollment file, the job reads all data elements of a line in the input file into certain class members according to the format specified by the template XML tags. The generic format of a template XML tag is:

    <billerID pos="104" len="32" fmt="AN" required = "N" target='%detailRecord.setBillerExternalID(?)%'></billerID>

    This tag retrieves the text from position 104 to 136, puts it into the member of class called detailRecord by invoking the method detailRecord.setBillerExternalID(?) defined by the target to set the biller external ID. The template executes the statement specified by the element attribute target enclosed between percentage signs (%).

    For an output file, the rules in the record template XML file describing how to generate the output file fields are also defined by the XML elements, for example:

    <billerId pos="49" len="32" fmt="AN" required="Y">%detailRecord.getBillerExternalID()%</billerId>

    This tag writes the billerId field to the output file. The start position in line is 49 and the length of the field is 32. If the length of value is less than 32, then padding characters are used to fill the field. The value is retrieved by invoking detailRecord.getBillerExternalID(). For more information about using attributes, see Template Attributes. For information about variables you can use in the template XML files, see Template Variables.

Implementation Guide for Oracle Billing Insight Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.