Table of Contents

Incoming Documents

In this article, you will learn how to export and process incoming documents between Business Central to Pulpo WMS.

Three types of incoming documents are supported:

  1. Purchase Order
  2. Sales Return Order
  3. Warehouse Receipt

Purchase Order

After items are exported to Pulpo WMS, we can start creating and exporting Purchase Orders so that items can be received to warehouse.

Purchase Orders with Pulpo WMS location in header can't have any other location in order lines. This ensures that all lines are exported to correct warehouse.

Once exported Purchase Order can't be deleted or manually posted for receipt in Business Central. Reopening and editing document is possible until Pulpo WMS starts working on this order.

Mandatory fields for export of Purchase Order:

  • Vendor No.
  • Location Code (Pulpo WMS Location)
  • Promised Receipt Date
  • Inventory Item Lines
    • No.
    • Quantity
    • Line No.
Note

It's recommended that "Default Qty. to Receive" is set to Blank in "Purchase & Payables Setup"

Sales Return Order

Sales Returns can be handled in two ways and both are supported in integration:

  1. Return is unknown to Business Central and is done directly in Pulpo WMS (recommended)
  2. Return is known to Business Central and Sales Return Order is exported to Pulpo WMS

Sales Return from Pulpo WMS

In most cases items are returned to the warehouse without us in Business Central knowing about it beforehand. In that case return is done in Pulpo WMS app without existing Sales Return Order.

The return is done in Pulpo WMS app based on previously shipped Sales Order. Sales Order must be posted in Business Central and Posted Sales Invoice created before return is done.

While receiving items in Pulpo WMS, in case of return, choosing Return Reason should be mandatory. Reason codes from Pulpo WMS represent Code from Return Reason table in Business Central.

Sales Return from Business Central

In case that returns are known before, we can create Sales Return Order from Posted Sales Invoice in Business Central and export it to Pulpo WMS. Export is done as a purchase document with type=return and list of items and quantities that we expect to be returned.

Once exported Sales Return Order can't be deleted or manually posted for receipt in Business Central. Reopening and editing document is possible until Pulpo WMS starts working on this order.

Mandatory fields for export of Sales Return Order:

  • Customer No.
  • Location Code (Pulpo WMS Location)
  • Due Date
  • Pulpo WMS Order ID of original Sales Order
  • Inventory Item Lines
    • No.
    • Quantity
    • Line No.
Note

It's recommended that "Default Qty. to Ship" is set to Blank in "Sales & Receivables Setup"

Warehouse Receipt

Warehouse Receipt is used in combination with Location setup "Require Receipt" and "Export Document Type" from Setup is Receipt. Warehouse Receipt should be created per order in Business Central.

Only Warehouse Receipts created from Purchase Order or Sales Return Order can be exported to Pulpo WMS. Change of status in Warehouse Receipt, updates status in connected Purchase Order or Sales Return Order.

Same rules in export apply as for Purchase and Sales Return Orders.

Export

Two ways of exports are supported:

  • Batch export: export of all released, not yet exported incoming documents
  • Single export: export of single incoming document via action on order page

Batch exports are done to POST /reception/bulk/purchase_orders Pulpo WMS API, while single export is done to POST /reception/purchase_orders API. When document is successfully exported, Pulpo WMS ID is saved in header tables. If document is already exported, update can be done by calling PUT /reception/purchase_orders/%1 Pulpo WMS API.

After each API call is done, new entry is saved in Request Log table with type Purchase Document or Sales Return Document. In case of errors or incomplete data, result will be saved in this log.

Statuses

Possible statuses of incoming documents:

  1. Sent: document is successfully exported and it's in status Queue in Pulpo WMS. During this status it’s possible to edit document and send update to Pulpo WMS via action on pages.
  2. In Progress: warehouse employee in Pulpo WMS app has started processing this document. No further document changes are allowed in Business Central
  3. Partially Received: warehouse employee in Pulpo WMS app has finished processing this document, but not all items from document have been received. Status of document in Pulpo WMS is Partially Finished. Other items can be received later.
  4. Received: warehouse employee in Pulpo WMS app has finished processing this document and all items from document have been received.
  5. Deleted: document has been deleted from Pulpo WMS app. Delete should be done in Business Central via action on pages.

Webhooks

When incoming document is being processed in Pulpo WMS app, we need to know that in Business Central. For that, Pulpo WMS webhook used is:

  • incoming_good_created

Incoming Good Created

When warehouse employee finishes receiving items from incoming document in Pulpo WMS, incoming_good_created webhook message is sent to Business Central via Azure Service Bus.

Webhook Message is saved to Pulpo WMS Webhook Message table and from there is parsed and saved to Pulpo WMS Closing table. Document Type of webhook message is either purchase_order, return or warehouse_movement. Closing Lines contain list of received items and their quantities.

After Closing Line is inserted, if there are no errors:

  • Status of document is changed to In Progress
  • "Qty. to Receive" in document line is updated to quantity from webhook message
  • Closing is further processed by job queue:
    • In case of return, new Sales Return Order is created from Posted Sales Invoice if return was done directly from Pulpo WMS and if needed, Warehouse Receipt is created
    • Incoming Document is posted for Receipt
    • Status is changed to Partially Received or Received
    • Closing is marked as processed

Next step

Outgoing Documents