Welcome to BigLedger Knowledge Center!
Stock Availability API
This API provides the stock availability of products synced from the marketplace. To retrieve stock availability, refer to the Ecomsync Item API. Stock availability is stored in the bl_fi_mst_ecomsync_item_hdr.qty_balance
field.
Stock Availability vs. Stock Balance
Stock Availability: Refers to the stock available for sale to the customer.
Stock Balance: Refers to the stock held by the branch.
When a sales order is created, the stock is deducted from stock availability as it has been reserved for the customer. When a sales invoice is generated, the stock is deducted from the stock balance.
The stock balance is based on multiple branches configured by users in the Organization Applet. Each time a sales order is created, the system updates the stock availability in bl_fi_mst_ecomsync_item_hdr.qty_balance
, where the mkt_guid
(branch/marketplace) is part of the configured branch.
Stock Availability Calculation
For a single item:
Qty_To_Sync_To_Marketplace = Qty_of_System_Stock (from multiple locations) - Qty_of_Open_Sales_order - Qty_buffer_configured
bl_fi_mst_ecomsync_item_hdr.qty_buffer
: This is the configured buffer quantity set in the Organization Applet.Qty_buffer
: This is the extra stock reserved for emergencies or special purposes.
Qty_of_Open_Sales_order
: This value is calculated from thebl_fi_generic_doc_line_open_queue
.
Powered by: Bigledger Sdn Bhd