ERPNext Inventory Optimization - related queries

I’m trying to develop an app on top of ERPNext for Inventory Optimisation (not sure if it already exists but I don’t see it, I see Inventory Management but don’t see the extensive optimisation feature such as store-wise inventory turnover ratio, demand forecasts of each item, EOQ, etc

I’m trying to gather these details:

  • Store id
  • Warehouse id
  • Item SKU
  • Item Inventory Level
  • Sales Quantity
  • Sale Date

I want to understand from where should I take these values and which all doctypes documents should I fetch and how to map the docs from different tables in the db?

DocType Fields Comments
Item item_code Item SKU ?
Item total_projected_qty Projected Qty = Actual Qty + Planned Qty + Requested Qty + Ordered Qty - Reserved Qty - Reserved Qty for Production - Reserved Qty for Subcontracting - Reserved Qty for Production Plan [refer] ; could this be considered as ‘Item Inventory Level’ ?
Sales Invoice Item warehouse Represents in which warehouse the item is located?
Sales Invoice Item qty Sales Quantity?
Sales Invoice posting_date Sale Date?
Sales Invoice total_qty Is this sales of all items’ quantities?
Warehouse name Warehouse id?
Warehouse is_group Should I consider only non-group warehouses?
Store? I don’t see this doctype, which doctype represents a store?

also, how do I map relationships b/w multiple tables/doctypes?

NOTE: I’m new and a noob to ERPNext so any input would be highly appreciated TIA!