Stock Availability API
This api to get stock availability of the product which synced from marketplace. To get stock availability, you may refer to Ecomsync Item Api([h4_system_integrators_ecomsync_item_api]). The stock availability is stored in bl_fi_mst_ecomsync_item_hdr.qty_balance.
The different between stock availability and stock balance is stock availability is the stock which can be sold to customer while stock balance is the stock which exist/hold by the branch. Meaning if the stock has been ordered(sales order created), the stock will be deducted from stock availability as it is already booked for the customer. Once sales invoice created, the stock will also be deducted from stock balance.
The stock balance is obtained from multiple branches which will be configured by users in organization applet.Based on this selection of branches, everytime the sales order created, the system will updated the stock availability in bl_fi_mst_ecomsync_item_hdr.qty_balance where the mkt_guid(branch/marketplace) part of branch that are configured.
The calculation of stock availability as followed
-
Single item
-
Qty_To_Sync_To_Marketplace = Qty_of_System_Stock(multiple locations) - Qty_of_Open_Sales_order - Qty_buffer_configured
-
bl_fi_mst_ecomsync_item_hdr.qty_buffer = Qty_buffer_configured → this figure is set in the organization applet
-
qty_buffer is the total stock that will be held from included in stock availability. The purpose is ensured there are extra stock in case of emergency or reserved for specific reason.
-
-
Qty_of_Open_Sales_order is calculated from bl_fi_generic_doc_line_open_queue
-
-