Skip to content

Wholety operations guides

AI inventory management: check stock and draft a purchase order

GLASS-CUP becomes GCP-12: a worked example checks zero stock, reviews 48 cases at USD 12.50 and saves an authorized draft without approving or receiving it.

AI inventory management is useful when an Agent can read the inventory records behind an answer and prepare a business action you can check. For a small business that wants its own AI Agent to operate ERP, a practical first task is to resolve a supplier's item code, check stock and outstanding purchases, then save a purchase draft with the quantities and prices you authorize. This guide uses a wholesale purchase to show the workflow from request to saved record.

Wholety lets your own Agent do this through MCP. The Agent supplies the reasoning; Wholety supplies business records, available operations and the checks that apply when saving them. A saved draft is the first purchasing step. Approval, ordering, physical receiving and payment remain separate actions.

A worked sample: 48 cases of glass cups

This is an illustrative sample, not a customer case study or a claim about time saved. Assume the team has checked the following records and agreed to buy 48 cases from the sample supplier, Northstar Homeware.

Field to review Sample value Why it matters
Supplier and supplier item code Northstar Homeware / GLASS-CUP A supplier code belongs to that supplier, not every partner.
Internal SKU GCP-12 The purchase must reference the verified product.
Inventory unit and packaging Case, containing 12 cups 48 cases is different from 48 individual cups.
Physical stock / available stock 0 cases / 0 cases Stock must come from the selected SKU and warehouse scope.
Outstanding inbound quantity 0 cases in this sample An existing purchase could already cover the need.
Authorized purchase quantity 48 cases Zero stock alone does not determine how much to buy.
Supplier quote USD 12.50 per case Preserve the quote currency and reviewed exchange settings.
Quoted goods amount 48 × USD 12.50 = USD 600.00 Freight, tax, discounts and currency conversion need separate review.
Result to create Purchase draft, status 0 Saving it does not approve, receive or pay for the goods.

The packaging count describes the case. It does not turn a per-case price into a per-cup price or multiply the purchase amount by 12 again. See the supplier SKU mapping guide before working with ambiguous product codes.

USD 600.00 here is the supplier's quoted goods amount. Wholety's accounting amounts use CAD, with recorded foreign-currency prices and exchange rates where applicable. Review the actual conversion and saved CAD amount separately; do not label a CAD ledger value as USD or infer an exchange rate from this sample. The purchase manual explains order pricing and the distinction between goods payable and freight costs.

1. Connect the Agent to the right workspace

Start with a Wholety account containing the actual supplier, internal SKU, supplier-code correspondence and warehouse records. If those records are still in spreadsheets or an old system, use the Agent migration workflow to map and check them first. A stock answer is only as useful as the records already entered.

Register or sign in, open the dashboard's Account & Agents connection card, and copy its prepared connection prompt to your own Agent. The Agent identifies the actual client, installs the Wholety Skill, configures MCP and verifies the expected account. Follow the connection steps for the supported setup route.

Have the Agent call wholety_account and compare the returned account with the workspace you intended. A configuration file saved on disk is not proof that a live connection works. If the client needs an MCP refresh or a new session, complete that step and verify the account before querying business records.

The prepared dashboard connection includes business read and write access. A manually created key defaults to read-only. Use a read-only key if the first task is only to inspect stock; saving a draft requires write access. Account administration has a separate manage scope and is unnecessary for this stock-and-draft task. Keep the connection prompt private because it contains a credential. Read the permissions manual for workspace and member access.

2. Resolve the item before checking quantities

Ask the Agent to find Northstar Homeware and its GLASS-CUP correspondence. It should read the saved supplier mapping and identify GCP-12, rather than choose a product because its description contains “glass.” Check that the SKU is active and that its inventory unit is a case.

The Agent uses wholety_list_operations to discover relevant operations, then wholety_describe_operation to read the current parameters, response fields and required scope before calling them with wholety_call_operation. Useful search keywords include suppliers, sku-code-maps, product-skus, product-stocks and supplier-orders. Follow pagination when the catalogue or a result spans several pages.

The live operation contract is the source for request fields and state constraints. Do not guess an endpoint, substitute an unrelated SKU or assume a write exists because a similar screen exists.

If two suppliers use the same code, query the selected supplier's mapping. If a mapping is missing or points to an inactive SKU, resolve the identity with the team before creating an order. A plausible name is insufficient evidence for a purchase.

3. Read stock and inbound orders together

Have the Agent report physical stock, available stock, the warehouse scope and the time of the read. Reservations and locked quantities can make available stock lower than the quantity on the shelf. The available versus on-hand stock guide explains those differences; the warehouse manual connects them to actual stock movements.

Next check outstanding purchase lines and shipping or receiving progress for the same SKU. An unreceived purchase is inbound intention, not warehouse stock. Avoid counting a completed receipt both as existing stock and as outstanding inbound quantity.

In this sample, verified stock and inbound quantity are both zero. The team has separately authorized 48 cases. For a real replenishment decision, also review sales history, supplier lead time, minimum order quantities and the period you want to cover. Wholety's purchase recommendation calculation is a planning input: it does not automatically subtract stock and inbound quantity to produce a net replenishment gap, and reading it does not place an order.

4. Review the draft fields and authorize the save

Before writing, the proposed action should identify the supplier, internal SKU and product ID, supplier code, inventory unit, quantity, quoted unit price and currency, reviewed exchange rate, discounts and intended draft state. Include the source quote or its reference when available. Use the real record IDs returned by Wholety.

A useful first instruction to your Agent is:

Check Northstar Homeware's GLASS-CUP mapping and the stock and outstanding inbound orders for the matching SKU. Show the sources and warehouse scope. Prepare a proposal for 48 cases at the reviewed supplier quote of USD 12.50 per case. Show the quote currency and the saved CAD pricing basis separately. Wait for my authorization before saving. Do not approve the purchase, receive goods or record payment.

Once the reviewed proposal is correct, authorize saving that purchase draft. If your original instruction already authorizes the same draft with complete fields, the Agent can use that authorization. Additional approval is needed when the action or its consequences change.

The Agent should discover and describe the current draft-creation and line-saving operations before executing them. Preserve a fixed UUID v4 creation_key and the original request for this creation intent. A read-only connection cannot save the draft; obtain the intended business write access instead of attempting a different route around the restriction.

5. Verify the saved record in Wholety

A successful request is not enough. The Agent should check the business response, read the created order and its saved product lines, and return the real purchase ID for you to open in Wholety.

For this sample, review Northstar Homeware, GCP-12, 48 cases, the USD 12.50 source quote, USD 600.00 quoted goods amount, the reviewed currency conversion and the actual saved purchase amounts. Verify that the purchase remains a draft and that no receipt or payment was created by this task. The stock should still be zero until a separate physical receiving operation records goods actually received.

If a creation request times out, the result is unknown. Look up the original creation reference before retrying. Reuse the same reference and original request only according to the current recovery contract; do not send a new creation request just because the first response was lost. The purchase order workflow guide follows the later approval, partial-receipt and settlement steps.

When the Agent should stop

Situation Correct next step
Wrong connected account Stop business work and correct the connection; verify the account again.
Supplier code, SKU or case size does not match Read the source mapping and product details; resolve the mismatch before saving.
Stock read fails or inbound results are incomplete Report the missing evidence; do not turn unknown quantities into zero.
Quoted price, currency or exchange rate is unreviewed Keep a proposal for review; do not invent a price or rate.
Key is expired, revoked or unauthorized Restore valid access with the account owner; do not bypass the restriction.
A read-only key is asked to save Use authorized write access or return the proposed draft without saving.
A record changed or a quota blocks the operation Read the current record or account usage and resolve the conflict before retrying.
The save response is lost Query the original creation reference and inspect the actual record before any retry.

Keep a spreadsheet, or move the workflow into ERP?

A spreadsheet can be enough for a small stock list when one person maintains it, updates are infrequent and staff can reliably reconcile purchases and sales. Your Agent can help review that sheet, but an answer based on yesterday's export cannot establish today's warehouse quantity.

Use a connected ERP when several people change orders, inventory is reserved across customers, receipts arrive in parts or purchasing and finance need to reconcile the same records. The benefit is that the Agent and your team use the same saved business state, with permissions and a record you can reopen. Continue using spreadsheets for planning and exports where they help, and preserve a clear boundary between a proposed quantity and an actual stock movement.

Common questions

Can an AI Agent manage wholesale inventory?

It can inspect stock, identify the records behind a discrepancy and prepare authorized business actions when the system exposes those operations. Reliable use requires correct SKU and unit mapping, current data, appropriate permissions and verification of each saved result.

Does zero stock mean the Agent should automatically buy 48 cases?

No. In this sample, 48 cases is the team's purchasing instruction. Zero stock alone supplies neither a demand forecast nor a supplier commitment. Read existing inbound orders and the other planning inputs before choosing a quantity.

Is a purchase draft the same as receiving inventory?

No. A draft records a purchasing intention. Approval and ordering advance the purchase; warehouse receiving records the actual goods accepted. Saving this draft should not change physical stock.

Do I need a managed AI service to use this workflow?

Your own Agent can use Wholety's existing MCP business operations with authorized access. Managed AI analysis and proactive purchasing services are still being built. This guide describes an Agent you connect and a draft you authorize, without promising autonomous purchasing.

What should I try first?

Create a free workspace, check one supplier-to-SKU mapping and ask your Agent for a read-only stock report. Compare it with the Wholety interface. Then use the connection guide to save one reviewed purchase draft. Read what an MCP server is if you want to understand the tools connecting your Agent to ERP records.