UBL (OIOUBL) / EHF field mapping

This table shows how Kofax AP Essentials maps internal fields with UBL (OIOUBL) / EHF.

Kofax AP Essentials internal field name UBL / EHF

For invoices, replace “…” with “/Invoice”

For credit notes, replace “…” with “/CreditNote”

Buyer fields
Name …/AccountingCustomerParty/Party/PartyName/Name
Street …/AccountingCustomerParty/Party/PostalAddress/StreetName
POBox …/AccountingCustomerParty/Party/PostalAddress/AdditionalStreetName
City …/AccountingCustomerParty/Party/PostalAddress/PostBox
CountryCode …/AccountingCustomerParty/Party/PostalAddress/CityName
Supplier fields
Name …/AccountingSupplierParty/Party/PartyName/Name
Street …/AccountingSupplierParty/Party/PostalAddress/StreetName
StreetSupplement …/AccountingSupplierParty/Party/PostalAddress/AdditionalStreetName
City …/AccountingSupplierParty/Party/PostalAddress/PostBox
CountryCode …/AccountingSupplierParty/Party/PostalAddress/CityName
Standard fields
AddressName  
AddressOptionalName  
AddressPostalCity  
AddressPostalCode  
AddressStreet  
Barcode  
BuyerAddressPostalCode …/AccountingCustomerParty/Party/PostalAddress/PostalZone
BuyerContactPersonName …/AccountingCustomerParty/Party/Contact/Name
BuyerContactReference  
BuyerTaxNumber1  
BuyerTaxNumber2  
BuyerVATRegistrationNumber …/AccountingCustomerParty/Party/PartyTaxScheme/CompanyID
ChargeAmount1, ChargeAmount2, ChargeAmount3, ChargeAmount4

Each of the four charge amount fields are mapped by iterating through each .../AllowanceCharge node whose child node, ChargeIndicator, equals true. The field value is then taken from .../AllowanceCharge/Amount.

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 ChargeIndicator nodes with a value of "true", whereas discount amount fields are designated by ChargeIndicator nodes with a value of "false".

DiscountAmount1 , DiscountAmount2, DiscountAmount3, DiscountAmount4

Each of the four discount amount fields are mapped by iterating through each .../AllowanceCharge node whose child node, ChargeIndicator, equals false. The field value is then taken from .../AllowanceCharge/Amount.

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 ChargeIndicator nodes with a value of "true", whereas discount amount fields are designated by ChargeIndicator nodes with a value of "false".

DeliveryCost .../LegalMonetaryTotal/ChargeTotalAmount
DeliveryCostInsurance  
DeliveryCostPackaging  
DeliveryCostPostage  
DeliveryCostToll  
DeliveryDate …/Delivery/ActualDeliveryDate
DeliveryNote  
DeliveryTerms  
EsrAmount  
EsrNumber  
EsrReference  
InvoiceBaselineDate …/IssueDate
InvoiceCredit 0 = Invoice (debit) 1 = Credit Note
InvoiceCurrency …/DocumentCurrencyCode
InvoiceDate …/IssueDate
InvoiceDiscountAmount

.../LegalMonetaryTotal/AllowanceTotalAmount

InvoiceDiscountPercent  
InvoiceDueDate …/PaymentMeans/PaymentDueDate
InvoiceNumber …/ID
InvoiceOrderNumber …/OrderReference/ID
InvoicePostingDate  
InvoiceNetAmount1 .../TaxTotal/TaxSubtotal[1]/TaxableAmount

This field is only available in the XML document type.

InvoiceNetAmount2 .../TaxTotal/TaxSubtotal[2]/TaxableAmount

This field is only available in the XML document type.

InvoiceNetAmount3 .../TaxTotal/TaxSubtotal[3]/TaxableAmount

This field is only available in the XML document type.

InvoiceNetAmount4 .../TaxTotal/TaxSubtotal[4]/TaxableAmount

This field is only available in the XML document type.

InvoiceTaxAmount1

.../TaxTotal/TaxSubtotal[1]/TaxAmount

This field is only available in the XML document type.

InvoiceTaxAmount2

.../TaxTotal/TaxSubtotal[2]/TaxAmount

This field is only available in the XML document type.

InvoiceTaxAmount3

.../TaxTotal/TaxSubtotal[3]/TaxAmount

This field is only available in the XML document type.

InvoiceTaxAmount4

.../TaxTotal/TaxSubtotal[4]/TaxAmount

This field is only available in the XML document type.

InvoiceTaxRate1 .../TaxTotal/TaxSubtotal[1]/TaxCategory/Percent

This field is only available in the XML document type.

InvoiceTaxRate2 .../TaxTotal/TaxSubtotal[2]/TaxCategory/Percent

This field is only available in the XML document type.

InvoiceTaxRate3 .../TaxTotal/TaxSubtotal[3]/TaxCategory/Percent

This field is only available in the XML document type.

InvoiceTaxRate4 .../TaxTotal/TaxSubtotal[4]/TaxCategory/Percent

This field is only available in the XML document type.

InvoiceTotalVATAmount …/TaxTotal/TaxAmount
InvoiceTotalVatExcludedAmount …/LegalMonetaryTotal/LineExtensionAmount
InvoiceTotalVatIncludedAmount …/LegalMonetaryTotal/PayableAmount
InvoiceTotalVatIncludedAmount Spelled  
InvoiceTotalVatRatePercent …/TaxTotal/TaxSubtotal/TaxCategory/Percent Only takes the value from the section in which the value of …/TaxTotal/TaxSubtotal/TaxCategory/ID is  equal to "StandardRated".
InvoicingPeriodEnd  
InvoicingPeriodStart  
PaymentReferenceNumber …/PaymentMeans/

The value for this field is derived from the combination of these fields:

+ PaymentMeans/PaymentID

< PaymentMeans/InstructionID

+ PaymentMeans/AccountID

<

This XSL snippet is used to extract the date and combine the fields in connection with invoices. If any of the fields are missing, the field value is left empty:

<xsl:template match="/">

<xsl:for-each select="/*[local-name()='Invoice']/*[local-name()='PaymentMeans']">

<xsl:if test="*[local-name()='PaymentID'] !='' and *[local-name()='InstructionID'] !='' and *[local-name()='CreditAccount']/*[local-name()='AccountID'] !='' ">+<xsl:value-of select="*[local-name()='PaymentID']"/><xsl:text disable-output-escaping="yes"><![CDATA[<</xsl:text><xsl:value-of select="*[local-name()='InstructionID']"/>+<xsl:value-of select="*[local-name()='CreditAccount']/*[local-name()='AccountID']"/><xsl:text disable-output-escaping="yes"><![CDATA[<</xsl:text></xsl:if>

</xsl:for-each>

</xsl:template>

The same XSL snippet is used to extract the field value for credit notes except that "Invoice" is changed to "CreditNote".

PaymentTerms …/PaymentTerms/ID
PaymentTermsInterest …/PaymentTerms/PenaltySurchargePercent
PaymentType …/PaymentMeans/PaymentChannelCode

If the node does not exist, the value is taken from this alternate location:

…/PaymentMeans/PaymentMeansCode

SupplierAccountNumber1 …/PaymentMeans/PayeeFinancialAccount/ID

If the node does not exist, the value is taken from this alternate location:

…/PaymentMeans/CreditAccount/AccountID

SupplierAccountNumber2  
SupplierAccountNumber3  
SupplierAccountNumber4  
SupplierAddressPostalCode …/AccountingSupplierParty/Party/PostalAddress/PostalZone
SupplierBankClearingNumber  
SupplierBankCodeNumber1  
SupplierBankCodeNumber2  
SupplierBankCodeNUmber3  
SupplierBankCodeNumber4  
SupplierIBAN1  
SupplierIBAN2  
SupplierIBAN3  
SupplierIBAN4  
SupplierTaxNumber1  
SupplierTaxNumber2  
SupplierVATRegistrationNumber …/AccountingSupplierParty/Party/PartyTaxScheme/CompanyID
Line-item fields
LIT_ArticleIdentifier …/InvoiceLine/Item/SellersItemIdentification/ID
LIT_ArticleName …/InvoiceLine/Item/Name
LIT_DeliveredQuantity …/InvoiceLine/InvoicedQuantity
LIT_DeliveredQuantityUnitCode …/InvoiceLine/InvoicedQuantity/@unitCode
LIT_DiscountAmount  
LIT_DiscountPercent  
LIT_OrderNumber …/InvoiceLine/OrderLineReference/OrderReference/ID
LIT_RowIdentifier …/InvoiceLine/ID
LIT_UnitPriceAmount …/InvoiceLine/Price/PriceAmount
LIT_VatAmount …/InvoiceLine/TaxTotal/TaxAmount
LIT_VatExcludedAmount …/InvoiceLine/LineExtensionAmount
LIT_VatIncludedAmount  
LIT_VatRate …/InvoiceLine/TaxTotal/TaxSubtotal/TaxCategory/Percent
Attachment fields
ID …/ID
FileName  
EmbeddedValue …/Attachment/EmbeddedDocumenttBinaryObject
EmbeddedInfo  
DataURI …/Attachment/ExternalReference/URI
SchemeURI  
DataType …/DocumentTypeCode
LinkType  
AdditionalInfo …/Attachment/EmbeddedDocumentBinaryObject/@mimeCode

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.