VC Order v6

VC Order v6

This versions has been superceded by v7

License Module

This is a licensed module and there is a small monthly charge for this feature in order that we support and maintain it for the future.

Introduction

Allows new order to be posted into Vision Commerce.

Request

Action : POST
URL : http://<path_to_api>/SalesOrder?Version=v6

Order Total & Tax Total sent through to the API will override any Commerce calculation. When posting the invoice to the finance system, the values posted to the API will always be used.

Body XML sample
<?xml version="1.0" encoding="UTF-8"?> <Order> <OType>SO</OType> <Customer>R2</Customer> <Warehouse>MAIN</Warehouse> <UnderBondType>DP</UnderBondType> <OrderDate>2021-08-03</OrderDate> <ReleaseDate></ReleaseDate> <Address1>Royal House (demo)</Address1> <Address2>28 Sovereign St</Address2> <Address3></Address3> <Town>Leeds</Town> <Postcode>LS1 4BJ</Postcode> <Country>GB</Country> <Contact>Mrs Jones</Contact> <DelContactNo>0113 396 9002</DelContactNo> <Instructions>Use the rear door for the delivery </Instructions> <CustomerRef>Ref 20 </CustomerRef> <AccountManager>GEN</AccountManager> <Type>RTL</Type> <OrderLines> <Item> <ProductCode>IT9020I19</ProductCode> <RotationNo /> <Units>2</Units> <Singles></Singles> <UnitPrice>156.50</UnitPrice> <SinglePrice>13.04</SinglePrice> <LineTotal>156.50</LineTotal> <LineTax>0</LineTax> </Item> </OrderLines> <SMsgDocNo>20</SMsgDocNo> <SMsgDocument>Happy Birthday</SMsgDocument> <SMsgQuantity>2</SMsgQuantity> <SMsgHeader>Happy Birthday</SMsgHeader> <SMsgTo>John Smith</SMsgTo> <SMsg1>Happy Birthday</SMsg1> <SMsg2>Hope you have a great day</SMsg2> <SMsgFrom>Sue Jones</SMsgFrom> <SMsgFooter>Happy Birthday</SMsgFooter> <SMsgEmail>Happy Birthday</SMsgEmail> <CartDiscount>0</CartDiscount> <LineTotal>156.50</LineTotal> <LineTaxTotal>2</LineTaxTotal> <Fee>0</Fee> <FeeTax>0</FeeTax> <Shipping>5.00</Shipping> <ShippingTax>2</ShippingTax> <TaxTotal>2</TaxTotal> <OrderTotal>166.50</OrderTotal> <Payments> <Payment> <PaymentMethodID>200</PaymentMethodID> <PaymentMethod>Cash</PaymentMethod> <Value>166.50</Value> <Name></Name> <Company>Ontech</Company> <Address1>Brentwood</Address1> <Address2>East England</Address2> <City>Brentwood</City> <State>Essex</State> <Postcode>CM131BN</Postcode> <Country>England</Country> <Phone>9946938619</Phone> <Email>testers@ontech.uk</Email> <TID>BL002</TID> </Payment> </Payments> <ShippingMethodID>ONTECH</ShippingMethodID> <PaymentMethodID>200</PaymentMethodID> <WebOrderID>150</WebOrderID> </Order>





Tag

Element

Recurring Element

Data type

(M)andatory
(O)ptional
(C)onditional

Notes or limitations

Vision Commerce field

Tag

Element

Recurring Element

Data type

(M)andatory
(O)ptional
(C)onditional

Notes or limitations

Vision Commerce field

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<Order>



<OType>



varchar(2)

M

Options 

SO  - Standard Order (defaut)

EP - EP Order

FKSalesOrderType



<Warehouse>



varchar(6)

M

the warehouse code of the warehouse to be used for the order otherwise it will default to the warehouse set in the API admin options

WareHouseCode



<UnderBondType>



varchar(2)

M

Options

DP : Duty Paid (default)

Other options - Underbond (will place order on hold awaiting all UB details)

U : UK Under Bond
X : Export
E : Other EC Warehouse
D : Duty Free
V : Visiting Forces
O : Other Duty Free use
T  : Transfer of Stock within Warehouse
R  : Customer Paid Reserves

Under Bond Type

 

<Customer>

 

varchar(8)

O

Either field can be provided, if you provide nothing here then the system will use the default customer account code held in the API defaults setting

Customer

 

<CustID>

 

bigint

O



<OrderDate>



date

M

format   YYYY-MM-dd

Order Date



<ReleaseDate>



datetime

O

YYYY-MM-dd HH:mm:ss format

Web site completed date/time 

Release Date



<Address1>



nvarchar(50)

M



Delivery Address1



<Address2>



nvarchar(50)

O



Delivery Address2



<Address3>



nvarchar(50)

O



Delivery Address3



<Town>



nvarchar(50)

M



Delivery Town



<Postcode>



varchar(15)

M



Postcode



<Country>



varchar(2)

M



Country code

 


<Contact>

 

nvarchar(30)

O

 


Delivery Contact



<DelContactNo>



varchar(50)

O



Delivery Contact No (Telephone)



<Instructions>



varchar(120)

O

Will use customers default instructions unless this has something different when this will over write.

Delivery Instructions

 

<CustomerRef>

 

varchar(30)

O

The customer’s reference for the order

Customer Ref



<AccountManager>



varchar(8)

O

Sales Order Analysis 1

Used to override the default option for the primary customer analysis code on a sales order

Account Manager



<Type>



varchar(8)

O

Sales Order Analysis2

Used to override the default option for the secondary customer analysis code on a sales order

Type

<OrderLines>



    <Item>





M

Section can be repeated with the <Item>, repeat for each individual order line


tblVisionSalesOrderDetail





<ProductCode>

varchar(30)

M



Product Code





<RotationNo>

varchar(15)

O



RotationNumber





<Units>

int

M



No of Cases





<Singles>

int

C



Number of Singles





<UnitPrice>

decimal(9,2)

C

After discounts and excluding VAT

PricePerUnit





<SinglePrice>

decimal(9,2)

C

After discounts and excluding VAT

PricePerSingle





<LineTotal>

decimal(9,4)

O

After discounts and excluding VAT

Total Price for the line, EX VAT





<LineTax>

decimal(9,4)

O

VAT for this line

VAT total for the line

 

    </Item>

 

 

 

 

 

</OrderLines>

 

<SMsgDocNo>

 

int

O

Special message document

SM Document ID

 

<SMsgDocument>

 

varchar(80)

O

Special message document type

SM Document Type

 

<SMsgQuantity>

 

int

O

Special message quantity

SM Quantity

 

<SMsgHeader>

 

varchar(120)

O

Special message Header

Special Message Text 3

 

<SMsgTo>

 

varchar(80)

O

Special message recipient (to)

Special Message Text 5



<SMsg1>



varchar(4096)

O

Saved in the order "warehouse options" – please check availability with the warehouse.

Used by customers who wish to put a card inside the delivery for the receiver.  Can be used for “Happy Birthday” “Merry Christmas” messages or similar.

Can be HTML formatted or plain text.

SpecialMessageText1



<SMsg2>



varchar(4096)

O

This is line 2 of the message text and is predominantly used as a marketing message for the receiver of the goods.

Can be HTML formatted or plain text.

SpecialMessageText2

 

<SMsgFrom>

 

varchar(80)

O

Special message sender (from)

Special Message Text 6

 

<SMsgFooter>

 

varchar(120)

O

Special message footer

Special Message Text 4

 

<SMsgEmail>

 

email

O

Special Message Email address

Not currently in use



<CartDiscount>



decimal(9,4)

O



Total Discount Amount



<LineTotal>



decimal(9,4)

O

Not including VAT

Line total



<LineTaxTotal>

Copyright Ontech Solutions 2017-2024. All rights reserved, no part may be replicated or distributed without the express permission of the owner.