Lucy Salesinvoice - UBL Mapping

Modified on Fri, 27 Mar at 10:34 AM

Below is an overview of the key fields in the Lucy sales module and their corresponding UBL XML elements:


Important Note: The codes in parentheses (BT-X, BG-X) refer to the official Peppol BIS Billing 3.0 specification.



Lucy fieldValuein UBL element (BT/BG)In (parent path)
1Type: salesinvoice 380 <cbc:InvoiceTypeCode> (BT-3)
Type: Creditnote 389<cbc:CreditnoteTypeCode> (BT-3)
2Client<cbc:Name> (BT-45)<cac:PartyName>
<cbc:RegistrationName> (BT-44)<cac:PartyLegalEntity> → <cac:AccountingCustomerParty> (BG-7)
3Adress<cbc:StreetName>, <cbc:CityName>, <cbc:PostalZone> (BT-64, BT-66, BT-67)<cac:PostalAddress> (BG-12)
<cbc:IdentificationCode> (BT-80)<cac:Country>
4VAT-number<cbc:EndpointID> (BT-49)<cac:Party> → <cac:AccountingCustomerParty> (BG-7)
<cbc:ID> (BT-46)<cac:PartyIdentification> → <cac:AccountingCustomerParty> (BG-7)
<cbc:CompanyID> (BT-48)<cac:PartyTaxScheme> → <cac:AccountingCustomerParty> (BG-7)
<cbc:CompanyID> (BT-47)<cac:PartyLegalEntity> → <cac:AccountingCustomerParty> (BG-7)
5E-mailNot in xml-data
6Invoice number<cbc:ID> (BT-18, BT-122)<cac:AdditionalDocumentReference> (BG-24)
7Client referenceElement is only visible in xml when data is filled in during invoice making.<cbc:ID> (BT-13)<cac:OrderReference>
8Payment reference<cbc:PaymentID> (BT-83)<cac:PaymentMeans> (BG-16)
9Invoice date<cbc:IssueDate> (BT-26)
<cbc:TaxPointDate> (BT-7)
10Due date<cbc:DueDate> (BT-9)
11Delivery date
(Appears when selecting certain VAT % like IC goods/ services)
Currently not visible on pdf and not in xml data (pushed through as bug to development)
12Item name<cbc:Note> (BT-127)<cac:InvoiceLine> (BG-25)
<cbc:Name> (BT-153)<cac:Item> (BG-31) → <cac:InvoiceLine> (BG-25)
13Optional description<cbc:Description> (BT-154)<cac:Item> (BG-31) → <cac:InvoiceLine> (BG-25)
14Qty<cbc:BaseQuantity> (BT-149)<cac:Price> (BG-29) → <cac:InvoiceLine> (BG-25)
15Price<cbc:BaseAmount> (BT-148)<cac:AllowanceCharge> → <cac:Price> (BG-29) → <cac:InvoiceLine> (BG-25)
16Discount<cbc:Amount> (BT-147)<cac:AllowanceCharge> → <cac:Price> (BG-29) → <cac:InvoiceLine> (BG-25)
17Total Excl.<cbc:TaxableAmount> (BT-116)<cac:TaxSubtotal> (BG-23) → <cac:TaxTotal>
<cbc:TaxExclusiveAmount> (BT-109)<cac:LegalMonetaryTotal> (BG-22)
<cbc:LineExtensionAmount> (BT-106)<cac:LegalMonetaryTotal> (BG-22)
18VAT<cbc:Percent> (BT-119)<cac:TaxCategory> → <cac:TaxSubtotal> (BG-23) → <cac:TaxTotal>
<cbc:Percent> (BT-152)<cac:ClassifiedTaxCategory> (BG-30) → <cac:Item> (BG-31) → <cac:InvoiceLine> (BG-25)
19Total incl.<cbc:TaxInclusiveAmount> (BT-112)<cac:LegalMonetaryTotal> (BG-22)
<cbc:PayableAmount> (BT-115)<cac:LegalMonetaryTotal> (BG-22)
20Subtotal(17) Total excl.
21VAT<cbc:TaxAmount> (BT-110, BT-111)<cac:TaxTotal>
<cbc:TaxAmount> (BT-117)<cac:TaxSubtotal> (BG-23) → <cac:TaxTotal>
22Total(19) Total incl.
23Additional notes<cbc:Note> (BT-22)
24AttachmentsDocument name<cbc:ID> (BT-18, BT-122)<cac:AdditionalDocumentReference> (BG-24)
Base64 string<cbc:EmbeddedDocumentBinaryObject> (BT-125)<cac:Attachment> → <cac:AdditionalDocumentReference>