Exported invoice XML file structure

Kofax AP Agility automatically generates the name of the exported XML file with the invoice image stored in base64 format. The name of XML file consists of the invoice number in the Kofax AP Agility database and the export timestamp separated by the underscore (_) symbol.

For the ERP agnostic connection, Kofax AP Agility generates the name of the file with an invoice image in the same manner. If a file with the same name already exists in the output folder, a new unique name is given to the file.

Kofax AP Agility exports organization fields that are set visible on the user interface. In addition to the visible fields, Kofax AP Agility always exports line pairing fields and ECM document ID.

Kofax AP Agility always export the following Invoice Header fields.

Field Name

Description

EcmDocumentId

ECM Document ID.

DocumentLink

Document link.

ErpPoType

JD Edwards PO extension if the JD Edwards PO Number Validation setting is enabled the Settings > Invoice Processing > Capture Profiles > PO Number Settings > PO Number Validation tab.

ScanDate

The Invoice Processing scan date.

SubTotal

Sum of all NetAmount fields.

Urn

Storage field URN (Unique resource number).

IpaInvalidReasonCode

The Invoice Processing invalid reason code.

IpaInvalidReasonRule

The Invoice Processing invalid reason rule.

IpaOrganizationName

The organization name.

IpaOrganizationId

The organization ID.

PaymentComments

Payment comments.

PaymentMethod

Payment methods that indicate a bank transfer and the requirement for a bank account.

ImageExtension

Format of the invoice image, such as .pdf or .tiff.

ImageBase64

Invoice image encoded in base64 format.

The PaymentComments and EcmDocumentId fields are defined in Kofax AP Agility. All other fields are imported from Invoice Processing.

The following table lists the fields used for line items. Kofax AP Agility exports each GL segment separately using the GlSegment tag name. An invoice line may contain multiple GlSegment tags, which each one containing information about the GL segment number, name and value. The following is an example:

<GlSegment segmentNumber="1" name="Segment1">002</GlSegment>

Field Name

Description

LineNumber

ERP PO line number ID.

ChargeCode

Invoice line item charge code. The value is taken from the purchase order line item to which an invoice line is paired.

ChargeCodeId

Invoice line item charge code ID. The value is taken from the purchase order line item to which an invoice line is paired.

CompanyCode

Company code that corresponds to a line item. The value is taken from the purchase order when an invoice line is paired.

ErpPoType

JD Edwards PO extension if the JD Edwards PO Number Validation setting is enabled in the Settings > Invoice Processing > Capture Profiles > PO Number Settings > PO Number Validation tab.

MaterialGroup

The value is taken from the purchase order line item to which an invoice line is paired. If available, it can be mapped to pass this data to a downstream system for a paired line item. It is also used in the automatic tax determination procedure if the selection of the correct tax code is driven by the material group of the item.

Plant

Plant ID. The value is taken from the purchase order line item with which an invoice line is paired. The plant is a code set in the client ERP system that represents the physical location where the purchase order line goods are delivered, or where a service is performed. For example, it can represent a warehouse or an office building.

PoLineNumber

The purchase order line item number. It is populated only if line pairing is successful for this item.

Puom

This column represents the order price unit of measure. This is the unit of measure associated with the unit price for the purchase order line item. It may differ from the regular unit of measure that is associated with the order quantity on the purchase order line.

QtyPuom

The invoice line item quantity expressed in the order price unit of measure.

TaxableAmount

Taxable amount.

TaxCode

For countries that do not use tax jurisdictions, the tax code informs the ERP system how to handle tax for line items. Some countries that do not use tax jurisdiction because tax rates are set by the government at a national level, such as within the European Union. The tax code uses the percentage rate of tax that is charged, as well as describing if an item is a service, it is tax-exempt, or it is zero-rated because it is a cross-border transaction. Under these circumstances, tax jurisdiction is not used. For countries that do not use tax jurisdictions, the tax code informs the ERP system whether the item is subject to tax or not. Some countries that do use tax jurisdictions have tax rates that are set at a local level such as in the United States, Canada, India, and Brazil. The accompanying tax jurisdiction code, which is the identification umber of a specific tax office, represents the actual percentage rate information. These columns are only mapped if the automatic tax determination feature is used.

Activity

GL Data: The project activity.

BusinessArea

GL Data: The business area.

CostCenter

GL Data: The cost center that is used for miscellaneous charge general ledger entries.

DbCrIndicator

GL Data: The debit/credit indicator.

InternalOrder

GL Data: The internal order number.

Network

GL Data: The project network.

ProfitCenter

GL Data: The profit center that is used for miscellaneous charge general ledger entries.

SalesOrder

GL Data: The sales order document number.

SalesOrderItem

GL Data: The sales order document item number.

TaxJurCode

Tax jurisdiction code. See description for TaxCode.

WbsElem

GL Data: The work breakdown structure element.

GlAccount

General ledger account entry.

GlSegment

General ledger account segment.

ConditionCount

SAP ECC condition count.

ConditionStepNo

SAP ECC condition step number.

ConditionType

SAP ECC condition type.

FreightVendor

Freight vendor ID.

GrDocItem

Goods receipt document item number.

GrDocNo

Goods receipt document number.

GRDocYear

Goods receipt document year.

SheetItem

SAP ECC Service entry sheet item.

SheetNo

SAP ECC Service entry sheet item.

IpaBusinessUnit

PeopleSoft PO extension if the PeopleSoft PO Number Validation setting is enabled in the Settings > Invoice Processing > Capture Profiles > PO Number Settings > PO Number Validation tab.

IpaLineType

The Invoice Processing line type.

For example, the structure of the XML file may look as follows:

<?xml version="1.0" encoding="utf-8"?>
<Invoice>
  <BusinessUnitID>204</BusinessUnitID>
  <Currency>USD</Currency>
  <Discount>0</Discount>
  <DiscountDueDate></DiscountDueDate>
  <DocumentType>INVOICE</DocumentType>
  <DueDate>7/3/2017 12:00:00 AM</DueDate>
  <Freight>90</Freight>
  <InvalidReason></InvalidReason>
  <InvoiceDate>7/3/2017 12:00:00 AM</InvoiceDate>
  <InvoiceNumber>GECD204NP504</InvoiceNumber>
  <InvoiceType>Non-PO</InvoiceType>
  <AmtMiscellaneous>0</AmtMiscellaneous>
  <NetAmount1>752.97</NetAmount1>
  <PoNumber></PoNumber>
  <PoType></PoType>
  <TaxAmount1>47.06</TaxAmount1>
  <InvoiceAmount>890.03</InvoiceAmount>
  <VendorCity>New York</VendorCity>
  <VendorId>GEC0001</VendorId>
  <VendorName1>GE Capital</VendorName1>
  <VendorState>NY</VendorState>
  <VendorStreet1>Abbey Road 69</VendorStreet1>
  <VendorZip>Zip1</VendorZip>
  <EcmDocumentId />
  <DocumentLink>d3351e6b-d44c-4b39-9e34-a8e80134000c</DocumentLink>
  <ErpPoType></ErpPoType>
  <ScanDate>5/22/2018 12:00:00 AM</ScanDate>
  <SubTotal>752.97</SubTotal>
  <Urn>b86a703b-58f9-47da-83cb-a8e80133d466</Urn>
  <IpaInvalidReasonCode></IpaInvalidReasonCode>
  <IpaInvalidReasonRule></IpaInvalidReasonRule>
  <IpaOrganizationName />
  <IpaOrganizationId />
  <PaymentComments />
  <PaymentMethod></PaymentMethod>
  <ImageExtension>.pdf</ImageExtension>
  <ImageBase64>
				<embedded image string>
  <LineItem>
    <Category></Category>
    <Description></Description>
    <Discount>0</Discount>
    <LineType>Item</LineType>
    <MaterialNumber></MaterialNumber>
    <PoNumber></PoNumber>
    <Quantity>1</Quantity>
    <Total>890.03</Total>
    <UnitPrice>890.03</UnitPrice>
    <UnitOfMeasure></UnitOfMeasure>
    <UnitOfQuantity>1</UnitOfQuantity>
    <TaxAmount>0</TaxAmount>
    <TaxRate>0</TaxRate>
	<LineNumber>1</LineNumber>
    <ChargeCode />
    <ChargeCodeId />
    <CompanyCode />
    <ErpPoType />
    <MaterialGroup />
    <Plant />
    <PoLineNumber />
    <Puom />
    <QtyPuom></QtyPuom>
    <TaxableAmount></TaxableAmount>
    <TaxCode></TaxCode>
    <Activity />
    <BusinessArea />
    <CostCenter />
    <DbCrIndicator />
    <InternalOrder />
    <Network />
    <ProfitCenter />
    <SalesOrder />
    <SalesOrderItem />
    <TaxJurCode></TaxJurCode>
    <WbsElem />
    <GlAccount>002-005</GlAccount>
    <GlSegment segmentNumber="1" name="Segment1">002</GlSegment>
    <GlSegment segmentNumber="2" name="Segment2">005</GlSegment>
    <ConditionCount />
    <ConditionStepNo />
    <ConditionType />
    <FreightVendor />
    <GrDocItem></GrDocItem>
    <GrDocNo></GrDocNo>
    <GrDocYear />
    <SheetItem />
    <SheetNo />
    <IpaBusinessUnit />
    <IpaLineType />
  </LineItem>
</Invoice>

If you create one or more additional custom fields, these fields are Active in the Field Settings, and you are using the Agnostic ERP Connector, then these fields are exported automatically as a separate element, based on the field name, at the invoice header level.