Vendor Integration - Ordering
How it works
This is an option for vendors that don't have their own electronic order API (or for other reasons prefer to use this way to communicate order messages with our clients).
FTP
FTP contains three root directories.
/ORDERS -Contains XML files with ORDERS documents. One file per order. File name format iswmxorder_<internal-webmercs-id>.xml/ORDRSP -Contains unprocessed order response (ORDRSP) documents. Each file should only contain information about one order, but multiple files for the same order is ok./DESADV -Contains unprocessed dispatch advice (DESADV) documents. Each file should only contain information about one order, but multiple files for the same order is ok.
For each placed order we immediately send XML file with ORDERS document by FTP to the
ORDERSdirectory.You periodically check
ORDERSdirectory and process new files. Processed files may be removed from this directory (doesn't matter for us).For each received order you send XML files with ORDRSP and/or DESADV documents. ORDRSP is not required, but recommended, We will process DESADV messages even if there's no ORDRSP for the orders.
We periodically check FTP directories
ORDRSPandDESADVand process new files. Successfully processed files are removed from these folders (but we store them in archive on our servers). In case of processing error, file is moved to sub-directoryERROR.
Activation
To enable FTP ordering send request to support. You can specify which FTP should be used:
Webmercs FTP - we will prepare FTP for you.
Your own FTP - you should provide adress/username/password.
In case of Your own FTP you should also create three root directories ORDERS, ORDRSP, DESADV.
Possible errors
Code | Description |
|---|---|
1001 | Authentication failed. Check login \ password. |
1002 | Internal error. |
1003 | Some required properties are not provided or empty. See details in the exception message. |
1004 | Order not found. Check |
1005 | Invalid order response status. Check property |
1006 | Invalid order status. < add examples > |
1007 | Invalid XML structure. |
1008 | Invalid property format |
For each placed order we immediately send email to you with ORDERS document as an attachment. No way to send responses by email, please use FTP for that.
Activation
To enable Email notifications send request to support. You should specify email address(es) to which you will receive ORDERS documents.
Documents
Type | Direction | Description | FTP | |
|---|---|---|---|---|
ORDERS | outgoing | Order request. | ||
ORDRSP | incoming | Order response. |
| |
DESADV | incoming | Order despatch advice. |
|
Common notes
Required segments\fields must exist in the document with non-empty values.
Optional segments\fields are either missing in the document, or have an empty value.
Order Request (ORDERS)
<?xml version="1.0" encoding="utf-8"?>
<OrderRequest xmlns="http://webmercs.com/vis/public">
<OrderHeader>
<CustomerID></CustomerID>
<CustomerPO></CustomerPO>
<OrderDateTime></DateTime>
<SplitOrder></SplitOrder>
<ShippingMethod></ShippingMethod>
<RequestedDeliveryDate></RequestedDeliveryDate>
<Comment></Comment>
<BillTo>
<Name></Name>
<Company></Company>
<Department></Department>
<Street></Street>
<City></City>
<StateProvince></StateProvince>
<Zip></Zip>
<Country></Country>
<Phone></Phone>
<Email></Email>
</BillTo>
<ShipTo>
<Name></Name>
<Company></Company>
<Department></Department>
<Street></Street>
<City></City>
<StateProvince></StateProvince>
<Zip></Zip>
<Country></Country>
<Phone></Phone>
<Email></Email>
<EndUserPO></EndUserPO>
</ShipTo>
</OrderHeader>
<OrderLines>
<OrderLine>
<LineNumber></LineNumber>
<VendorSKU></VendorSKU>
<WmxSKU></WmxSKU>
<Description></Description>
<Qty></Qty>
<ExpectedPrice></ExpectedPrice>
<Bid>
<ClaimNo></ClaimNo>
<Price></Price>
</Bid>
<Comment></Comment>
</OrderLine>
</OrderLines>
</OrderRequest><OrderHeader> segment
Field | Required | Data Type | Description | Sample |
|---|---|---|---|---|
| yes | string | Customer identifier in a vendor system which is provided on setup step. | "CID-898800" |
| yes | string | Unique order request identifier in Webmercs system. | "3445FHY-2" |
| yes | dateTime | Date and time when Webmercs received order request from customer. | 2012-10-25T12:50:12+01:00 |
| yes | string | Possible values: "Yes", "No". | "Yes" |
| no | string |
|
|
| no | dateTime | Customer may ask for a particular delivery date. | 2012-10-30 |
| no | string | Customer's comment. | "Test order, do not ship!" |
| yes |
| Shipping address, see <ShipTo> segment. |
|
| no |
| Billing address. Same fields as |
|
<ShipTo> segment
Field | Required | Data Type | Description | Sample |
|---|---|---|---|---|
| yes | string | Contact person name. | "Mike Petrov" |
| no | string | Company name. | "Horns and Hooves" |
| no | string | Department name. | "Accounting" |
| yes | string | Address line. | "Rådhusplassen 99" |
| yes | string | City name. | "Oslo" |
| no | string | State or province name or code. |
|
| yes | string | Postcode. | "0160" |
| yes | string | Two letter country code (ISO 3166-1 alpha-2). | "NO" |
| no | string | Contact person phone. | "11100999" |
| no | string | Contact person email. | |
| no | string | Contact person PO. | "HH-0289" |
<OrderLine> segment
Field | Required | Data Type | Description | Sample |
|---|---|---|---|---|
| yes | int | Sequential number of order line, starting from 1. | 1 |
| yes | string | Product identifier in a vendor system. | "SMT3000RMI2U" |
| yes | string | Product identifier in Webmercs system. | "3931244" |
| yes | string | Product description from Webmercs catalog. | "APC Smart UPS 3000VA" |
| yes | int | Quantity. | 10 |
| no | decimal | Vendor price from customer's catalog. | 8700.0 |
| no |
|
|
|
| no | string |
|
|
| no | decimal |
|
|
| no | string | Customer's comment. | "Cancel if real price is higher." |
Order Response (ORDRSP)
Example.
<?xml version="1.0" encoding="utf-8"?>
<OrderResponse xmlns="http://webmercs.com/vis/public">
<CustomerID></CustomerID>
<CustomerPO></CustomerPO>
<Status></Status>
<Message></Message>
<VendorOrderID></VendorOrderID>
</OrderResponse><OrderResponse> segment
Field | Required | Data Type | Description | Sample |
|---|---|---|---|---|
| yes | string | Customer identifier in a vendor system, the same value as in ORDERS document. | "CID-898800" |
| yes | string | Order identifier in Webmercs system, the same value as in ORDERS document. | "3445FHY-2" |
| yes | string | Possible values: "Accepted", "Rejected". | "Accepted" |
| no | string | Vendor's comment. | "Estimated delivery date is 21/10/2012" |
| yes, when "Accepted" | string | Order identifier in a vendor system. | "VND-O888" |
Despatch Advice (DESADV)
<?xml version="1.0" encoding="utf-8"?>
<DespatchAdvice xmlns="http://webmercs.com/vis/public">
<CustomerID></CustomerID>
<CustomerPO></CustomerPO>
<VendorOrderID></VendorOrderID>
<OrderLines>
<OrderLine>
<LineNumber></LineNumber>
<VendorSKU></VendorSKU>
<Qty></Qty>
<Price></Price>
<SerialNumbers>
<SerialNo></SerialNo>
</SerialNumbers>
</OrderLine>
</OrderLines>
<TrackingLines>
<TrackingLine>
<TrackingNo></TrackingNo>
<ShipMethod></ShipMethod>
<TrackingURL></TrackingURL>
</TrackingLine>
</TrackingLines>
</DespatchAdvice> <DespatchAdvice> segment
Field | Required | Data Type | Description | Sample |
|---|---|---|---|---|
| yes | string | Customer identifier in a vendor system, the same value as in ORDERS document | "CID-898800" |
| yes | string | Order identifier in Webmercs system, the same value as in ORDERS document. | "3445FHY-2" |
| yes | string | Order identifier in a vendor system. | "VND-O888" |
| yes |
| Contains list of <OrderLine> segments. |
|
| no |
| Contains list of <TrackingLine> segments. |
|