Skip to main content

Purchase orders

Basic purchase order flow

The flow for a purchase order that flows through our frontends is as follows:

  1. Creation
  2. Modification
  3. Placement
  4. Confirmation
  5. Shipping
  6. Receiving

Creation

Before we can start building our purchase order, we first need to create one. In essence, we will be creating an empty purchase order that only contains an OrderID, the supplying OU and the receiving OU.

To do so, we call CreatePurchaseOrder:

{
"OrganizationUnitID": 4,
"SupplierID": 5
}

This service returns an OrderID, which we will use for our subsequent requests.

Modification

Now that we have our empty purchase order, we can start adding products. To add a product, use AddPurchaseOrderLines:

{
"OrderID": 739,
"Lines": [
{
"ProductID": 60,
"Quantity": 1
}
]
}

This service returns an ID that represents the orderline. We will need this upon shipping. When we have added all products we want, we can place the order.

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." This step is less important for carry out orders, since it's shipped right after payment anyway, which in turn triggers invoices. This differs per front end.

To place the order, call PlaceOrder:

{
"OrderID": 739
}

It is possible to edit the order and place it again. However, this is only possible when the supplier has not yet confirmed the order.

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
}

Shipping

After confirming the purchase order, the supplier can start working on shipments for the purchase order.

CreateShipment

{
"OrderID": 739,
"ShippedFromOrganizationUnitID": 5,
"Lines": [
{
"OrderLineID": 1037,
"Quantity": 1
},
{
"OrderLineID": 1038,
"Quantity": 1
}
]
}

Receiving

When the shipment has been created, all that's left to do is for the receiving party to receive the shipment.

ReceivePurchaseOrderShipment

{
"ShipmentID": 314,
"Lines": [
{
"ProductID": 59,
"QuantityReceived": 1
},
{
"ProductID": 60,
"QuantityReceived": 1
}
]
}

SupplierCreatePurchaseOrder

Instead of going through all the steps of the basic purchase order flow, you can also use the service SupplierCreatePurchaseOrder.

This single service lets you create the purchase order, add all the necessary items and their quantity, an expected delivery date and even allows you to set the PO to auto-ship and auto-receive. This is used to link external supplier systems with EVA.

{
"ShipFromOrganizationUnitBackendID": "almere_warehouse",
"ShipToOrganizationUnitBackendID":"almere_store",
"BackendID":"CreatePO25",
"Ship":"true",
"Receive":"true",
"Lines": [
{
"ProductID":"60",
"Quantity":2
}
]
}

Create or update

It is also possible to send PO information into EVA without knowing if the order already exists. To do so, use SupplierCreateOrUpdatePurchaseOrder. This service creates a purchase order, or updates it in case it already exists. If it already exists, only the lines will be updated, all other properties will be ignored.

{
"ShipFromOrganizationUnitBackendID": "almere_warehouse",
"ShipToOrganizationUnitBackendID":"almere_store",
"BackendID":"CreatePO25",
"Ship":"true",
"Receive":"true",
"Lines": [
{
"ProductID":"60",
"Quantity":5
}
]
}

Shipping

When using this method, use SupplierShipPurchaseOrder to ship the purchase order.

{
"ID": "757",
"Confirmations": [
{
"Lines": [
{
"ProductID": "60",
"Quantity": 5
}
]
}
]
}
Cancelling Orderlines 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 orderline containing the product and means you can no longer update that orderline anymore. If however you have multiple orderlines containing the same product, only the first orderline containing that product will be set to zero and get cancelled. By running the same request one more time, the following orderline with that product will get the same cancellation treatment.