Kofax Integration - XML Interface
-
XML Format
After creating the [header] flysheet for the document type, create an XML file based on the flysheet table columns. Kofax will use the XML format to structure the data for the Imaging registration process to read and import.
Any other OCR provider can use this XML interface to integrate with CMiC’s Imaging application.
-
XML Data
Kofax’s release process writes the extracted data, along with the image filename into an XML file. The format of the XML file is the same for other invoice types such as Subcontract Request for Payment and PO invoices, only the names of the tags differ.
Here’s what a sample of the XML file would look like for an AP Register Invoice:
Copy<Rows>
<Row num="1">
<Apri_Comp_Code>COMPANY CODE</Apri_Comp_Code>
<Apri_Job_Code>JOB CODE</Apri_Job_Code>
<Apri_Exp_Dept_Code>DEPARTMENT CODE</Apri_Exp_Dept_Code>
<Apri_Ven_Code>VENDOR CODE</Apri_Ven_Code>
<Apri_Inv_Code>INVOICE NUMBER</Apri_Inv_Code>
<Apri_Inv_Date>INVOICE DATE</Apri_Inv_Date>
<Apri_Amt>INVOICE AMOUNT</Apri_Amt>
<Apri_Disc_Amt>DISCOUNT AMOUNT</Apri_Disc_Amt>
<Apri_Desc>INVOICE DESCRIPTION</Apri_Desc>
<Image_Name>FILE NAME</Image_Name>
</Row>
<Rows> -
Kofax Lookups and Functions
Copy/**
* Normalize_Phone_Num is used to normalize phone numbers and postal codes.
* (internal function)
* @param p_phone_num - formatted phone nunmber or postal code.
* @return normalized phone number or postal code.
*/
function Normalize_Phone_Num(p_phone_num varchar2) return varchar2 deterministic;
/**
* Normalize_Address is used to normalize addresses.
* (internal function)
* @param p_address - the concatenation of all address fields.
* @return normalized address.
*/
function Normalize_Address(p_address varchar2) return varchar2 deterministic;
/**
* Validate_Job - Check that the job exists and return its company.
* @param p_job_code - the job code.
* @param p_comp_code - an output variable to receive the job's company
* @return 'Y' if the job is valid and 'N' if it is not valid.
*/
function Validate_Job
(
p_job_code in varchar2
,p_comp_code in out varchar2
) return varchar2;
/**
* Validate_Job - Check that the job exists.
* @param p_job_code - the job code.
* @return 'Y' if the job is valid and 'N' if it is not valid.
*/
function Validate_Job(p_job_code in varchar2) return varchar2;
/**
* Get_Job_From_Phone_Num
* First look for a match in PMPROJECT, then PBCONT, and finally JBCONT
* @param p_phone_num - the formatted phone number.
* @return a job code if one is found and a null string otherwise.
*/
function Get_Job_From_Phone_Num(p_phone_num varchar2) return varchar2;
/**
* Get_Job_From_Address
* First look for a match in PMPROJECT, then PBCONT, and finally JBCONT
* @param p_address - the full address, concatenated together.
* The order for concatenation is line1, line2, line3, state/province, country, postal code.
* @param p_postal_code (optional)
* If p_postal_code is specified for Get_Job_From_Address an attempt will be made
* to find a unique match on the postal code before trying the full address. This
* increases the probability of a match because postal codes are easier to normalize
* and the search has a good chance of finding a unique vendor, especially in Canada
* or if 9-digit ZIP codes are used.
* @return a job code if one is found and a null string otherwise.
*/
function Get_Job_From_Address
(
p_address varchar2
,p_postal_code varchar2 default null
) return varchar2;
/**
* Validate_Dept
* @param p_dept_code - the department code.
* @return 'Y' if the departmetn was found and 'N' if it was not found.
*/
function Validate_Dept(p_dept_code in varchar2) return varchar2;
/**
* Get_Vendor_From_Phone_Num
* @param p_phone_num - the formatted phone number.
* @return a vendor code if one is found and a null string otherwise.
*/
function Get_Vendor_From_Phone_Num(p_phone_num varchar2) return varchar2;
/**
* Get_Vendor_From_Address
* @param p_address - the full address, concatenated together.
* The order for concatenation is line1, line2, line3, state/province, country, postal code.
* @param p_postal_code (optional)
* If p_postal_code is specified for Get_Vendor_From_Address an attempt will be made
* to find a unique match on the postal code before trying the full address. This
* increases the probability of a match because postal codes are easier to normalize
* and the search has a good chance of finding a unique vendor, especially in Canada
* or if 9-digit ZIP codes are used.
* @return a vendor code if one is found and a null string otherwise.
*/
function Get_Vendor_From_Address
(
p_address varchar2
,p_postal_code varchar2 default null
) return varchar2;
/** Validate Vendor - Check the the vendor code exists for at least one company
* @param p_ven_code - the vendor code
*/
function Validate_Vendor(P_Ven_code varchar2) return varchar2;
/**
* Validate_Invoice_Number - Check for duplicate invoice numbers
* @param p_ven_code - the vendor code.
* @param p_inv_code - the invoice number.
* @return 'Y' if the invoice was not found and 'N' if it was found.
*/
function Validate_Invoice_Number
(
p_ven_code varchar2
,p_inv_code varchar2
) return varchar2;
/**
* @param p_comp_code - the company code.
* @param p_ven_code - the vendor code.
* @param p_job_code - the job code.
* @return collection(Index-By Table) of records with Contract/ContractDesc values
*/
function Get_SC_From_Comp_Ven_Job
(
p_comp_code in varchar2
,p_ven_code in varchar2
,p_job_code in varchar2
) return SCTab;
/**
* @param p_comp_code - the company code.
* @param p_ven_code - the vendor code.
* @param p_alt_address - the alternate address
* @return collection(Index-By Table) of records with Vendor/AltAddress values
*/
function Get_Vendor_Alternate_Address
(
p_comp_code in varchar2
,p_ven_code in varchar2
,p_alt_address in varchar2
) return VendorTab;
/**
* Validate_Equipment - Check that the equipment exists for some company
* @param p_eqp_code - the equipment code.
* @return 'Y' if the equipment was found and 'N' if it was not found.
*/
function Validate_Equipment(p_eqp_code varchar2) return varchar2;
/**
* Validate_Workorder - Check that the work order exists for some company
* @param p_comp_code - the work order company code.
* @param p_wo_code - the work order code.
* @return 'Y' if the work order was found and 'N' if it was not found.
*/
function Validate_Workorder
(
p_comp_code varchar2
,p_wo_code varchar2
) return varchar2;
/**
* validate_apri_inv_code - Check for duplicate invoice numbers
* @param p_ven_code - the vendor code.
* @param p_comp_code - the vendor code.
* @return 'Y' if the invoice was not found and 'N' if it was found.
*/
function validate_apri_inv_code
(
p_comp_code varchar2
,p_ven_code varchar2
,p_inv_code varchar2
) return varchar2;
/**
* Validate_Job_Code - Check that the job exists and return its company.
* @param p_job_code - the job code.
* @param p_comp_code - company code
* @return 'Y' if the job is valid and 'N' if it is not valid.
*/
function Validate_Job_Code
(
p_job_code in varchar2
,p_comp_code in varchar2
) return varchar2;
/**
* Validate_Vend_By_Comp - Check that the vendor code exists and is active.
* @param p_comp_code - company code
* @param p_ven_code - the vendor code.
* @return 'Y' if the vendor exists and is active, and 'N' if it is not.
*/
function Validate_Vend_By_Comp
(
p_comp_code varchar2
,p_ven_code varchar2
) return varchar2;
/**
* Validate_RFP_Amount - Check that the RFP amount does not exceed the contract balance.
* @param p_comp_code - company code
* @param p_ven_code - the vendor code
* @param p_cont_code - the contract code
* @param p_rfp_amt - RFP amount
* @return 'Y' if the RFP amount is not greater than the contract balance, and 'N' if it is.
*/
function Validate_RFP_Amount
(
p_comp_code varchar2
,p_ven_code varchar2
,p_cont_code varchar2
,p_rfp_amt number
) return varchar2;
/**
* Check_For_Unposted_RFPs - Check that there is no unposted RFP for the same contract.
* @param p_comp_code - company code
* @param p_ven_code - the vendor code
* @param p_cont_code - the contract code
* @return 'Y' if there is no unposted RFP for the contract, and 'N' if there is.
*/
function Check_For_Unposted_RFPs
(
p_comp_code varchar2
,p_ven_code varchar2
,p_cont_code varchar2
) return varchar2;
/**
* Check_For_Unposted_RFPs_Chg - Check that there is no unposted RFP for the same contract Change order.
* @param p_comp_code - company code
* @param p_ven_code - the vendor code
* @param p_cont_code - the contract code
* @param p_chg_code - the change code
* @return 'Y' if there is no unposted RFP for the contract change code, and 'N' if there is.
*/
function Check_For_Unposted_RFPs_Chg
(
p_comp_code varchar2
,p_ven_code varchar2
,p_cont_code varchar2
,p_chg_code varchar2
) return varchar2;
/**
* Allow_Null_Invoice_Number - Check the vendor flag to see if null invoice numbers are allowed
* @param p_comp_code - company code
* @param p_ven_code - the vendor code
* @return 'Y' if null invoice numbers are allowed, and 'N' if not.
*/
function Allow_Null_Invoice_Number
(
p_comp_code varchar2
,p_ven_code varchar2
) return varchar2;
/**
* Validate PO - Check if an OPEN PO exists for a company code and a vendor code and a PO number
* @param p_comp_code - the company code
* @param p_ven_code - the vendor code
* @param p_po_num - the PO number
* @return 'Y' if the open PO exists, and 'N' if not.
*/
function Validate_PO
(
p_comp_code varchar2
,p_ven_code varchar2
, p_po_num varchar2
) return varchar2;
/**
* Validate Invoice for Different Vendor - Check if a duplicate invoice number exists for a different vendor number.
* @param p_comp_code - the company code
* @param p_inv_code - the Invoice Number
* @return 'Y' if the invoice was not found and 'N' if it was found.
*/
function validate_inv_diff_ven
(
p_comp_code varchar2
,p_inv_code varchar2
) return varchar2;
/**
* Validate_PO_Extended PO - Check if an OPEN PO exists for a company code and a vendor code and a PO number and PO release number
* @param p_comp_code - the company code
* @param p_ven_code - the vendor code
* @param p_po_num - the PO number
* @param p_po_release_Number - the PO release number
* @param p_error_msg - Error message output
* @return 'Y' if the open PO exists, and 'N' if not.
*/
function Validate_PO_Extended
(
p_comp_code in varchar2
,p_ven_code in varchar2
,p_po_num in varchar2
,p_po_release_Number in number
,p_error_msg out varchar2
) return varchar2;
/**
* Is_Subcontract_Invoice_Exists - Check if an invoice for a given job and vendor exists in the system with subcontract code.
* @param p_comp_code - company code
* @param p_ven_code - the vendor code
* @param p_job_code - the job code
* @return 'Y' if there is no invoice with a Subcobtract exists for the given vendor and Job, and 'N' if there is.
*/
function Is_Subcontract_Invoice_Exists
(
p_comp_code varchar2
,p_ven_code varchar2
,p_job_code varchar2
) return varchar2;