Contents

    Importing sales orders into JTL-Wawi via XML

    Your task/initial situation

    With the sales order import, you can import existing sales orders from other applications into JTL-Wawi. These third-party programmes can be, for example, a POS system, a shop system or another ERP system.
    Requirements/Restrictions
    • Your third-party system must be able to export in XML format.

    Importing sales orders

    Attention: Always carry out a database export or a backup before an XML import!
    1. Go to the Sales menu and click Import: Sales orders (*.xml). The dialogue box for Importing sales orders opens.
    1. Click on the  button to select a file.
    1. If you have set up several companies in JTL-Wawi, select the company to which you want to assign the sales order data in the Company drop-down menu. If you have only one company set up, it is selected by default.

    Update existing customer data: Activate this check box to update the existing customer data in JTL-Wawi with the customer data of the imported XML file. Existing customers are identified solely by the customer ID.


    Generate invoices for imported sales orders: Activate this check box so that JTL-Wawi automatically generates the corresponding invoices from the imported sales orders.


    Print invoices immediately: Activate this check box so that JTL-Wawi prints the generated invoices directly. Please note that this can take a very long time, depending on the quantity of the sales orders.


    Do not adjust stock levels: Activate this check box if the imported sales orders should have no effect on the stock levels in JTL-Wawi or if the stock levels of the respective items should not be updated. Imported sales orders are marked as completed without shipment.


    Do not import sales orders with identical external identification IDs: Activate this check box if you have already imported sales orders via XML and do not want to import a sales order twice. This only works if the identification ID has not changed.

    1. After you have selected the XML file and made the desired settings for the import, you can import the sales order data. To do this, click Import sales orders.

    Structure of the XML file

    The XML file(s) that you can import into JTL-Wawi with the help of this function must have a specific structure.

    To better understand this structure, view the OldWawi.xsd file. This file can be found in the JTL-Wawi programme folder under JTL-Software > Import files. This folder is also included in every update package of JTL-Wawi.

    The file extension .xsd stands for XML schema description file, i.e. the XML schema. This file contains the element names and the available attributes of the XML document. This means that a schema file contains the declarations required to create the XML file.

    The top section lists the element names and the associated values. For currencies, for example, the corresponding section looks like this:

    The actual structure begins at line 110 of the XSD file.

    <xs:element name="cWaehrung" type="waehrung" />

    states in the above example of currencies (Währung) that only one of the values listed above can be defined.

    <xs:element name="cSprache" type="sprache" />

    states that a value from the stored definitions must be used for the element “cLanguage” (cSprache) (see lines 55 to 78: “Ger”, “Eng”, etc.).

    <xs:element name="fGesamtsumme" type="xs:decimal" />

    defines an element of the type “decimal”.

    <xs:element name="cBestellNr" type="string30" />

    defines an element of type “String” with a maximum length of 30 characters.

    Note: Be sure to use the correct date format. Use the scheme YYYY-MM-DD.

    When quoting prices, you must use a period as a separator.

    Replace all information in the format YES or NO with the capital letters Y or N.

    Please also note: For the sake of clarity, this sample file in XML format only contains one sales order that is to be imported. As soon as several sales orders are included in the file, the sequence tSalesOrder (tBestellung) must be repeated accordingly within the section tSalesOrders (tBestellungen).

    <tBestellungen>
      <tBestellung>
      ..
      </tBestellung>
      <tBestellung>
      ..
      </tBestellung>
    </tBestellungen>

    Structure example for sales order import

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    	XML Beispieldatei für den Import über Verkauf>Auftragsimport oder über die tXMLBestellimport Tabelle. 
    	
    	Wenn kein Kommentar angegeben ist, ist das Feld Pflicht zum angeben!
    	
    	Felder die gefüllt sein müssen haben einen extra Kommentar!
    	
    	Optionale Felder dürfen NICHT angegeben werden ohne gefüllt zu sein !!!
    -->
    <tBestellungen>
    	<tBestellung cRechnungsNr="" kFirma="1" kBenutzer="1"><!--cRechnungsNr, kFirma und kBenutzer sind Optional-->
    		<cSprache>ger</cSprache><!-- Pflichtfeld, siehe XSD für Werte -->
    		<cWaehrung>EUR</cWaehrung><!-- Pflichtfeld, siehe XSD für Werte -->
    		<fGuthaben>0.00</fGuthaben><!-- Optional -->
    		<fGesamtsumme>0.00</fGesamtsumme><!-- Optional -->
    		<cBestellNr>Test-1</cBestellNr>
    		<cExterneBestellNr/>
    		<cVersandartName>Selbstabholer</cVersandartName>
    		<cVersandInfo/>
    		<dVersandDatum/>
    		<cTracking/>
    		<dLieferDatum/>
    		<cKommentar/>
    		<cBemerkung/>
    		<dErstellt></dErstellt> <!--Optional, wenn nicht angegeben DateTime.Now -->
    		<cZahlungsartName>Bar</cZahlungsartName>
    		<dBezahltDatum/>
    		<fBezahlt>0.00</fBezahlt><!--Optional-->
    		<twarenkorbpos>
    			<cName>Mein Testartikel</cName>
    			<cArtNr>123</cArtNr>
    			<cBarcode/>
    			<cSeriennummer/> <!--Optional-->
    			<cEinheit/>
    			<fPreisEinzelNetto>16.79832</fPreisEinzelNetto>
    			<fPreis>19.99</fPreis> <!--Optional-->
    			<fMwSt>19.00</fMwSt>
    			<fAnzahl>1.00</fAnzahl>
    			<cPosTyp>standard</cPosTyp><!-- Pflichtfeld, siehe XSD für Werte -->
    			<fRabatt>7.00</fRabatt>
    			<kArtikel/><!--Optional-->
    				<twarenkorbposeigenschaft> <!--Artikeleigenschaften,optional -->
    					<cArtNr/>
    					<cBarcode/>
    					<cEigenschaftname/>
    					<cEigenschaftWertName/>
    					<cFreifeldWert/>
    					<fAufpreis/>
    					<kEigenschaft/><!--Optional-->
    					<kEigenschaftWert/><!--Optional-->
    				</twarenkorbposeigenschaft>
    		</twarenkorbpos>
    		<twarenkorbpos>
    			<cName>Selbstabholer</cName>
    			<cArtNr/>
    			<cBarcode/>
    			<cSeriennummer/> <!--Optional-->
    			<cEinheit/>
    			<fPreisEinzelNetto>0.00000</fPreisEinzelNetto>
    			<fPreis>0.00</fPreis><!--Optional-->
    			<fMwSt>19.00</fMwSt>
    			<fAnzahl>1.00</fAnzahl>
    			<cPosTyp>versandkosten</cPosTyp><!-- Pflichtfeld, siehe XSD für Werte -->
    			<fRabatt>0.00</fRabatt>
    		</twarenkorbpos>
    		<tkunde> <!-- Hier kann noch kKunden angegeben werden -->
    			<cKundenNr>1</cKundenNr>
    			<cAnrede>Herr</cAnrede>
    			<cTitel/>
    			<cVorname>Max</cVorname>
    			<cNachname>Mustermann</cNachname>
    			<cFirma/>
    			<cStrasse>Musterstraße 1</cStrasse>
    			<cAdressZusatz/>
    			<cPLZ>12345</cPLZ>
    			<cOrt>Musterstadt</cOrt>
    			<cBundesland>NRW</cBundesland>
    			<cLand>Deutschland</cLand>
    			<cTel>01234 56789</cTel>
    			<cMobil/>
    			<cFax>01234 567890</cFax>
    			<cMail>max.mustermann@musterprovider.de</cMail>
    			<cUSTID/>
    			<cWWW>www.musterseite.de</cWWW>
    			<dErstellt></dErstellt> <!--Optional, wenn nicht angegeben DateTime.Now -->
    		</tkunde>
    		<tlieferadresse>
    			<cAnrede>Herr</cAnrede>
    			<cVorname>Max</cVorname>
    			<cNachname>Mustermann</cNachname>
    			<cTitel/>
    			<cFirma/>
    			<cStrasse>Musterstraße 1</cStrasse>
    			<cAdressZusatz/>
    			<cPLZ>12345</cPLZ>
    			<cOrt>Musterstadt</cOrt>
    			<cBundesland>NRW</cBundesland>
    			<cLand>Deutschland</cLand>
    			<cTel>01234 56789</cTel>
    			<cMobil/>
    			<cFax>01234 567890</cFax>
    			<cMail>max.mustermann@musterprovider.de</cMail>
    			<kLieferadresse/><!--Optional-->
    		</tlieferadresse>
    		<tzahlungsinfo>
    			<cBankName/>
    			<cBLZ/>
    			<cKontoNr/>
    			<cKartenNr/>
    			<dGueltigkeit/>
    			<cCVV/>
    			<cKartenTyp/>
    			<cInhaber/>
    			<cIBAN/>
    			<cBIC/>
    		</tzahlungsinfo>
    	</tBestellung>
    </tBestellungen>

    Download XML file (as zip archive)

    If you are working with JTL-Wawi 1.3 or older, the example looks like this.

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <tBestellungen>
    <tBestellung kFirma="1" cFirma="JTL-Software" cMandant="eB-Standard" cRechnungsNr="">
    <cSprache>ger</cSprache>
    <cWaehrung>EUR</cWaehrung>
    <fGuthaben>0</fGuthaben>
    <fGesamtsumme>18.59</fGesamtsumme>
    <cBestellNr>121</cBestellNr>
    <cExterneBestellNr/>
    <cVersandartName>Selbstabholer</cVersandartName>
    <cVersandInfo/>
    <dVersandDatum/>
    <cTracking/>
    <cLogistiker/>
    <dLieferDatum/>
    <cKommentar/>
    <cBemerkung/>
    <dErstellt>2013-09-25</dErstellt>
    <cZahlungsartName>Bar</cZahlungsartName>
    <dBezahltDatum/>
    <fBezahlt>0.00</fBezahlt>
    <twarenkorbpos>
    <cName>Mein Testartikel</cName>
    <cArtNr>123</cArtNr>
    <cBarcode/>
    <cSeriennummer/>
    <cEinheit/>
    <fPreisEinzelNetto>16.79832</fPreisEinzelNetto>
    <fPreis>19.99</fPreis>
    <fMwSt>19.00</fMwSt>
    <fAnzahl>1.00</fAnzahl>
    <cPosTyp>standard</cPosTyp>
    <fRabatt>7.00</fRabatt>
    </twarenkorbpos>
    <twarenkorbpos>
    <cName>Selbstabholer</cName>
    <cArtNr/>
    <cBarcode/>
    <cSeriennummer/>
    <cEinheit/>
    <fPreisEinzelNetto>0.00000</fPreisEinzelNetto>
    <fPreis>0.00</fPreis>
    <fMwSt>19.00</fMwSt>
    <fAnzahl>1.00</fAnzahl>
    <cPosTyp>versandkosten</cPosTyp>
    <fRabatt>0.00</fRabatt>
    </twarenkorbpos>
    <tkunde>
    <cKundenNr>19</cKundenNr>
    <cAnrede>Frau</cAnrede>
    <cTitel/>
    <cVorname>Maria</cVorname>
    <cNachname>Stammkunde</cNachname>
    <cFirma/>
    <cStrasse>Teststraße 11</cStrasse>
    <cAdressZusatz/>
    <cPLZ>50969</cPLZ>
    <cOrt>Köln</cOrt>
    <cBundesland>NRW</cBundesland>
    <cLand>Deutschland</cLand>
    <cTel>0211 12345</cTel>
    <cMobil/>
    <cFax>0211 54321</cFax>
    <cMail>maria@jtl-software.de</cMail>
    <cUSTID/>
    <cWWW>www.jtl-software.de</cWWW>
    <cNewsletter>78</cNewsletter>
    <dGeburtstag/>
    <fRabatt>0.00</fRabatt>
    <cHerkunft/>
    <dErstellt>2013-08-16</dErstellt>
    </tkunde>
    <tlieferadresse>
    <cAnrede>Frau</cAnrede>
    <cVorname>Maria</cVorname>
    <cNachname>Stammkunde</cNachname>
    <cTitel/>
    <cFirma/>
    <cStrasse>Teststraße 11</cStrasse>
    <cAdressZusatz/>
    <cPLZ>50969</cPLZ>
    <cOrt>Köln</cOrt>
    <cBundesland>NRW</cBundesland>
    <cLand>Deutschland</cLand>
    <cTel>0211 12345</cTel>
    <cMobil/>
    <cFax>0211 54321</cFax>
    <cMail>maria@jtl-software.de</cMail>
    </tlieferadresse>
    <tzahlungsinfo>
    <cBankName/>
    <cBLZ/>
    <cKontoNr/>
    <cKartenNr/>
    <dGueltigkeit/>
    <cCVV/>
    <cKartenTyp/>
    <cInhaber/>
    </tzahlungsinfo>
    </tBestellung>
    </tBestellungen>

    Sales order export (XML)

    You can also export sales orders from JTL-Wawi as XML. Read more: Exporting sales orders via CSV/XML.