Calculate Sales Order
This service is to calculate sales orders in NAV/Business Central on a temporary basis. Amounts and prices can be calculated for customers, customer groups or all different pricing constructs. You will need different master data, that can be received via the Master Data Service.
Service Endpoint
The base Endpoint is:
InboundCalcOrderIISWebService/InboundCalcOrderIISWebService
API Methods
Here are the available methods for the Calculate Sales Order Service:
CalcSalesOrder
Sample Request
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:inb="http://tempuri.org/InboundCalcOrderIISWebService/"
xmlns:x53="urn:microsoft-dynamics-nav/xmlports/x5371214">
<soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>http://tempuri.org/InboundCalcOrderIISWebService/InboundCalcOrderIISWebService/CalcSalesOrder</wsa:Action>
</soap:Header>
<soap:Body>
<inb:CalcSalesOrder>
<inb:inboundCalcSalesOrder>
<x53:Header_General>
<x53:Document_No>0</x53:Document_No>
<x53:Prices_Incl_VAT>true</x53:Prices_Incl_VAT>
</x53:Header_General>
<x53:Header_Sell_To_Customer>
<x53:Customer_No>10000</x53:Customer_No>
</x53:Header_Sell_To_Customer>
<x53:Sales_Lines>
<x53:Sales_Line>
<x53:Line_No>10000</x53:Line_No>
<x53:Type>Item</x53:Type>
<x53:No>1000</x53:No>
<x53:Quantity>3</x53:Quantity>
</x53:Sales_Line>
<x53:Sales_Line>
<x53:Line_No>20000</x53:Line_No>
<x53:Type>Item</x53:Type>
<x53:No>1600</x53:No>
<x53:Quantity>2</x53:Quantity>
</x53:Sales_Line>
<x53:Sales_Line>
<x53:Line_No>30000</x53:Line_No>
<x53:Type>Item</x53:Type>
<x53:No>1900-S</x53:No>
<x53:Quantity>2</x53:Quantity>
</x53:Sales_Line>
<x53:Sales_Line>
<x53:Line_No>40000</x53:Line_No>
<x53:Type>Item</x53:Type>
<x53:No>1200</x53:No>
<x53:Quantity>2</x53:Quantity>
</x53:Sales_Line>
</x53:Sales_Lines>
</inb:inboundCalcSalesOrder>
</inb:CalcSalesOrder>
</soap:Body>
</soap:Envelope>
Sample Response
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://tempuri.org/InboundCalcOrderIISWebService/InboundCalcOrderIISWebService/CalcSalesOrderResponse</a:Action>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CalcSalesOrderResponse xmlns="http://tempuri.org/InboundCalcOrderIISWebService/">
<inboundCalcSalesOrder>
<Amount xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">14,787.4</Amount>
<Total_Amount xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">14,787.4</Total_Amount>
<Invoice_Discount_Amount xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">0</Invoice_Discount_Amount>
<VAT_Amount xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">2,809.61</VAT_Amount>
<Amount_Incl_VAT xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">17,597.01</Amount_Incl_VAT>
<Header_General xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">
<Document_No>0</Document_No>
<Order_Date>2016-04-28</Order_Date>
<Shipment_Method_Code>EXW</Shipment_Method_Code>
<Currency_Code/>
<Shipping_Agent_Code>DHL</Shipping_Agent_Code>
<Shipping_Agent_Service_Code>ÜBER NACHT</Shipping_Agent_Service_Code>
<Customer_Order_No/>
<External_Document_No/>
<Payment_Method_Code/>
</Header_General>
<Header_Sell_To_Customer xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">
<Customer_No>10000</Customer_No>
<Contact_No>KT000007</Contact_No>
<Name>New Customer Name</Name>
<Name_2>New Customer Name 2</Name_2>
<First_Name/>
<Surname/>
<Address>Tischlerstr. 4-10</Address>
<Address_2/>
<Post_Code>48436</Post_Code>
<City>Düsseldorf</City>
<Country_Code/>
<Template_Code/>
</Header_Sell_To_Customer>
<Header_Bill_To_Customer xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">
<Customer_No>10000</Customer_No>
<Contact_No>KT000007</Contact_No>
<Name>New Customer Name</Name>
<Name_2>New Customer Name 2</Name_2>
<First_Name/>
<Surname/>
<Address>Tischlerstr. 4-10</Address>
<Address_2/>
<Post_Code>48436</Post_Code>
<City>Düsseldorf</City>
<Country_Code/>
<Template_Code/>
</Header_Bill_To_Customer>
<Header_Ship_To_Customer xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">
<Code/>
<Name>New Customer Name</Name>
<Name_2>New Customer Name 2</Name_2>
<First_Name/>
<Surname/>
<Address>Tischlerstr. 4-10</Address>
<Address_2/>
<Post_Code>48436</Post_Code>
<City>Düsseldorf</City>
<Country_Code/>
<Shipping_Advice>0</Shipping_Advice>
</Header_Ship_To_Customer>
<Header_Payment xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">
<TX_ID/>
<TX_Code/>
<TX_Amount/>
</Header_Payment>
<Sales_Lines xmlns="urn:microsoft-dynamics-nav/xmlports/x5371214">
<Sales_Line>
<Line_No>10000</Line_No>
<Type>2</Type>
<No>1000</No>
<Variant_Code/>
<Description>Tourenrad</Description>
<Description_2/>
<Quantity>3</Quantity>
<Unit_Of_Measure_Code>Stück</Unit_Of_Measure_Code>
<Line_Amount>11,400.00</Line_Amount>
<Line_Amount_Incl_VAT>13,566.00</Line_Amount_Incl_VAT>
<Line_Discount_Percent>5</Line_Discount_Percent>
<Line_Discount_Amount>600</Line_Discount_Amount>
<Shipment_Date>2016-04-28</Shipment_Date>
<Unit_Price>4,000.00</Unit_Price>
<Availability_Numeric>149.00</Availability_Numeric>
<Availability_Boolean>true</Availability_Boolean>
</Sales_Line>
<Sales_Line>
<Line_No>20000</Line_No>
<Type>2</Type>
<No>1600</No>
<Variant_Code/>
<Description>Klingel</Description>
<Description_2/>
<Quantity>2</Quantity>
<Unit_Of_Measure_Code>Stück</Unit_Of_Measure_Code>
<Line_Amount>0.00</Line_Amount>
<Line_Amount_Incl_VAT>0.00</Line_Amount_Incl_VAT>
<Line_Discount_Percent>0.00</Line_Discount_Percent>
<Line_Discount_Amount>0.00</Line_Discount_Amount>
<Shipment_Date>2016-04-28</Shipment_Date>
<Unit_Price>0.00</Unit_Price>
<Availability_Numeric>0.00</Availability_Numeric>
<Availability_Boolean>false</Availability_Boolean>
</Sales_Line>
<Sales_Line>
<Line_No>30000</Line_No>
<Type>2</Type>
<No>1900-S</No>
<Variant_Code/>
<Description>PARIS Gästestuhl, schwarz</Description>
<Description_2/>
<Quantity>2</Quantity>
<Unit_Of_Measure_Code>Stück</Unit_Of_Measure_Code>
<Line_Amount>387.40</Line_Amount>
<Line_Amount_Incl_VAT>461.01</Line_Amount_Incl_VAT>
<Line_Discount_Percent>0.00</Line_Discount_Percent>
<Line_Discount_Amount>0.00</Line_Discount_Amount>
<Shipment_Date>2016-04-28</Shipment_Date>
<Unit_Price>193.70</Unit_Price>
<Availability_Numeric>52.00</Availability_Numeric>
<Availability_Boolean>true</Availability_Boolean>
</Sales_Line>
<Sales_Line>
<Line_No>40000</Line_No>
<Type>2</Type>
<No>1200</No>
<Variant_Code/>
<Description>Hinterrad</Description>
<Description_2/>
<Quantity>2</Quantity>
<Unit_Of_Measure_Code>Stück</Unit_Of_Measure_Code>
<Line_Amount>2,160.00</Line_Amount>
<Line_Amount_Incl_VAT>2,570.40</Line_Amount_Incl_VAT>
<Shipment_Date>2016-04-28</Shipment_Date>
<Unit_Price>1200.00</Unit_Price>
<Line_Discount_Percent>10.00</Line_Discount_Percent>
<Line_Discount_Amount>240.00</Line_Discount_Amount>
<Availability_Numeric>49.00</Availability_Numeric>
<Availability_Boolean>true</Availability_Boolean>
</Sales_Line>
</Sales_Lines>
</inboundCalcSalesOrder>
</CalcSalesOrderResponse>
</s:Body>
</s:Envelope>
| Name |
Description |
Type |
max. Length |
Occurance |
| Amount |
Amount without invoice discount |
Decimal |
|
0..1 |
| Total_Amount |
Amount incl. invoice discount |
Decimal |
|
0..1 |
| Invoice_Discount_Amount |
Invoice discount amount |
Decimal |
|
0..1 |
| Total_VAT_Amount |
Total VAT amount |
Decimal |
|
0..1 |
| Amount_Incl_VAT |
Amount incl. VAT |
Decimal |
|
0..1 |
| Name |
Description |
Type |
max. Length |
Occurance |
| 🔑 Document No |
Specifies the number of the Sales Order. Leave this empty when creating a new order. |
String |
20 |
1..1 |
| Order_Date |
Specifies the order DateTime. Date is saved in NAV/Business Central only! |
DateTime |
|
0..1 |
| Shipment_Method_Code |
Specifies a default shipment method code for the order. Get a list of codes from the Master Data Service |
String |
10 |
0..1 |
| Currency_Code |
Specifies a default currency code for the order. Get a list of codes from the Master Data Service |
String |
10 |
0..1 |
| Shipping_Agent_Code |
Specifies a default shipping agent code for the order. Get a list of codes from the Master Data Service |
String |
10 |
0..1 |
| Shipping_Agent_Service_Code |
Specifies a default shipping agent service code for the order. Get a list of codes from the Master Data Service |
String |
10 |
0..1 |
| Customer_Order_No |
Specifies the customer's order no. |
String |
20 |
0..1 |
| External_Document_No |
Specifies the external document no. This must be unique in NAV/Business Central. You'll receive an error when insert two orders with the same external document no. |
String |
35 |
0..1 |
| Payment_Method_Code |
Specifies a default payment method code for the order. Get a list of codes from the Master Data Service |
String |
10 |
0..1 |
| Prices_Incl_VAT |
Specifies the price to be incl. VAT |
Boolean |
|
0..1 |
| Campaign_No |
Specifies the campaign code assigned to an order. Get a list of codes from the Campaign Service |
String |
10 |
0..1 |
| Order_Time |
Specifies the order time. Date is saved in NAV/Business Central only! |
Time |
|
0..1 |
| Name |
Description |
Type |
max. Length |
Occurance |
| Customer_No |
Specifies the number of the customer. |
String |
20 |
1..1 |
| Contact_No |
Specifies the number of the contact. |
String |
20 |
1..1 |
| Code |
Specifies the Ship-to Address Codes. |
String |
10 |
0..1 |
| Name |
Specifies the name. |
String |
50 |
0..1 |
| Name_2 |
Specifies the additional name. |
String |
50 |
0..1 |
| First_Name |
Specifies the first name. |
String |
30 |
0..1 |
| Surname |
Specifies the surname. |
String |
30 |
0..1 |
| Address |
Specifies the address. i.E. 'Hauptstraße 12b' |
String |
50 |
1..1 |
| Address_2 |
Specifies the add. address information. |
String |
50 |
1..1 |
| City |
Specifies the city. |
String |
30 |
1..1 |
| Post_Code |
Specifies a code for the post code of the address. Get a list of codes from the Master Data Service |
String |
10 |
0..1 |
| Country_Region_Code |
Specifies a code for the country/region of the address. Get a list of codes from the Master Data Service |
String |
10 |
0..1 |
| Template_Code |
Specifies the customer template code that is used when a customer is created. |
String |
50 |
1..1 |
| Shipping_Advice |
Specifies the complete or partial shipping information. |
String |
50 |
1..1 |
| Name |
Description |
Type |
max. Length |
Occurance |
| TX_ID |
Specifies the payment transaction no. |
String |
80 |
1..1 |
| TX_Code |
Specifies the transaction auth. code |
String |
20 |
1..1 |
| TX_Amount |
Specifies the amount |
String |
10 |
0..1 |
| Name |
Description |
Type |
max. Length |
Occurance |
| 🔑 Line No |
Specifies the pos. number. |
Decimal |
|
1..1 |
| Type |
Specifies the Type: "Item", "Resource", "G/L Account" |
String |
|
0..1 |
| No |
Specifies the No. i.E. Item No. "70000" |
String |
20 |
0..1 |
| Variant_Code |
Specifies the item variant code |
String |
10 |
0..1 |
| Description |
Specifies the Description. |
String |
50 |
0..1 |
| Description_2 |
Specifies the additional Description. |
String |
50 |
0..1 |
| Unit_Of_Measure_Code |
Specifies the sales unit of measure of the item. |
String |
10 |
0..1 |
| Quantity |
Specifies the quantity. |
Decimal |
|
1..1 |
| Line_Amount |
Specifies the lines amount |
Decimal |
|
0..1 |
| Line_Amount_Incl_VAT |
Specifies the lines amount incl. VAT. |
Decimal |
|
0..1 |
| Line_Discount_Percent |
Specifies the lines discount percentage. |
Decimal |
|
0..1 |
| Line_Discount_Amount |
Specifies the lines discount amount. |
Decimal |
|
0..1 |
| Shipment_Date |
Specifies the lines shipment date. |
DateTime |
|
0..1 |
| Unit_Price |
Specifies the lines unit price |
Decimal |
|
0..1 |
| Availability_Numeric |
Readonly. Specifies the numeric availability for this line. Needs to be Type "Item" |
Decimal |
|
0..1 |
| Availability_Boolean |
Readonly. Specifies the boolean availability for this line. Needs to be Type "Item" |
Boolean |
|
0..1 |