LearnGrok
Workflows
WorkflowIntermediateBuilding on the API

Stock discrepancy investigation for sign-off

Create a sign-off pack from counts, delivery records and adjustment notes. For warehouse managers reviewing stock discrepancies.

7 min read

Use this workflow to turn a stock discrepancy into a short investigation summary that an approver can act on. It is for warehouse and operations managers who need evidence, probable causes and clear next checks before a stock adjustment is approved.

The result is a decision document, not an automatic instruction to amend stock. The person with approval authority decides whether the proposed adjustment should proceed.

Key point

Build an evidence trail

Every figure in the summary needs a source document, a date and an item or location reference. If you cannot trace it, label it unverified.

1. Open an investigation record

Create one investigation record for each discrepancy, or for one clearly related group of discrepancies. Do not combine unrelated SKUs just because they appeared in the same count.

Record these fields before reviewing the evidence:

  • Investigation ID: use your site’s existing reference format.
  • SKU and description: include unit of measure, pack size and any variant.
  • Location: name the warehouse, zone, aisle, bay and bin where relevant.
  • Discrepancy: state the system quantity, physical count, difference and count date.
  • Operational impact: note open orders, blocked picking, replenishment risk or customer impact.
  • Owner and due date: name the person collecting evidence and the date for the decision.
  • Adjustment status: set this to pending investigation until the review is complete.

Keep the scope narrow. If the count was performed across several locations, identify whether the discrepancy belongs to one location, one movement or the whole SKU balance.

Watch out

Do not start with the adjustment note

An adjustment note explains a proposed correction. It does not prove that the correction is right. Compare the physical count and transaction history first.

2. Assemble the evidence set

Collect documents for the same SKU, location and investigation period. Use a period that starts before the last known correct balance and ends at the latest recount or review point.

Prepare these inputs:

  1. Inventory count records: the original count sheet or device export, recounts, counter names, count times and location references.
  2. Delivery records: purchase order, delivery note, goods-received record, quantity received, date and any shortage or damage notation.
  3. Inventory movement records: picks, replenishments, transfers, returns, production consumption or other movements relevant to the item.
  4. Adjustment notes: reason code, proposed quantity, author, date, approver and supporting explanation.
  5. Exception records: damaged stock, quarantined stock, write-offs, relabelling, cancelled receipts or system outages.

Rename files so their purpose is obvious, for example SKU-1842_count_12-May or SKU-1842_GRN_4581. Do not alter the original records. If a document is incomplete, add it to an evidence gap list rather than filling in missing facts yourself.

If you use the model to read files, provide the records in a controlled batch and ask it to preserve document references. File handling and available features can vary, so check the current guidance in the xAI documentation overview before loading operational records.

3. Reconcile the quantities in a working table

Create a reconciliation table outside the narrative summary. Start with the last balance you can support, then apply each evidenced movement in date and time order.

Field What to enter Check before moving on
Opening balance Last confirmed system and physical balance The date and location are known
Receipts Quantity accepted into the stated location Delivery note and receipt record agree, or difference is noted
Issues and transfers Picked, moved, returned or consumed quantity Movement direction is clear
Adjustments Each prior adjustment separately Reason code and approval are recorded
Closing expected balance Opening balance plus and minus movements Calculation can be reproduced
Physical balance Latest count or recount Counter, time and bin are stated
Variance Expected balance minus physical balance Unit of measure matches throughout

Use the model for the repetitive comparison, not for deciding what happened. Give it a table with document IDs and ask it to identify conflicts, missing links and arithmetic differences.

Use this prompt:

Review the evidence table below for SKU [SKU] at [location].

1. Recalculate the expected closing balance from the listed movements.
2. Compare it with each physical count.
3. List every conflict, missing document and duplicate movement.
4. Separate facts from possible explanations.
5. For each possible explanation, name the evidence that would confirm or disprove it.

Do not assume a quantity, date or transaction direction that is not stated. Cite the document ID beside each finding.

Check

The reconciliation is ready

A colleague can start at the opening balance, follow every row and reach the same variance without asking what a number means.

4. Write probable causes as testable statements

Group the findings into a small number of possible causes. Do not write a long list of generic warehouse errors. Each cause must explain the observed variance and lead to a specific next check.

Common categories include:

  • Receipt recorded before the stock was physically put away.
  • Quantity received differs from the quantity recorded.
  • Stock transferred, picked or returned without the matching system movement.
  • Stock counted in the wrong bin, unit of measure or pack configuration.
  • Duplicate movement or duplicate adjustment posted.
  • Damaged, quarantined or relabelled stock excluded from one record but included in another.

For each cause, write four parts:

  1. Statement: for example, The receipt may have been posted twice.
  2. Evidence for: name the two receipt records, duplicate reference or timing pattern.
  3. Evidence against: state what does not fit the explanation.
  4. Next check: name the record, system screen or physical location to inspect, and who owns it.

Rank causes as most likely, possible or unlikely. This is a working judgement, not a fact. If the evidence supports more than one cause, say so.

5. Produce the sign-off summary

Keep the final document to one or two pages, with the reconciliation table attached. Use this order:

  1. Decision requested: state whether you seek approval to adjust, reject an adjustment, or hold the item pending further checks.
  2. Discrepancy: SKU, location, period, expected quantity, physical quantity and variance.
  3. Evidence reviewed: list the document IDs and identify missing records.
  4. Findings: state confirmed facts first, then probable causes.
  5. Proposed action: specify the adjustment quantity and direction only if the evidence supports it.
  6. Next checks: name the owner, action and due date for unresolved causes.
  7. Approval record: leave space for approver, decision, date and any conditions.

Use careful wording. Write evidence supports an adjustment of 12 units rather than 12 units were definitely lost unless you can prove the latter.

Note

Separate correction from prevention

The stock adjustment corrects a recorded balance. The follow-up action fixes the process that allowed the discrepancy. Record both, but do not treat one as proof of the other.

6. Check the summary before handover

Read the completed pack against the original records. Check these points:

  • Every quantity uses the same unit of measure.
  • Every date has a clear source and time zone where timing matters.
  • The final variance matches the working reconciliation table.
  • The proposed adjustment matches the stated direction of the variance.
  • Each finding cites a document ID or is labelled as an inference.
  • Missing evidence is visible to the approver.
  • Each next check has an owner and deadline.

The output is wrong if it reaches a definite cause from a missing record, changes a quantity during summarising, or treats an adjustment note as independent evidence. It is also wrong if the physical count is from a different bin, pack size or date than the expected balance. Return to the reconciliation table when any of these conditions appear.

Check

The handover is complete

An approver can see the requested decision, reproduce the variance and identify what remains uncertain without reading every source file.

When the workflow does not work

Stop the approval request if the opening balance cannot be supported, the count cannot be tied to a location, or key receipt or movement records are missing. Mark the adjustment as on hold and assign the missing evidence to a named owner.

If the records conflict, arrange a controlled recount and review the transaction sequence with the relevant warehouse and inventory-control staff. If the model produces an uncited finding, ignore that finding and ask again using only a numbered evidence table. Do not let a fluent summary replace the underlying records.

Quick question about the API?

Short answers from the API pages here, with the page itself one tap below. Limits, models and prices go to xAI’s documentation, because those change and this does not chase them.

Last checked against xAI’s own pages on 2026-08-21. Grok changes quickly; anything version-specific should be confirmed upstream before you rely on it.

More in Building on the API

Found something out of date?

Grok changes quickly and this page is a snapshot. If something here is wrong, or you know a better resource, send it over.

Suggest a link →

Advertise on LearnGrok

$420.69one-time, for a 30-day run

Square works best. PNG, JPEG or WebP, up to 2 MB.

Stripe on the next step. Live once approved.