Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Implementation Guide for Oracle Billing Insight > Customizing Payment > Generating Accounts Receivables (A/R Files)It is often necessary to synchronize Payment with a biller's A/R software. Payment sends A/R files periodically to a biller's A/R software, which includes the payments being made through Payment. The format of the file varies among billers. To support this function, Payment has the pmtARIntegrator job, which uses a template and XML/XSLT to generate output in a variety of file formats. The pmtARIntegrator job queries the database to get proper payments, and then writes the payments into a flat file or an XML file using the Payment Template Engine. The XML file can be further transformed into other format by using XSLT. The default implementation of the pmtARIntegrator job performs the following steps:
Customizing the arQuery.xml FileThe SQL queries used by the pmtARIntegrator job are defined in an XML file, arQuery.xml, which is provided by the default Payment installation. The arQuery.xml file is based on Oracle XMLQuery technology. CAUTION: XMLQuery supports paging, but this feature must not be used for this job. Most of the A/R file creation is done by an implementation class of the interface com.edocs.common.payment.tasks.ar.IARPaymentIntegrator. This adaptor interface provides maximum flexibility for customizing this job. The default implementation is com.edocs.common.payment.tasks.ar.SampleARPaymentIntegrator. Before the query is executed in the database, the job invokes the getMap() method of The default IARPaymentIntegrator implementation, SampleARPaymentIntegrator, uses this arQuery.xml file for database query: <?xml version="1.0" encoding="UTF-8"?> <query name="debitCardQuery"> The following queries are defined:
Both creditCardQuery and debitCardQuery get all the successful payments (status=8) of the current payee (biller or DDN of current job) from the relevant Oracle Billing Insight Payment tables. They both use arFlag as a flag to prevent a payment from being sent to the A/R job twice. This flag is initially set to N when the payment is created. After the A/R job runs, the SampleARPaymentIntegrator changes the flag to Y. When using arFlag as an A/R flag, you can create an index for it to increase performance. Each of the queries in the arQuery.xml file has an SQL variable ('?') that must be resolved before the query can be sent to the database. The A/R job calls the getMap() method of IARPaymentIntegrator to get a Map of query variables, and uses their values to replace the '?'s in the query. The names of the Map elements match those defined in the param tags of the query tags. For example, the default arQuery.xml file has the param tag: <param name="payee_id" type="java.lang.Integer" position="1"/> To support this, define a Map element whose name is payee_id and whose value (which must be an Integer, and contains the DDN reference number) replaces the question mark (?) with payee_id in the query: select payment_id, payer_account_number, amount, pay_date, status, payee_id from EDX_PMT_TRANSACTION where payee_id = ? and status = 108 and arFlag = 'N' and PAYMENT_TYPE='check' The query result set will be transferred to a list of checks (ICheck objects) for checkQuery, credit cards (ICreditCard objects) for creditCardQuery, debit cards(ICreditCard objects) for debitCardQuery, and then pass that list to the process() method of IARPaymentIntegrator. CAUTION: The XML Query object supports paging, but do not use this feature for A/R query. You can modify this file to use different queries. Querying Case StudyThe new requirement for this example is to retrieve all payments whose status is returned or paid between 5:00PM today (the job run date) and 5:00PM yesterday (yesterday's job run date).
Customizing the arFlat_template.txt FilePayments returned by the arQuery.xml file are written to an A/R file using an Oracle Billing Insight Payment template file. Two templates come with Oracle Billing Insight: The arFlat_template.txt file generates a sample flat A/R file. If this file includes most of your required data, but the format is not what you want, then you can edit the template file to generate your own format. For more information about using the Template class, see Accessing Oracle Billing Insight Data Dictionary and Javadoc. The A/R job using arFlat_template.txt does the following:
Customizing the arXML_template.xml FileThe arXML_template.xml file generates the same information as arFlat_template.txt, but in XML format. After creating the XML file, you can use XSLT to transform it into another XML file or into a flat file. The default arTransform.xsl transforms the original XML file into the same format as the one generated by arFlat_template.txt. Using XSLT is the recommended way to do the customization. The A/R job using the arXML_template.xml file does the following:
To generate different file formats, change arTransform.xsl. Or, customize the arXML_template.xml file directly. Customizing the arXML_template.xml File and Using XSLT to Generate an XML Flat AR FileThe arXML_template.xml file generates the same information as arFlat_template.txt, but in XML format. After generating the XML file, you can use XSLT to transfer it into another XML file or into a flat file. The default arTransform.xsl transforms the XML file into the same format as the one generated by arFlat_template.txt. XSLT is the recommended way to make the customization. This template does the following:
To generate different file formats, change arTransform.xsl. If required, then you can also customize the arXML_template.xml file.
Reimplement IARPaymentIntegratorYou might want to reimplement the default SampleARPaymentIntegrator if you want to add any of the following features. To reimplement the default SampleARPaymentIntegrator
Select Only Check or Credit and Debit Card PaymentsA biller might support only one of check or credit and debit card payments. In this case, you must configure the pmtARIntegrator job to leave the Credit card or Debit card query name in XML query file field blank. To optionally remove any reference to the unavailable payment type, customize the template files (arFlat_template.txt or arXML_template.xml). Compiling and Packaging a Custom IARIntegratorIf you reimplement IARIntegrator or you have some custom Java classes to call from the AR template, then you must recompile and package your changes. In most cases, you put your custom code into payment_custom.jar. Unfortunately, the IARIntegrator and its related classes are packaged as part of ejb-Payment-ar.jar, not payment_custom.jar, so a different procedure is required. To compile, put ejb-payment-ar.jar along with payment-1.0-SNAPSHOT.jar, payment_custom.jar and payment_client.jar in your class path to reimplement IARIntegrator. To package, drop all your AR custom classes into the ejb-payment-ar.jar. A/R FilenamesThe generated A/R files have default names of ar_yyyyMMddHHmmssSSS.template_file_ext. In the files, template_file_ext is the file extension of the template file. The XSLT transformed file has a default name of ar_trans_yyyyMMddHHmmssSSS.extension. The extension is defined in the pmtARIntegrator job configuration. You can rename these files to a more meaningful name. To rename the files, write an implementation of IARPaymentIntegrator. The following code demonstrates how to rename the XSLT output file to another name: package com.edocs.common.ps.ar; Single Payment TypeA biller might have only ACH and not credit card or debit card payments, or conversely. In this case, you can customize the template files (arFlat_template.txt or arXML_template.xml) to remove any references to the unavailable payment type. Or, when configuring the pmtARIntegrator job enter an empty value for the Check query name in XML query file or Credit card or Debit card query name in XML query file parameter. |
![]() |
![]() ![]() |
Implementation Guide for Oracle Billing Insight | Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |