Combine stock records, open orders, and a clear replenishment rule to prepare a list a purchasing teammate can check.
It is Monday morning, and a store manager wants to know which items need replenishment. One report shows stock on hand. Another lists units reserved for existing orders. A third contains purchases already on the way.
Looking at the stock report alone can lead to the wrong decision. An item with 24 units on the shelf may have six already reserved. But ordering the entire shortfall without checking the 12 units already due to arrive can create a duplicate purchase.
A useful assistant can bring those records together, apply an agreed rule, and prepare a review list. It should show where the numbers came from and flag missing details. A person still decides whether, when, and how much to buy.
The scenario below is fictional. It describes a workflow you can configure and test around ZGI, not a built-in inventory integration or an automatic purchasing feature.
Start with one warehouse and a small set of items
For the first run, choose one warehouse and a handful of SKUs. For each SKU, provide the stock on hand, units reserved, qualifying units on order, reorder point, target stock level, and the time the records were last updated.
Also provide a review horizon: the date by which an incoming order must be expected before it counts in this particular calculation. Include only orders your team has agreed to count, such as confirmed orders expected within that horizon. If a delivery date or order status is unknown, flag it for review instead of quietly assuming the stock will arrive.
Make the units consistent. A record measured in cases cannot be added directly to one measured in individual pieces. Check the source definitions too: if the stock field already excludes reserved units, subtracting them again will understate availability.
Identify each line by both SKU and warehouse. The same SKU in another warehouse is a separate decision unless your team has explicitly chosen a transfer rule. Remove duplicates and check whether a receipt has already been included in stock on hand before counting the corresponding order as still incoming.
Set up the data and the question in ZGI
ZGI's public product information describes a workspace for agents, workflows, knowledge, models, and governed queries over business databases. For this task, the starting point is a read-only view of the stock and purchase-order information that the purchasing team is authorized to inspect.
If your deployment has a configured database connection, select the relevant approved data and give the agent or workflow access to the fields needed for this review. Use a read-only account and restrict its scope to the intended warehouse and records. If the data is not connected, begin with a reviewed export using the input method available in your deployment.
Configure an agent with an available model and instructions for this specific report. You can also attach an approved glossary or purchasing policy as a knowledge source so the team can explain what its fields and rules mean. The policy is context; the stock figures still need to come from the current authorized records.
Ask a bounded question: “For warehouse A and the selected SKUs, prepare a reorder review list using the approved reorder points, target levels, and incoming-order horizon.” Include the data cutoff and request the source fields beside each calculation.
Product reference: https://zgi.ai
Make the rule visible before calculating
For this example, assume stock on hand includes reserved units. Define an inventory position as stock on hand minus reserved units, plus qualifying units on order. Compare that position with the approved reorder point. If the position is at or below the reorder point, calculate the quantity needed to reach the target level.
The arithmetic is simple:
- Inventory position = stock on hand − reserved units + qualifying units on order.
- Review for reorder when the inventory position is at or below the reorder point.
- Suggested quantity to reach target = target level − inventory position, with a minimum of zero.
These are example business rules, not default ZGI behavior or a universal purchasing formula. A real team may use a different definition, lead-time policy, minimum order quantity, or service-level target. Validate the rules with the people responsible for inventory before using the output.
Incoming stock is not the same as stock available today. Even when an order qualifies for the review calculation, a manager may need to check whether the expected arrival is soon enough for existing demand.
Walk through one fictional SKU
Suppose warehouse A has 24 units on hand, six reserved, and a confirmed order of 12 units expected within the review horizon. Its approved reorder point is 35 units and its target level is 50 units.
The inventory position is 24 − 6 + 12 = 30 units. Because 30 is below the reorder point of 35, the item enters the review list. The quantity needed to reach the target is 50 − 30 = 20 units.
A useful output makes the calculation easy to inspect:
SKU and location: Example SKU, warehouse A.
Position: 30 units, based on 24 on hand, six reserved, and 12 qualifying incoming units.
Review reason: Position is below the approved reorder point of 35.
Suggested quantity to reach target: 20 units, subject to purchasing review.
Check before ordering: Confirm the incoming order remains open, its arrival is timely, and any pack-size or minimum-order requirements are met.
If the incoming order is missing an expected arrival date, do not treat the number 20 as a reliable suggestion. Show the incomplete record and ask the purchasing owner to verify it.
Review the list before placing any order
A repeatable flow can stay small: select the SKUs, read the stock and order records, apply the approved rules, review the exceptions, and prepare the purchasing list.
For each item, the reviewer should check the source timestamp, warehouse, units, outstanding order status, and calculations. They should also inspect exceptions: missing targets, negative stock, inconsistent units, and orders with uncertain arrival dates. Do not turn an unknown value into zero simply to make a row look complete.
The technical division of work matters. Database access supplies records; the business rule defines which numbers to combine; the model helps interpret the request and present the result. Arithmetic and data filters should be checked with an appropriate deterministic calculation or query, and the reviewer should inspect any generated query and its results.
ZGI's public repository describes database access and executable workflows among its capabilities. The particular data mapping, calculation, exception handling, and review process in this example must be implemented and tested for the deployment. A prompt by itself does not guarantee correct arithmetic or enforce read-only permissions.
Implementation reference: https://github.com/zgiai/zgi
Test a few cases before using real purchasing data
Use synthetic examples with expected results first. Include a SKU with no incoming orders, an order expected after the horizon, a receipt already included in stock, the same SKU in two warehouses, and a missing reorder point.
Check that an item above its reorder point is not marked for review under this rule. Check that a missing value produces an exception rather than a confident quantity. If a result includes data from the wrong warehouse, stop and correct the access or query before expanding the workflow.
Start with a small reviewed list. Once the numbers and explanations match the approved rules, the purchasing team can decide how to use the output in its existing process.


Top comments (1)
Implementation reference: github.com/zgiai/zgi