ESXML field mapping

This table shows how Kofax AP Essentials maps internal fields with ESXML.

Kofax AP Essentials internal field name ESXML
Buyer fields
CorporateGroupNumber /invoiceFile/invoice/buyerParty/buyerAddress/internalReference
Name /invoiceFile/invoice/buyerParty/buyerAddress/addressName
Street /invoiceFile/invoice/buyerParty/buyerAddress/streetAddress
City /invoiceFile/invoice/buyerParty/buyerAddress/cityAddress
CountryCode /invoiceFile/invoice/buyerParty/buyerAddress/countryId
DeliveryAddressLocationId /invoiceFile/invoice/deliveryAddress/location/locationId
TelephoneNumber /invoiceFile/invoice/buyerParty/buyerAddress/contact/phone
FaxNumber /invoiceFile/invoice/buyerParty/buyerAddress/contact/fax
Email /invoiceFile/invoice/buyerParty/buyerAddress/contact/emailAddress
Supplier fields
Identifier /invoiceFile/invoice/supplierParty/partyIdentifier
Name /invoiceFile/invoice/supplierParty/supplierAddress/addressName or if it is empty /invoiceFile/invoice/supplierParty/legalName
Street /invoiceFile/invoice/supplierParty/supplierAddress/streetAddress
City /invoiceFile/invoice/supplierParty/supplierAddress/cityAddress
CountryCode /invoiceFile/invoice/supplierParty/supplierAddress/countryId
CountryName /invoiceFile/invoice/supplierParty/supplierAddress/country
CorporateGroupNumber /invoiceFile/invoice/supplierParty/supplierAddress/internalReference
TelephoneNumber /invoiceFile/invoice/supplierParty/supplierAddress/contact/phone
FaxNumber /invoiceFile/invoice/supplierParty/supplierAddress/contact/fax
Email /invoiceFile/invoice/supplierParty/supplierAddress/contact/emailAddress
Header fields
AdditionalReference1, AdditionalReference2

/invoiceFile/invoice/attachments/externalReference[1]/id

/invoiceFile/invoice/attachments/externalReference[2]/id

BuyerAddressPostalCode /invoiceFile/invoice/buyerParty/buyerAddress/zipCode
BuyerContactPersonName /invoiceFile/invoice/buyerParty/buyerAddress/contact/contactName
BuyerContactReference /invoiceFile/invoice/customerProfitCentre
BuyerTaxNumber1 /invoiceFile/invoice/buyerParty/organisationNo
BuyerVATRegistrationNumber /invoiceFile/invoice/buyerParty/vatNo
ContractNumber /invoiceFile/invoice/agreementReference/referenceNumber
DeliveryAddressName /invoiceFile/invoice/deliveryAddress/addressName
DeliveryAddressStreet /invoiceFile/invoice/deliveryAddress/streetAddress
DeliveryAddressCity /invoiceFile/invoice/deliveryAddress/cityAddress
DeliveryAddressCountry /invoiceFile/invoice/deliveryAddress/country
DeliveryAddressZIP /invoiceFile/invoice/deliveryAddress/zipCode
DeliveryCost /invoiceFile/invoice/invoiceTrailer/totalCharge
DeliveryDate /invoiceFile/invoice/deliveryDate
DeliveryNote /invoiceFile/invoice/deliveryNoteReference/referenceNumber
DeliveryTerms /invoiceFile/invoice/deliveryTerms/deliveryTermsText
InvoiceCredit /invoiceFile/invoice/invoiceTypeId

If =CR then 1, else 0

InvoiceCurrency /invoiceFile/invoice/invoiceCurrencyCode
InvoiceDate /invoiceFile/invoice/invoiceDate
InvoiceDiscountAmount /invoiceFile/invoice/invoiceTrailer/totalAllowance
ChargeAmount1, ChargeAmount2, ChargeAmount3, ChargeAmount4

Each of the four charge amount fields are mapped by iterating through each invoiceFile/invoice/allowanceAndCharge node whose child node, alcType, equals C. The field value is then taken from /invoiceFile/invoice/allowanceAndCharge/alcAmount.

The first matching node is mapped to ChargeAmount1. The second matching node is mapped to ChargeAmount2 and so on.

Charge amount fields are designated by alcType nodes with a value of "C", whereas discount amount fields are designated by alcType nodes with a value of "A".

DiscountAmount1, DiscountAmount2, DiscountAmount3, DiscountAmount4

Each of the four discount amount fields are mapped by iterating through each invoiceFile/invoice/allowanceAndCharge node whose child node, alcType, equals A. The field value is then taken from /invoiceFile/invoice/allowanceAndCharge/alcAmount.

The first matching node is mapped to DiscountAmount1. The second matching node is mapped to DiscountAmount2 and so on.

Charge amount fields are designated by alcType nodes with a value of "C", whereas discount amount fields are designated by alcType nodes with a value of "A".

InvoiceDueDate /invoiceFile/invoice/dueDate
InvoiceNumber /invoiceFile/invoice/invoiceId
InvoiceObject /invoiceFile/invoice/invoiceObject
InvoiceOrderNumber /invoiceFile/invoice/customersOrder
InvoiceTaxAmount1, InvoiceTaxAmount2, InvoiceTaxAmount3, InvoiceTaxAmount4

/invoiceFile/invoice/invoiceTrailer/invoiceVat[1]/vatAmount

/invoiceFile/invoice/invoiceTrailer/invoiceVat[2]/vatAmount

/invoiceFile/invoice/invoiceTrailer/invoiceVat[3]/vatAmount

/invoiceFile/invoice/invoiceTrailer/invoiceVat[4]/vatAmount

InvoiceTaxRate1, InvoiceTaxRate2, InvoiceTaxRate3, InvoiceTaxRate4

/invoiceFile/invoice/invoiceTrailer/invoiceVat[1]/vatPercentage

/invoiceFile/invoice/invoiceTrailer/invoiceVat[2]/vatPercentage

/invoiceFile/invoice/invoiceTrailer/invoiceVat[3]/vatPercentage

/invoiceFile/invoice/invoiceTrailer/invoiceVat[4]/vatPercentage

InvoiceNetAmount1, InvoiceNetAmount2, InvoiceNetAmount3, InvoiceNetAmount4

/invoiceFile/invoice/invoiceTrailer/invoiceVat[1]/taxableAmount

/invoiceFile/invoice/invoiceTrailer/invoiceVat[2]/taxableAmount

/invoiceFile/invoice/invoiceTrailer/invoiceVat[3]/taxableAmount

/invoiceFile/invoice/invoiceTrailer/invoiceVat[4]/taxableAmount

InvoiceTaxCode1, InvoiceTaxCode2, InvoiceTaxCode3, InvoiceTaxCode4

/invoiceFile/invoice/invoiceTrailer/invoiceVat[1]/taxTypeCode

/invoiceFile/invoice/invoiceTrailer/invoiceVat[2]/taxTypeCode

/invoiceFile/invoice/invoiceTrailer/invoiceVat[3]/taxTypeCode

/invoiceFile/invoice/invoiceTrailer/invoiceVat[4]/taxTypeCode

InvoiceTaxDescription1, InvoiceTaxDescription2, InvoiceTaxDescription3, InvoiceTaxDescription4

/invoiceFile/invoice/invoiceTrailer/invoiceVat[1]/lawText

/invoiceFile/invoice/invoiceTrailer/invoiceVat[2]/lawText

/invoiceFile/invoice/invoiceTrailer/invoiceVat[3]/lawText

/invoiceFile/invoice/invoiceTrailer/invoiceVat[4]/lawText

InvoiceTotalVATAmount /invoiceFile/invoice/invoiceTrailer/invoiceVatTotalAmount
InvoiceTotalVatExcludedAmount /invoiceFile/invoice/invoiceTrailer/taxableAmount
InvoiceTotalVatIncludedAmount /invoiceFile/invoice/invoiceTrailer/invoiceTotalAmount
InvoiceTotalVatRatePercent /invoiceFile/invoice/invoiceTrailer/invoiceVat/vatPercentage
InvoicingPeriodEnd /invoiceFile/invoice/invoicePeriodTo
InvoicingPeriodStart /invoiceFile/invoice/invoicePeriodFrom
PaymentReferenceNumber
<xsl:template match="/">
	<xsl:choose>
			<xsl:when test="string-length(/invoiceFile/invoice/paymentMeans[paymentMeansType='DK_FIK']/accountNo/text())>0">    <!-- Danish GiroStreng -->
				<xsl:text>+</xsl:text>
				<xsl:value-of select="/invoiceFile/invoice/paymentMeans[paymentMeansType='DK_FIK']/paymentMeansSubType"/>
				<xsl:text>&lt;</xsl:text>
				<xsl:value-of select="/invoiceFile/invoice/paymentMeans[paymentMeansType='DK_FIK']/paymentRef"/>
				<xsl:text>+</xsl:text>
				<xsl:value-of select="/invoiceFile/invoice/paymentMeans[paymentMeansType='DK_FIK']/accountNo"/>
				<xsl:text>&lt;</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="/invoiceFile/invoice/paymentMeans[1]/paymentRef"/>      <!-- Default - the first listed paymentRef -->
			</xsl:otherwise>
		</xsl:choose>
</xsl:template>
PaymentTerms /invoiceFile/invoice/paymentTerms
PaymentTermsInterest /invoiceFile/invoice/delayTerms/penaltyInterestRate
ProjectNumber /invoiceFile/invoice/projectReference
SupplierAccountNumber2 /invoiceFile/invoice/paymentMeans[2]/accountNo
SupplierAccountNumber3 /invoiceFile/invoice/paymentMeans[3]/accountNo
SupplierAccountNumber4 /invoiceFile/invoice/paymentMeans[4]/accountNo
SupplierAddressPostalCode /invoiceFile/invoice/supplierParty/supplierAddress/zipCode
SupplierBankCodeNumber1 /invoiceFile/invoice/supplierParty/financialInfo/swiftCode
SupplierBankDetails1

If the first instance (if any) of...

/invoiceFile/invoice/paymentMeans/paymentMeansType" is = BANK

...then SupplierBankDetails1 is set to the value of:

/invoiceFile/invoice/paymentMeans/institutionName

SupplierTaxNumber1 /invoiceFile/invoice/supplierParty/organisationNo
SupplierVATRegistrationNumber /invoiceFile/invoice/supplierParty/vatNo
Line-item fields
LIT_ArticleIdentifier /invoiceFile/invoice/invoiceLine/supplierArticleId
LIT_ArticleManufactureDate /invoiceFile/invoice/invoiceLine[2]/itemInstance/manufactureDate
LIT_ArticleName /invoiceFile/invoice/invoiceLine/articleDescription
LIT_ArticleRegNo /invoiceFile/invoice/invoiceLine[2]/itemInstance/registrationNo
LIT_ArticleSerialNo /invoiceFile/invoice/invoiceLine[2]/itemInstance/serialNo
LIT_ArticleTraceNo /invoiceFile/invoice/invoiceLine[2]/itemInstance/productTraceNo
LIT_DeliveryDate1, LIT_DeliveryDate2

LIT_DeliveryDate1 is set to:

/invoiceFile/invoice/invoiceLine[1]/deliveryDate

Alternatively, LIT_DeliveryDate1 is set to:

/invoiceFile/invoice/invoiceLine[1]/invoicePeriodFrom

...and LIT_DeliveryDate2 is set to:

/invoiceFile/invoice/invoiceLine[1]/invoicePeriodTo

LIT_DeliveryNote /invoiceFile/invoice/invoiceLine[1]/deliveryNoteReference
LIT_DeliveredQuantity /invoiceFile/invoice/invoiceLine/invoiceQuantity/quantity
LIT_DeliveredQuantityUnitCode /invoiceFile/invoice/invoiceLine/invoiceQuantity/edifactUnit
LIT_DiscountAmount If allowanceAndCharge/alcType = A, allowanceAndCharge/alcType/alcAmountis used. Otherwise, /invoiceFile/invoice/invoiceLine/discountAmount is used.
LIT_DiscountPercent

If allowanceAndCharge/alcType = A, allowanceAndCharge/alcType/alcPercentage is used. Otherwise, /invoiceFile/invoice/invoiceLine/discountPercent is used.

LIT_VATDescription /invoiceFile/invoice/invoiceLine[1]/vatInfo/lawText
LIT_OrderNumber /invoiceFile/invoice/invoiceLine/orderReference/referenceNumber
LIT_RowIdentifier /invoiceFile/invoice/invoiceLine/invoiceLineId
LIT_UnitPriceAmount /invoiceFile/invoice/invoiceLine/price/contractPrice
LIT_UnitPriceBasis /invoiceFile/invoice/invoiceLine[1]/price/unitPriceBasis
LIT_UniqueArticleNumber /invoiceFile/invoice/invoiceLine[1]/articleGTIN
LIT_VatAmount /invoiceFile/invoice/invoiceLine/vatInfo/taxAmount
LIT_VATCode /invoiceFile/invoice/invoiceLine[1]/vatInfo/taxTypeCode
LIT_VatExcludedAmount /invoiceFile/invoice/invoiceLine/invoiceLineAmount
LIT_VatRate /invoiceFile/invoice/invoiceLine/vatInfo/taxPercentage
Attachment fields
ID /invoiceFile/invoice/attachments/attachment/objectId
FileName /invoiceFile/invoice/attachments/attachment/encodedData/filename
EmbeddedValue /invoiceFile/invoice/attachments/attachment/encodedData
DataType /invoiceFile/invoice/attachments/attachment/encodedData/format
AdditionalInfo /invoiceFile/invoice/attachments/attachment/encodedData/mimeCode
Invoice note field
InvoiceNote /invoiceFile/invoice/invoiceFreeText

Field mappings from incoming XML formats only map to standard fields. They do not map to custom fields. Consider using the XML document type if your current document type does not support the field mappings you require.