UBL-2.1-PEPPOL-Invoice-In

The data mapping and sample payload for UBL-2.1-PEPPOL-Invoice-In message definition are outlined in this section.

You must create the following list of domain value maps before you can exchange UBL PEPPOL messages. Populate each domain value map with values from the code lists.

DVM Name Code Lists

CURRENCY_CODE

https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/

INVOICE_TYPE_CODE

https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-inv/

INVOICE_TRX_TYPE_CODE

https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-inv/

EAS_CODE

https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/

ICD_CODE

https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/

CHARGE_REASON_CODE

https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7161/

UOM_CODE

https://docs.peppol.eu/poacc/billing/3.0/codelist/UNECERec20/

COUNTRY_CODE

https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO3166/

PAYMENT_METHOD

https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4461/

TAX_CATEGORY_CODE

https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/

PAYMENT_TERMS

Data Mapping

This diagram shows the structure of the inbound payload that's received from the inbound UBL-2.1-PEPPOL-Invoice-In message.

Structure of the inbound payload

This diagram shows the structure of the payload that's passed to the application server for the UBL-2.1-PEPPOL-Invoice-In message.

Structure of payload passed to application server

This table shows where the data received in the predefined UBL-2.1-PEPPOL-Invoice-In message definition is mapped to in the application service.

Source: UBL-2.1-PEPPOL-Invoice-In

Target: InvoiceInterfaceService

../ProcessingConfiguration/PartnerKey1

VendorId

../ProcessingConfiguration/PartnerKey2

VendorSiteId

../ProcessingConfiguration/ProcActionCode

B2BSiteCode

../ProcessingConfiguration/SoldToLE

LegalEntityId

AccountingCustomerParty/Party/PartyLegalEntity/RegistrationName

LegalEntityName

AccountingSupplierParty/Party/PartyName/Name

VendorName

AccountingSupplierParty/SellerContact/ElectronicMail

VendorEmailAddress

AdditionalDocumentReference[DocumentType = '130']/ID

ExternalDocumentReference

AllowanceCharge [ where ChargeIndicator = 'true' and Amount != '']

InvoiceInterfaceLine

AllowanceChargeReason

Description

AllowanceChargeReasonCode

LineTypeLookupCode
Note: If a value is provided for AllowanceChargeReasonCode, then the DVM CHARGE_REASON_CODE is used to derive this value otherwise if there is no value provided for AllowanceChargeReasonCode then LineTypeLookupCode is then set to MISCELLANEOUS.

Amount

Amount:

If InvoiceTypeLookupCode = STANDARD, this value is set to the Amount received in the payload.

If InvoiceTypeLookupCode = CREDIT and the Amount received in the payload is negative, then this value is set to that amount, otherwise if the Amount in the payload is positive, this value is set to negative.

DocumentCurrencyCode

InvoiceCurrencyCode

ID

InvoiceNumber

InvoicedQuantity

InvoicedQuantity

Note: If InvoiceTypeLookupCode = STANDARD then InvoicedQuantity is mapped.If InvoiceTypeLookupCode = CREDIT and the InvoicedQuantity received in the payload is negative, then this value is set to that, otherwise if the InvoicedQuantity in the payload is positive, this value is set to the negative of it.

InvoicedQuantity/@unitCode

UnitOfMeasLookupCode

Note: DVM UOM_CODE associated with this field.
InvoiceLine InvoiceInterfaceLine

An InvoiceInterfaceLine[LineTypeLookupCode = 'ITEM'] is created for each InvoiceLine.

InvoiceTypeCode

InvoiceTypeLookupCode

Note: If LegalMonetaryTotal/PayableAmount is a negative then this value is set to CREDIT.If InvoiceTypeCode = 'CREDIT' or 'Credit' or '381' then this value is set to CREDIT.If InvoiceTypeCode = 'STANDARD' or '380' or '388' then this value is set to STANDARD.If InvoiceTypeCode does not have a value then the value for InvoiceTypeLookupCode is derived from the DVM INVOICE_TYPE_CODE .

IssueDate

InvoiceDate

Item/Name

ItemDescription

Item/SellersItemIdentification/ID

VendorItemNumber

LegalMonetaryTotal/PayableAmount

InvoiceAmount:

If InvoiceTypeLookupCode = STANDARD then InvoiceAmount is set to LegalMonetaryTotal/PayableAmount. If InvoiceTypeLookupCode = CREDIT then InvoiceAmount is set to LegalMonetaryTotal/PayableAmount expressed as a negative number.

LineExtensionAmount

Amount:

If InvoiceTypeLookupCode = STANDARD then LineExtensionAmount is mapped.

If InvoiceTypeLookupCode = CREDIT and LineExtensionAmount is positive then it is mapped as negative.

Note

Description

Note

Description

OrderLineReference[1]/LineID

POLineNumber

OrderLineReference[1]/OrderReference/ID

PONumber

OrderReference/ID

PONumber:

If OrderReference/ID is provided it is mapped or if OrderReference/ID is blank then InvoiceLine[1]/OrderLineReference[1]/OrderReference/cbc:ID is mapped.

PaymentTerms/Note

TermsName

Note: By default, this value is derived using the DVM PAYMENT_TERMS. If you don't want to map PaymentTerms, update the variable mapPaymentTerms in the XSL file.

Price/PriceAmount

UnitPrice

TaxTotal/TaxAmount

ControlAmount:

If the InvoiceTypeLookupCode = STANDARD then ControlAmount is set as the sum of the TaxAmounts. If the InvoiceTypeLookupCode = CREDIT then the ControlAmount is set to the sum of the TaxAmounts expressed as a negative number.

Source:

Set to B2B XML INVOICE.

B2BProgramName:

This value is set to AP_INV_B2B_SOA.

LineGroupNumber:

This is set to the instance of InvoiceLine.

LineTypeLookupCode:

When InvoiceInterfaceLine represents the InvoiceLine, LineTypeLookupCode is set to ITEM.

Sample Payload

Here is a sample of the payload that's received for UBL-2.1-PEPPOL-Invoice-In message.
<?xml version="1.0" encoding="UTF-8"?>

		<ubl:Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cmk="http://xmlns.oracle.com/apps/scm/cmk" xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
			<cbc:UBLVersionID>2.1</cbc:UBLVersionID>
			<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
			<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
			<cbc:ID>2810005248</cbc:ID>
			<cbc:IssueDate>2020-09-07</cbc:IssueDate>
			<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>								<!-- INVOICE_TYPE_CODE -->
			<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>					<!-- CURRENCY_CODE -->
			<cac:OrderReference>
				<cbc:ID>PO123456789</cbc:ID>
			</cac:OrderReference>
			<cac:AccountingSupplierParty>
				<cac:Party>
					<cbc:EndpointID schemeID="NL">NL001830041B01</cbc:EndpointID>
					<cac:PartyIdentification>
						<cbc:ID schemeID="NL">NL001830041B01</cbc:ID>
					</cac:PartyIdentification>
					<cac:PartyName>
						<cbc:Name>MyLegal Name</cbc:Name>
					</cac:PartyName>
					<cac:PostalAddress>
						<cbc:StreetName>123 Main Steet</cbc:StreetName>
						<cbc:AdditionalStreetName>Line 2</cbc:AdditionalStreetName>
						<cbc:CityName>AnyCity</cbc:CityName>
						<cbc:PostalZone>1082 MS</cbc:PostalZone>
						<cbc:CountrySubentity>Region 2</cbc:CountrySubentity>
						<cac:AddressLine>
							<cbc:Line>123 Main Steet</cbc:Line>
						</cac:AddressLine>
						<cac:Country>
							<cbc:IdentificationCode>NL</cbc:IdentificationCode>
						</cac:Country>
					</cac:PostalAddress>
					<cac:PartyTaxScheme>
						<cbc:CompanyID>NL001830041B01</cbc:CompanyID>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:PartyTaxScheme>
					<cac:PartyLegalEntity>
						<cbc:RegistrationName>MyLegal Name</cbc:RegistrationName>
						<cbc:CompanyID>09036504</cbc:CompanyID>
					</cac:PartyLegalEntity>
				</cac:Party>
			</cac:AccountingSupplierParty>
			<cac:AccountingCustomerParty>
				<cac:Party>
					<cbc:EndpointID schemeID="NL">CustomerTaxRegNumber</cbc:EndpointID>
					<cac:PartyIdentification>
						<cbc:ID schemeID="NL">CustomerTaxRegNumber</cbc:ID>
					</cac:PartyIdentification>
					<cac:PartyName>
						<cbc:Name>BillToPartyName</cbc:Name>
					</cac:PartyName>
					<cac:PostalAddress>
						<cbc:StreetName>Main Street 2</cbc:StreetName>
						<cbc:AdditionalStreetName>Line 2</cbc:AdditionalStreetName>
						<cbc:CityName>MyCity</cbc:CityName>
						<cbc:PostalZone>3526 LA</cbc:PostalZone>
						<cac:AddressLine>
							<cbc:Line>Main Street 2</cbc:Line>
						</cac:AddressLine>
						<cac:Country>
							<cbc:IdentificationCode>NL</cbc:IdentificationCode>
						</cac:Country>
					</cac:PostalAddress>
					<cac:PartyTaxScheme>
						<cbc:CompanyID>CustomerTaxRegNumber</cbc:CompanyID>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:PartyTaxScheme>
					<cac:PartyLegalEntity>
						<cbc:RegistrationName>BillToPartyName</cbc:RegistrationName>
						<cbc:CompanyID schemeID="NL">CustomerTaxRegNumber</cbc:CompanyID>
					</cac:PartyLegalEntity>
				</cac:Party>
			</cac:AccountingCustomerParty>
			<cac:Delivery>
				<cac:DeliveryLocation>
					<cbc:ID schemeID="NL">12345</cbc:ID>
					<cac:Address>
						<cbc:StreetName>Griffioenlaan 2</cbc:StreetName>
						<cbc:AdditionalStreetName>Line 2</cbc:AdditionalStreetName>
						<cbc:CityName>MyCity-ShipTo</cbc:CityName>
						<cbc:PostalZone>3526 LA</cbc:PostalZone>
						<cac:AddressLine>
							<cbc:Line>Griffioenlaan 2</cbc:Line>
						</cac:AddressLine>
						<cac:Country>
							<cbc:IdentificationCode>NL</cbc:IdentificationCode>
						</cac:Country>
					</cac:Address>
				</cac:DeliveryLocation>
			</cac:Delivery>
			<cac:PaymentMeans>
				<cbc:PaymentMeansCode>PO</cbc:PaymentMeansCode>
				<cac:PayeeFinancialAccount>
					<cbc:ID>NL85RABO0112295037</cbc:ID>
				</cac:PayeeFinancialAccount>
			</cac:PaymentMeans>
			<cac:PaymentTerms>
				<cbc:Note>30 days</cbc:Note>									<!-- PAYMENT_TERMS -->
			</cac:PaymentTerms>
			<cac:AllowanceCharge>
				<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
				<cbc:AllowanceChargeReasonCode>FREIGHT</cbc:AllowanceChargeReasonCode>		<!-- CHARGE_REASON_CODE -->
				<cbc:AllowanceChargeReason>FREIGHT</cbc:AllowanceChargeReason>
				<cbc:Amount currencyID="EUR">10.00</cbc:Amount>
				<cac:TaxCategory>
					<cbc:ID>E</cbc:ID>
					<cbc:Percent>0</cbc:Percent>
					<cac:TaxScheme>
						<cbc:ID>VAT</cbc:ID>
					</cac:TaxScheme>
				</cac:TaxCategory>
			</cac:AllowanceCharge>
			<cac:TaxTotal>
				<cbc:TaxAmount currencyID="EUR">420</cbc:TaxAmount>
				<cac:TaxSubtotal>
					<cbc:TaxableAmount currencyID="EUR">5010</cbc:TaxableAmount>
					<cbc:TaxAmount currencyID="EUR">0</cbc:TaxAmount>
					<cac:TaxCategory>
						<cbc:ID>E</cbc:ID>
						<cbc:Percent>0</cbc:Percent>
						<cbc:TaxExemptionReason>Exempt</cbc:TaxExemptionReason>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
				<cac:TaxSubtotal>
					<cbc:TaxableAmount currencyID="EUR">2000</cbc:TaxableAmount>
					<cbc:TaxAmount currencyID="EUR">420</cbc:TaxAmount>
					<cac:TaxCategory>
						<cbc:ID>S</cbc:ID>
						<cbc:Percent>21</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:TaxCategory>
				</cac:TaxSubtotal>
			</cac:TaxTotal>
			<cac:LegalMonetaryTotal>
				<cbc:LineExtensionAmount currencyID="EUR">7000</cbc:LineExtensionAmount>
				<cbc:TaxExclusiveAmount currencyID="EUR">7015</cbc:TaxExclusiveAmount>
				<cbc:TaxInclusiveAmount currencyID="EUR">7435</cbc:TaxInclusiveAmount>
				<cbc:AllowanceTotalAmount currencyID="EUR">0</cbc:AllowanceTotalAmount>
				<cbc:ChargeTotalAmount currencyID="EUR">10</cbc:ChargeTotalAmount>
				<cbc:PayableAmount currencyID="EUR">7435</cbc:PayableAmount>
			</cac:LegalMonetaryTotal>
			<cac:InvoiceLine>
				<cbc:ID>1</cbc:ID>
				<cbc:Note>test line 1</cbc:Note>
				<cbc:InvoicedQuantity unitCode="10">1</cbc:InvoicedQuantity>				<!-- UOM_CODE -->
				<cbc:LineExtensionAmount currencyID="EUR">2000</cbc:LineExtensionAmount>
				<cac:AllowanceCharge>														<!-- Inbound xsl does not map these -->
					<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
					<cbc:AllowanceChargeReasonCode>FREIGHT</cbc:AllowanceChargeReasonCode>	<!-- CHARGE_REASON_CODE -->
					<cbc:AllowanceChargeReason>FREIGHT</cbc:AllowanceChargeReason>
					<cbc:Amount currencyID="EUR">10.00</cbc:Amount>
				</cac:AllowanceCharge>
				<cac:AllowanceCharge>
					<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
					<cbc:AllowanceChargeReasonCode>MISC</cbc:AllowanceChargeReasonCode>		<!-- CHARGE_REASON_CODE -->
					<cbc:AllowanceChargeReason>MISC</cbc:AllowanceChargeReason>
					<cbc:Amount currencyID="EUR">5.00</cbc:Amount>
				</cac:AllowanceCharge>
				<cac:Item>
					<cbc:Description>Item Description</cbc:Description>
					<cbc:Name>Item Description</cbc:Name>
					<cac:SellersItemIdentification>
						<cbc:ID>Item</cbc:ID>
					</cac:SellersItemIdentification>
					<cac:ClassifiedTaxCategory>
						<cbc:ID/>
						<cbc:Percent>21</cbc:Percent>
						<cac:TaxScheme>
							<cbc:ID>VAT</cbc:ID>
						</cac:TaxScheme>
					</cac:ClassifiedTaxCategory>
				</cac:Item>
				<cac:Price>
					<cbc:PriceAmount currencyID="EUR">2000</cbc:PriceAmount>
				</cac:Price>
			</cac:InvoiceLine>
		</ubl:Invoice>