Integrate customs software with Ongoing WMS

There are many reasons to integrate Ongoing WMS with a customs software solution. For instance, if you need to manage bonded warehouses, generate customs documents or check that your shipment data is valid for import or export. When building an integration between Ongoing WMS and a customs software system it is recommended to use the goods owner SOAP API. This example also assumes that webhooks are used.

There are two main processes which needs to be accounted for when creating this integration. The inbound process and the outbound process. They are described in each section below.

Inbound steps

  1. Article items are received against purchase order lines.
  2. The article items are then consolidated on an inbound shipment.
  3. As the customs status on the inbound shipment is set to PendingForApproval, a webhook with the shipment ID is triggered.
  4. As the integration receives the webhook it proceeds to get the shipment information from Ongoing WMS, using the API endpoint GetInboundShipmentsByQuery.
  5. When the shipment data has been fetched by the customs software system the integration updates the customs status on the shipment in Ongoing WMS to FetchedByCustomsSystem, using the API endpoint UpdateShipment.
  6. If the shipment data gets approved by the customs system, the integration updates the customs status on the shipment in Ongoing WMS to ApprovedByCustomsSystem. Otherwise, if the shipment data gets rejected by the customs system, the integration updates the customs status on the shipment in Ongoing WMS to RejectedByCustomsSystem.

Outbound steps

  1. Orders get picked in Ongoing WMS.
  2. The picked orders are then consolidated on a shipment.
  3. As the customs status on the shipment is set to PendingForApproval, a webhook with the shipment ID is triggered.
  4. As the integration receives the webhook it proceeds to get the shipment information from Ongoing WMS, using the API endpoint GetShipmentsByQuery.
  5. When the shipment data has been fetched by the customs system the integration updates the customs status on the shipment in Ongoing WMS to FetchedByCustomsSystem, using the API endpoint UpdateShipment.
  6. If the shipment data gets approved by the customs system, the integration updates the customs status on the shipment in Ongoing WMS to ApprovedByCustomsSystem. Otherwise, if the shipment data gets rejected by the customs system, the integration updates the customs status on the shipment in Ongoing WMS to RejectedByCustomsSystem.

Stock comparison

If you want to keep the customs software's stock balances in sync with Ongoing WMS' stock balances, there are two additional types of transactions to take into account:

  1. Inventory adjustments (that is, manual changes to the stock balances which the warehouse workers make when things get damaged or lost).
  2. Returns (that is, items which the end-customer has sent back to the warehouse).

You will have to keep a running tally (per article) of which inventory adjustments and returns have been made in Ongoing WMS.

To deal with the inventory changes: Make scheduled calls to GetInventoryChanges. Save the inventory changes in the customs software.

To deal with returns: Make scheduled calls to GetOrdersByQuery. Specify LastReturnedFrom in each call. Check the order lines for ReturnedNumberOfItems and summarize the number of returned items for each article.

To make the actual stock comparison, make a call to GetInventoryByQuery. For each article, the physical quantity is available in the field NumberOfItemsDecimal.

In-progress orders and purchase orders

When you make the call to GetInventoryByQuery, there may be orders or purchase orders which have not yet been finalized. That is, there may be orders in Ongoing WMS which are only partially picked, or purchase orders which are only partially received. If you want to take these things into account, you need to compute:

  1. Items may have been picked in Ongoing WMS, but the customs software does not yet know about them because the warehouse has not yet finalized the order, and
  2. Items may have been received in Ongoing WMS, but the customs software does not yet know about them because the warehouse has not yet finalized the inorder.
Once you have computed these two figures, the comparison stock balance can be computed like this:
Comparison-stock-balance = NumberOfitemsDecimal + (1) - (2)

To compute (1), make a call to GetOrdersByQuery and specificy OrderStatusTo = 449 and OrderSpecialFilters.HasPickedArticleItem = true. Then group the returned order lines by article and sum the PickedNumberOfItems for each order line.

To compute (2), make a call to GetInOrdersByQuery and specificy OrderStatusTo = 399 and InOrderSpecialFilters.HasReceivedArticleItem = true. Then group the returned purchsae order lines by article and sum the ReceivedNumberOfItems for each order line.