Purchase orders
Purchase orders are EVA's way of getting products across your OUs. There are several ways you can use purchase orders; this page will go into the most important API calls.
- You can easily create purchase orders in Admin Suite's corresponding chapter directly: Purchase orders.
- You can automate the creation of purchase orders in EVA, keeping your stock levels up-to-date. We call this Replenishment.
- The focus of this page: using APIs to integrate with EVA and push purchase orders towards EVA, from a third party tool for example.
Basic purchase order flow
When you want to manage replenishment from your warehouse to your stores via an external tool, you can set up an integration with EVA. This integration will then use EVA's services to go through the following steps:
- Creation - everything else is optional
- Modification
- Placement
- Confirmation
- Shipping
- Receiving
Creation
Creating a purchase order via API is simple: by using SupplierCreatePurchaseOrder
you can create it and add the necessary products in one go. Optionally, you can even ship and receive it directly, or copy the back-end reference on the shipment.
{
"Ship": true,
"Lines": [
{
"Quantity": 0,
"ProductID": 0,
"UnitPrice": 0,
"BackendReference": ""
}
],
"Receive": true,
"BackendID": "",
"CustomFields": {},
"BackendSystemID": "",
"ExpectedDeliveryDate": "",
"ShipToOrganizationUnitID": 0,
"CopyBackendReferenceOnShip": true,
"ShipFromOrganizationUnitID": 0
}
This service returns an ID that represents the order line. You will need this upon shipping, that is if you haven't indicated shipping already in this call.
For more detailed information on this service, such as which fields are required, please see SupplierCreatePurchaseOrder.
Because this service lets you ship and receive directly, this service can technically complete your entire flow.
Modification
This service is similar to the first, but limited to updating an existing purchase order.
{
"BackendSystemID": "",
"BackendID": "",
"ShipToOrganizationUnitID": 0,
"Lines": [
{
"ProductID": 0,
"Quantity": 0,
"ExpectedDeliveryDate": "",
"UnitPrice": 0
}
]
}
Mind that this service does not let you ship nor receive directly, as in the previous section's call.
For more detailed information on this service, please see SupplierUpdatePurchaseOrder.
Optional: cancelling order lines by reducing quantity
Although the normal way of cancelling orders (or lines) is done by means of CancelOrder
, you can also use the SupplierUpdatePurchaseOrder
service.
This is because the service also lets you set product quantities to 0. This effectively cancels the order line containing the product and means you can no longer update that order line anymore.
If however you have multiple order lines containing the same product, only the first order line containing that product will be set to zero and get cancelled. By running the same request one more time, the following order line with that product will get the same cancellation treatment.
Placement
When placing the order, we basically tell the supplier; "We are done building this order, having filled the cart with products and set the order type, so you can start working on it now."
It is possible to edit the order and place it again. However, this is only possible so long as the supplier has not confirmed the order.
To place the order, call PlaceOrder
.
{
"OrderID": 739
}
{
"ValidationResult": {
"OrderID": 739,
"Result": 1,
"Messages": []
},
"ValidationResults": [
{
"OrderID": 739,
"Result": 1,
"Messages": []
}
]
}
For more detailed information on this service, please see PlaceOrder.
Confirmation
After the receiving party has finished and placed the purchase order, the warehouse needs to confirm it.
In confirming the purchase order, the warehouse lets the receiving party know that they are going to start to work on the order now and that it cannot be altered anymore.
To confirm the purchase order, call ConfirmPurchaseOrder:
{
"OrderID": 739
}
{}
For more detailed information on this service, please see ConfirmPurchaseOrder.
Shipping
After confirming the purchase order, the supplier can start working on shipments for the purchase order.
When managing the shipment in an external system, you can pass all necessary information to EVA via the extensive ShipExternalOrder
service.
Especially take note of the FinalShipment property, which will mark it as the final shipment and cancels any open order lines still on the purchase order.
{
"ID": 0,
"BackendID": "",
"Shipments": [
{
"Lines": [
{
"ID": 0,
"Barcode": "",
"Quantity": 0,
"BackendID": "",
"SerialNumber": ""
}
],
"Packages": [
{
"Lines": [
{
"ID": 0,
"Barcode": "",
"Quantity": 0,
"BackendID": "",
"SerialNumber": ""
}
],
"PackageID": 0
}
],
"BackendID": "",
"PackageID": 0,
"CustomFields": [
{
"BlobValue": "",
"BoolValue": true,
"ArrayValues": [
{
"BlobValue": "",
"BoolValue": true,
"ArrayValues": [],
"NumberValue": 0,
"StringValue": "",
"DateTimeValue": ""
}
],
"NumberValue": 0,
"StringValue": "",
"CustomFieldID": 0,
"DateTimeValue": ""
}
],
"TrackingCode": "",
"TrackingLink": "",
"BackendSystemID": "",
"ShipFromOrganizationUnitID": 0
}
],
"FinalShipment": true,
"BackendSystemID": ""
}
For more detailed information on this service, please see ShipExternalOrder.
Receiving
When the shipment has been created, all that's left to do is for the receiving party to receive the shipment.
Take note that when your PO is coming in from an external system, ReceiveShipment
is the right service to use (even though you might have expected ReceivePurchaseOrderShipment
).
{
"Receipts": [
{
"ShipmentLineID": 0,
"QuantityReceived": 0
}
],
"ShipmentID": 0,
"CompleteShipment": true
}
For more detailed information on this service, please see ReceivePurchaseOrderShipment.