Customer invoice

Description

The document serves as a description of the document format and data in which Extend Commerce is able to export customer invoice data.

Target audience

The suggested target audience of this document is IT staff working with system integrations. Basic understanding of XML is assumed.

Purpose

he document serves as a description of the document format and data in which Lxir is able to export customer invoice data

Document encoding

Document will be encoded using UTF-8. 

Creation of message

A scheduled service (Lxir XTS Service) sends the message containing invoices matching the following prerequisites:

1)      Invoice status is Invoice sent OR Prepaid

2)      Exported = false


A number of options exist regarding the physical transmission of the actual file to the receiving system. This is agreed for each setup.

Prerequisites

Export of changes to an invoice is not possible. Once exported, it cannot be exported again.


The export of an LxirOrderInvoice message does not mean that an LxirOrderInvoiceResponse message will have to be received containing all the invoices in the original LxirOrderInvoice message. Payments can occur at any time, any amount etc.


Invoices are always created/started from the order handling system.


Products and customer data sent in the LxirOrderInvoice export does not have to be present in the receiving system.



Specification

LxirOrderInvoice

XMLStructure

LxirOrderInvoice (1)

LxirOrderInvoice\OrderInvoice (1-∞)

Attribute

Code

Mand.

Description

Number


Y

Invoice number

OrderNumber


N


Ordernumber if CustomerInvoiceType = OrderDebit, alt. receivingNumber in case CustomerInvoiceType = ReturnOrderCredit. Others -> attribute are not created.

CreateDate


Y

Time when the message was created (YY-MM-DD hh: mm)

InvoiceDate


Y

Time when the invoice was created (YY-MM-DD hh: mm)

DueDate


Y

Due date (YY-MM-DD hh: mm)

PaymentTermsNoOfDays


N

Number of payment days on the invoice, for example 30 days. DueDate-Create Date.

OrderDate


N

Time when the order (OrderDate) all. Receiving (ReceivingCreateDate)

was created (YY-MM-DD hh: mm). If order / reception is missing -> Attributes are not created.

PaymentType


N

1 = Invoice, 2 = Autogiro, 4 = Advance Payment, 8 = Factoring, 16 = Cash, 32 = Manual Autogiro (Load Sheet), 64 = Credit Card, 256 Invoice Me, 516 COD

OCRNumber


N

OCR/(KID) no

ShippingMark


N

ShippingMark order header

OrderNumberExternal


N

External reference, mandatory for card payment

SalesAccount


N

Sales account

Text 1


N

Example: Payment info on normal invoice

Text 2


N

Example: Payment info for sold invoice

Text 3


N

Example: ”Invoice is prepaid”

Number1
N
Number2
N
Number3
N

InvoiceAmount


Y

Invoice amount

FreightAmount


Y

Freight amount

VatAmount


Y

Vat amount

InvoiceAmountTotal


Y

Total amount (invoice amount + shipping fee + VAT amount)

Currency

ISO 4217

N

Currency

BaseCurrency

ISO 4217

N

Client base currency

ExchangeRate


N

Exchange rate based on Base Currency

CurrencyDate


N

Currency date

InvoiceAmountBaseCurrency


N

Invoice sum in base currency

FreightAmountBaseCurrency


N

Shipping amount in base currency

VatAmountBaseCurrency


N

VAT amount in base currency

InvoiceAmountTotalBaseCurrency


N

Total amount (invoice amount + shipping amount + VAT amount) in base currency

YourReference


N

Your reference

OurReference


N

Our reference

TransportMode


N

Mode of transportation

SupplierAgreementNumber


N

Supplier agreement no

AuthorizationNumber


N


SupplierAgreementName


N

Supplier agreement name

RoundingAmountBaseCurrency


Y


GLN


N

Global Location Number, tClient.GLN

CustomerInvoiceType


Y

Invoice Type, Card Name.

Valid values:
OD = Order Debet (invoicing of order)

ROC = Return Order Credit (credit invoice based on return order)

CD = Custom Debit (manual invoice)

CC = Custom Credit (manual credit invoice)

ROD = Return Order Debit (Invoice based on return orders.

Notes


N

Notes invoice

Reference


N

Reference invoice

OrderNotes
NOrder notes


LxirOrderInvoice\OrderInvoice\Customer (1)

Attribute

Code

Mand.

Description

Type

Number


Y

Customer no

50

Name


Y

Customer name

180

LastName


N

Surname

180

Phone


N

Telephone no

50

Fax


N

Fax no

50

Email


N

tOrder.Email


100

BankAccount


N

Bank account number

50

OrganizationNumber


N

Corporate no

50

VatNumber


N

VAT no

50

Salesman


N

Salesman

140

PayingCustomerNumber


N

Paying customer no

50

CustomerFinancialCategoryExternalId


N

External ID, Financial category on customer

100

AgreementNumber


N

Contract number customer

100


LxirOrderInvoice\OrderInvoice\Customer\InvoiceAddress(1)

Attribute

Code

Man

Description

Comment

Type

Name


J

Billing Name


90

Address1


J

Invoice Address 1


60

Address2


N

Invoice Address 2


60

Address3


N

Invoice Address 3


60

PostalCode


J

Postal code


20

City


J

City


40

State


N

State


40

Country

Enligt ISO

J

Country

If SE, then the invoice template must be in Swedish in other cases, English invoice template is used.

4

EAN


N

EAN code


50


LxirOrderInvoice\OrderInvoice\Customer\DeliveryAddress(0-1)


Data is read from different locations depending on customerInvoiceType:

1)      OrderDebit: tOrder delivery address, exception: EAN is picked from tCustomer

2)      ReturnOrderCredit: Sender addresses, exception: EAN is picked from tCustomer

3)      Others: No addresses at all printed! (* see below)     


Attribute

Code

Mand.

Description

Type

Name


J*

Shipping name

90

Address1


J*

Delivery name 1

60

Address2


N

Delivery adress 2

60

Address3


N

Delivery adress 3

60

PostalCode


J*

Zip code

20

City


J*

City

40

State


N

State

40

Country

Enligt ISO

J*

Country

4

EAN


N

EAN code

50


LxirOrderInvoice\OrderInvoice\Agent(0-1)

Attribute

Code

Mand.

Description

Type

Number


Y

Agent no

50

Name


J

Agent name

180

ContactName


N

Contact name

180

Phone


N

Telephone no

50

Fax


N

Fax no

50

Email


N

E-mail


100

AgentType


N

Agent type

50

SalesPlace


N

Point of sale

50

OrganizationNumber


N

Corporate

50

Chain


N

Chain of sales

140

LxirOrderInvoice\OrderInvoice\Agent\Address (1)

Attribute

Code

Man

Description

Comment

Type

Address1


N

Address 1


60

Address2


N

Address 2


60

Address3


N

Address 3


60

PostalCode


N

Postal Code


20

City


N

City


40

State


N

State


40

Country

Enligt ISO

N

Country


4

LxirOrderInvoice\OrderInvoice\OrderInvoiceRows (1)

LxirOrderInvoice\OrderInvoice\OrderInvoiceRows\OrderInvoiceRow (1-∞)

Attribute

Code

Mand.

Description

Type

Position


Y

Row position on the invoice


SubPosition


Y

Subposition to line position


Quantity


Y

Ordered quantity


Price


Y

Price


Vat


Y

VAT in percentage


ProductUnit


Y

Product unit

50

SalesAccount


N

Optional account for recipients

4

VatAccount


N

VAT Account for the row


IsFreight


Y

"True" if it's shipping product, otherwise "false"


ListPrice


N

List price (ie price without any discount). Only printed if value in ActionMark on orderRow can be interpreted as a decimal point with decimal decimal separator (32.00 eg)


PickDate


N

Pick-up date for in stock article lines


ExternalOrderRowPosition


N

External order row position. Identifies row identity in eventual external ordering system.


ExternalOrderRowSubPosition


N

External order row subposition. Identififies together with ExternalPosition row identity in eventual external ordering system.


IsRounding


Y

"True" if it is a rounding point, otherwise "false"


CreditedOrderNumber


N

Order number of credited invoice


CreditedInvoiceNumber


N

Invoice number of credited invoice


CreditedPosition


N

row position of credited invoice row


CustomerProductNumber


N

Customer product number

string

ShipmentNumber


N

Shipment no

String(100)

OriginalShipmentNumberReturnedOrderRow


N

Shipping number on original order in case of credit invoice on return order

String(100)

ExternalFreeTextData
NExternalFreeTextData on tExternalOrderRow

800

ProductNotes
NProduct notes
ReklamationPosition
NtCustomerInvoiceRow.ReklamationPositionint
InvoiceRowNotes
NNotes

LxirOrderInvoice\OrderInvoice\OrderInvoiceRows\OrderInvoiceRow\Product (1)

Attribute

Code

Mand.

Description

Type

Number


Y

Product no

40

Name


Y

Product name

80

FinanceCategory


N

Finacial category

20

Cost


Y

Cost


Currency


Y

Currency

3

CommodityCode


N

Commodity code (Customs)

40

Ean


N

EAN no

30

Weight
NProduct weight

Decimal 

TransportWeight
NTransport weight

Decimal

OrderGTIN
NGTIN

LxirOrderInvoice\OrderInvoice\OrderInvoiceRows\OrderInvoiceRow\Product\AvailableBalance (1)

number of units physically broken balance

Attribute

Code

Mand.

Description

Type

OrderedOrderBalance


Y

number of current pending orders


ReservedBalanceOK


Y

number reserved by full physical balance


ReservedBalanceBroken


Y

number reserved for broken physical balance


OrderedReceivingBalanceOK


Y

number of whole units of received number


OrderedReceivingBalanceBroken


Y

number of broken units of received number


PhysicalBalanceOK


Y

number of units physically complete balance


PhysicalBalanceBroken


Y

number of units physically broken balance


BlockedBalanceOK


Y

number of blocked whole units


BlockedBalanceBroken


Y

number of blocked units that are broken


CDBalancePhysical



Y

Number of cross-docking units physically completely


LxirOrderInvoice\OrderInvoice\OrderInvoiceRows\OrderInvoiceRow\Accounting (0-1)

Attribute

Code

Mand.

Description

Type

CostCenter


N

Cost center

100

LxirOrderInvoice\OrderInvoice\OrderInvoiceRows\OrderInvoiceRow\Accounting\ AccountCodeAssignment (3)

Attribute

Code

Man

Description

Comment

Type

Currency

ISO 4217

J

Valuta


3

AccountCode


J

Kontonummer


100

AssignmentType


J

Anger om konteringen avser debet eller kredit,

Credit/Debet


Amount


J

Värdet på konteringen

Max 4 decimaler, minst 2. T.ex. 23,00 eller 45,2312

Decimal

LxirOrderInvoice\OrderInvoice\OrderInvoiceRows\OrderInvoiceRow\AggregatedInvoiceInfo (0-1)

Attribute

Code

Mand.

Description

Type

CustomerNumber


N

Customer no

50

OrderNumber


N

Order no

50

OrderDate


N

Oreder date


ExternalOrderNumber


N

External order no

50

ExpectedDeliveryDate


N

Expected delivery date


ShipmentNumber


N

Shipment no

100

XSD

Document version history

Ver.

Date

Author/change

Comment

PA1

2012-01-30

Björn Johansson

First draft, copied from the old spec, listed with yellow marking updates and marked email that needs to be adjusted before mapping to the visor.

PA2

2012-02-02

Björn Johansson

Added to the need for document fields on the order line.

PA3

2012-03-01

Martin Hagman

Matched code, updated mandatory, has added attributes that are missing in the document. Minor restructuring of the document.

PA4

2012-08-16

Martin Hagman

Updated document as work version for agrol integration

PA5

2012-08-21

Mathias Niebel

Updated the document with the Payment Terms No Of Days field

PA6

2012-09-03

Martin Hagman

Added more fields

PA7

2012-09-05

Martin Hagman

Removed fields that are no longer used with the rebuilding of invoice texts.

PA8

2012-09-05

Martin Hagman

Colored paymentTermsNoOfDays, clarified.

B

2013-02-14

Martin Fransson

Supported and removed the Order Invoice response from this spec to separate specification


2014-06-01

Martin Hagman

Added the Supplier Agreement Name to the output


2014-08-25

Martin Hagman

Added ExternalOrderRowPosition, ExternalOrderRowSubPosition, Ean to output (from. Version 4.5.3.1)


2014-10-02

Martin Hagman

Added new attributes for rounding amount on invoice header and attribute to identify row line at row level


2014-12-02

Muhammad Jawad

New fields for Credited Invoice Number, Credited OrderNumber, Credited Position. Used to point out the source transaction for a credit invoice. The fields are, of course, non-binding


2014-04-01

Muhammad Jawad

Added CustomerProductNumber


2015-06-26

Peter Danielsson

Added element AggregatedInvoiceInfo


2015-09-28

Martin Hagman

Added CustomerInvoiceType, Reference, Notes. Added ShipmentNumber to InvoiceRow
as well as OriginalShipmentNumberReturnedOrderRow.


2022-02-05Zohaib Anees

Added Number1, Number2, Number3 and OrderNotes in OrderInvoice section

Added InvoiceRowNotes,ReklamationPosition, InvoiceRowNotes in OrderInvoiceRow section