Create sales order (Createverkooporder)

Using CreateVerkooporder allows you to create a sales order.

Note:

Tag explanation:
Foutmelding = Error
Verkooporder = sales order

CreateVerkoopOrder(ByVal PartnerKey As String, ByVal Omgevingscode As String, ByVal SessionId As String, ByRef Verkooporder As DataSet, ByRef ORDNR As Integer, ByRef Foutmelding As String) As Boolean

When creating a sales order different master tables must be filled. 

SOAP request:

 <?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <CreateVerkoopOrder xmlns="https://cloudswitch.imuisonline.com/">
      <PartnerKey>string</PartnerKey>
      <Omgevingscode>string</Omgevingscode>
      <SessionId>string</SessionId>
      <Verkooporder>
        <xsd:schema>schema</xsd:schema><![CDATA[zie voorbeeld]]></Verkooporder>
      <ORDNR>int</ORDNR>
      <Foutmelding>string</Foutmelding>
    </CreateVerkoopOrder>
  </soap12:Body>
</soap12:Envelope>

Information request  tag <Verkooporder></Verkooporder>. To create a sales order.

<NewDataSet>
<ORDKOP>
<DEB>debtor number</DEB>
<BETALER>payer number</BETALER>
<DAT>orderdate</DAT>
<ORDSRT>order type</ORDSRT>
<DATLEVUITERSTAUTO>J/N ( optional, Determine delivery date automatically. Pay attention! This option is only active as option “Final delivery date user” in “Master table of sales” (BASVK) is checked. If this option is not checked, this option will always be “N”. )</DATLEVUITERSTAUTO>
<NEGAANT>J/N</NEGAANT> (optional, default this setting to use negative numbers is N (No) to prevent unwanted negative sales orders. (credit notes/discounts) Set this option To J (Yes) to enter negative lines. For example discount lines.
<BTWPL>B,I,L,U,N,V</BTWPL> (optional, default this option is set by the debtor VAT liable state. When a delivery address located in another country it is possible to reverse charges (VAT) using the letter V (=Reversed Charges).
</ORDKOP>
<ORDRG>
<ART>Product</ART>
<AANT>Number</AANT>
<OPMINT>Internal remark</OPMINT>
<OPMEXT>External remark</OPMEXT>
<DAT>line date</DAT>
<BLOK>blocked (J/N) </BLOK>
<OMSCHR>Description</OMSCHR>
<PERCKORT>percentage discount</PERCKORT>
<MAG>Storage number</MAG>
<DATLEV>line delivery date</DATLEV>
</ORDRG>
</NewDataSet>

Optional: a datatable <DIGDOS><FILE>byte array (.NET), of base64 encoded string (XML and HTTP-API)</FILE></DIGDOS> can be added. With this option documents can be linked to the sales order.

Click here for available fields:

 

Exapmple for request  tag <Verkooporder></Verkooporder>. Create a sales order with two lines, using order type “spitsfactuur” and “Spitsfactuur” products “BTWHOOG” and “BTWLAAG”:

<NewDataSet>
<ORDKOP>
<NR>0</NR>
<DEB>10000</DEB>
<DAT>2015-05-28T13:16:19+02:00</DAT>
<ORDSRT>spitsfactuur</ORDSRT>
</ORDKOP>
<ORDRG>
<RG>0</RG>
<ART>BTWHOOG</ART>
<AANT>1</AANT>
<OPMINT>Internal remark</OPMINT>
<OPMEXT>External remark</OPMEXT>
<DAT>2015-05-28T13:16:19+02:00</DAT>
<BLOK>N</BLOK>
<OMSCHR>Description</OMSCHR>
<PERCKORT>0</PERCKORT>
<PERCKORTKORT>0</PERCKORTKORT>
<MAG>1</MAG>
<DATLEV>2015-05-29T13:16:19+02:00</DATLEV>
</ORDRG>
<ORDRG>
<RG>0</RG>
<ART>BTWLAAG</ART>
<AANT>1</AANT>
<OPMINT>Internal remark</OPMINT>
<OPMEXT>External remark</OPMEXT>
<DAT>2015-05-28T13:16:19+02:00</DAT>
<BLOK>N</BLOK>
<OMSCHR>Descriction</OMSCHR>
<PERCKORT>0</PERCKORT>
<PERCKORTKORT>0</PERCKORTKORT>
<MAG>1</MAG>
<DATLEV>2015-05-29T13:16:19+02:00</DATLEV>
</ORDRG>
</NewDataSet>

SOAP response:

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <CreateVerkoopOrderResponse xmlns="https://cloudswitch.imuisonline.com/">
      <CreateVerkoopOrderResult>true</CreateVerkoopOrderResult>
      <Verkooporder>see example</Verkooporder>
      <ORDNR>20150001</ORDNR>
      <Foutmelding></Foutmelding>
    </CreateVerkoopOrderResponse>
  </soap12:Body>
</soap12:Envelope>

In this example sales order number 20150001 is created.

Example:  See tag value  <Verkooporder></Verkooporder>, for the created sales order.

<NewDataSet>
<ORDKOP>
<NR>20150001 </NR>
<DEB>10000</DEB>
<DAT>2015-05-28T13:16:19+02:00</DAT>
<ORDSRT>spitsfactuur</ORDSRT>
</ORDKOP>
<ORDRG>
<RG>10</RG>
<ART>BTWHOOG</ART>
<AANT>1</AANT>
<OPMINT>Internal remark</OPMINT>
<OPMEXT>External remark</OPMEXT>
<DAT>2015-05-28T13:16:19+02:00</DAT>
<BLOK>N</BLOK>
<OMSCHR>Description</OMSCHR>
<PERCKORT>0</PERCKORT>
<PERCKORTKORT>0</PERCKORTKORT>
<MAG>1</MAG>
<DATLEV>2015-05-29T00:00:00+02:00</DATLEV>
<BEDR>210</BEDR>
<EENH>Piece</EENH>
<PRS>210</PRS>
<STATUS>O</STATUS>
<VERKOPER>groot</VERKOPER>
</ORDRG>
<ORDRG>
<RG>0</RG>
<ART>BTWLAAG</ART>
<AANT>1</AANT>
<OPMINT>Internal remark</OPMINT>
<OPMEXT>External remark</OPMEXT>
<DAT>2015-05-28T13:16:19+02:00</DAT>
<BLOK>N</BLOK>
<OMSCHR>Description</OMSCHR>
<PERCKORT>0</PERCKORT>
<PERCKORTKORT>0</PERCKORTKORT>
<MAG>1</MAG>
<DATLEV>2015-05-29T13:16:19+02:00</DATLEV>
</ORDRG>
</NewDataSet>