Reported number of items
Table of contents
Introduction
Most people who integrate with Ongoing WMS using our API will generally want some way of querying Ongoing WMS for:
- Which orders have been picked since my last API call?
- Which returns have been made since my last API call?
- Which purchase orders have been received since my last API call?
- Which production orders have been produced since my last API call?
Ongoing WMS provides a way for the integrating system to store information about which objects have already been processed by the integrating system. We call this reporting back and it is done with an additional API call.
By reporting back, you will be able to very easily query Ongoing WMS for e.g. "all orders which have been picked since my last API call". This way of querying is very robust since it does not depend on a time variable.
Example
We will now provide an example of how this works, using orders.
Each order line in Ongoing WMS has a field called ReportedNumberOfItems. This is the quantity which the integrating system has reported back that it has confirmed as picked.
The integrating system can use UpdateOrderLines to set the ReportedNumberOfItems.
The integrating system can use GetOrdersByQuery and specify OnlyOrdersWithOrderLinesToReport = true to query for all orders where the picked number of items differs from the reported number of items.
An example for partial delivery with reported number of items being used:
-
An order is created with integration. There is a single order line, for 10 pieces of some SKU.
- ProcessOrder is used to accomplish this.
-
The warehouse partially delivers 8 pieces of the SKU.
- The order shows up in a query by using GetOrdersByQuery.
- The integrating system does whatever processing it needs to do (e.g. sending a email to the customer).
- The integrating system finishes by calling UpdateOrderLines to set ReportedNumberOfItems to the picked amount (that is, 8).
-
At some later date, the warehouse picks the remaining 2 pieces.
- Order shows up again in a query by using GetOrdersByQuery.
- In the query response, PickedNumberOfItems = 10 and ReportedNumberOfItems = 8. This tells the integrating system that an additional 2 pieces have been delivered.
- The integrating system does whatever processing it needs (e.g. sending another email to the customer, informing them that the remainder of the order is on its way).
- The integrating system finishes by calling UpdateOrderLines to set ReportedNumberOfItems to 10.
- The order is now completely delivered.
Other objects
The same basic logic which is described in the example can be applied to other objects.
Order - picked items
For reporting back the picked number of items on an order, use UpdateOrderLines to set the ReportedNumberOfItems. Use GetOrdersByQuery and specify OnlyOrdersWithOrderLinesToReport = true to query.
Order - returned items
For reporting back the return number of items on an order, use UpdateOrderLines to set the ReportedReturnedNumberOfItems. Use GetOrdersByQuery and specify OnlyOrdersWithOrderLinesToReportReturned = true to query.
Purchase order - received items
For reporting back the received number of items on a purchase order, use UpdateInOrderLines to set the ReportedNumberOfItems. Use GetInOrdersByQuery and specify OnlyWithInOrderLinesWithDiffingReceviedToReported = true to query.
Production order - produced items
For reporting back the produced number of items on a production order, use UpdateProductionOrderLines to set the UpdateReportedNumberOfItems. Use GetProductionOrdersByQuery and specify OnlyProductionOrdersWithLinesToReport = true to query.
Stock comparisons
When you call GetInventoryByQuery and GetInventoryPerWarehouse, the response contains the field PickedToBeReportedNumberOfItems. This is the number of items which have been picked but have not been reported back yet by the integrating system.
If you use this value as part of a daily stock comparison between your system and Ongoing WMS, then it's important to note that all orders must be reported back, even if the orders did not originate from the integrating system.