02-347-7730  |  Saeree ERP - Complete ERP System for Thai Businesses Contact Us

Using ChatGPT to investigate stock count variances

  • Home
  • Articles
  • Using ChatGPT to investigate stock count variances
Using ChatGPT to investigate stock count variances
  • 01
  • December

At the 5 p.m. close, a count sheet shows 92 filters on shelf A. The system shows 100. The warehouse lead wants to know where to send someone first. ChatGPT can compare the two spreadsheets and produce a list for follow-up when the team defines which records belong together, when each balance was measured, and which rows still need evidence.

In one line: Compare physical and book quantities at the same cutoff, set incomplete records aside, and keep the source rows for each variance. That gives the count supervisor a useful list of recounts, transfer checks and questions for accounting.

What ChatGPT can do with count files

OpenAI’s Data Analysis guide explains that ChatGPT can work with Excel and CSV (comma-separated values) files, group records, calculate quantities and return a table. For some tasks it runs Python, and you can inspect the method used. Availability depends on the account, model and workspace settings. Attach the files in a chat approved by your organisation. First ask which sheets it read and how many records it found. If you split a large workbook by warehouse, keep the original row references.

In a stock discrepancy investigation, “find the missing goods” skips several decisions. A spreadsheet can establish the difference between two quantities. A visit to the staging area, a pending issue slip or a recount establishes what happened to the goods. The examples below use invented records so you can check the arithmetic and try the instructions before sharing any real report.

Prepare files with a clear meaning for each row

Export an enterprise resource planning (ERP) balance for the agreed cutoff. Keep the extract time as well as the time the balance represents. The second file contains the count accepted by the supervisor. Mark first counts and recounts before comparing anything. Adding a first count to its replacement would double-count the same shelf even if both entries were individually correct.

What to keepExample fieldsDecision those fields support
Item identityItem code, warehouse, bin, tracked lotMatch at a level available in both files.
Quantity and unitBook 100 pieces, physical 92 piecesCompare like units or use an approved conversion for that item.
Time boundaryBook balance at 17:00, actual count timeIdentify receipts, issues and transfers between those times.
TraceabilityFile, sheet, count sheet ID and lineLet the counter retrieve the exact entry used.
Count statusCounted, uncounted, recount pendingDistinguish a confirmed zero from a blank cell.

Preserve identifiers such as 0017 as text and ask to see original and cleaned values side by side. If warehouse A treats 0017 and 17 as separate items, dropping leading zeros merges two products. Descriptions help a reader recognise a product, but they make poor matching keys. A counter may abbreviate “small filter” without creating a new item. Leave a disputed match open until someone verifies the item code.

If the balance covers an entire warehouse but count sheets list individual bins, confirm all bins were counted before rolling them up. One shelf cannot explain a building-wide balance. Where both files distinguish bins, preserve that detail. Equal shortages and surpluses at two locations give a warehouse lead a place to look. For context on location records, see the warehouse management guide.

Before combining count lines, establish whether they cover separate areas or repeat the same spot. Keep ambiguous records for the supervisor. A later timestamp alone does not tell you whether a recount was accepted.

Work through a count you can verify by hand

Assume movements were paused before the count and the listed locations were inspected. All entries are in pieces except the P30 count in boxes. Define variance as physical quantity minus book quantity. A negative value means the physical count is lower. Short references keep the example readable. In a working file, retain the row references for both inputs and archive the versions that supplied them.

Item / binBookPhysicalCalculated varianceEvidence or next check
F10 / A100 pieces92 pieces−8 piecesCount C01, line 1. Recount bin A.
F10 / B40 pieces48 pieces+8 piecesCount C01, line 2. Check alongside bin A.
P30 / A24 pieces2 boxesConversion pendingCount C02, line 1. Obtain packing details.
R20 / C5 pieces0 pieces, confirmed−5 piecesCount C03, line 1. Check staging and issue slips.
K40 / C7 piecesBlankCount pendingCount C03, line 2. No accepted quantity yet.

For F10, the book total across the two bins is 140 pieces and the count total is also 140. Yet a picker sent to A for 100 pieces would be eight short. Keep the −8 and +8 lines even though the item total matches. Start with the bin labels and transfer paperwork. The two differences might reflect an unrecorded move or a counting boundary error. Until evidence arrives, record exactly what the numbers establish: equal and opposite differences in two bins.

For P30, check the packing record for the item and version on the shelf. If it confirms 12 pieces per box and both boxes are full, two boxes contain 24 pieces and the variance is zero. An open box needs its contents counted individually. Twelve is an assumption to test in this example. Applying an old supplier’s pack size to a replacement carton could make a real shortage disappear on paper.

Three requests from intake to follow-up

Name the files, versions and cutoff in the first message. OpenAI recommends descriptive first-row headers and a single record on each row. Separate totals and long notes from the data. If you attach a workbook rather than an extract, name the sheets to analyse. This prevents a summary tab from being added to the underlying transactions a second time.

StageRequest to adaptCheck before continuing
InspectRead the balance and count sheets only. Show row counts, headers and example raw IDs. Identify blanks, duplicate keys and unmatched units.Compare row counts to the originals. Check identifiers with leading zeros.
CalculateMatch item, warehouse, bin and tracked lot where the two inputs support that level. Keep rows found on only one side. Calculate physical minus book only for comparable units and cutoffs.Pending rows should show an explanation and an empty variance, rather than a numeric zero.
Assign follow-upReturn source references, both balances, variance, status, an open question and the document to inspect. Clearly label proposed explanations.Open sample rows yourself. Ask for the calculation method and, if Python was used, inspect grouping and missing-value handling.

After matching, ask how many source rows on each side were used, unmatched or held for review. Several count lines may contribute to one comparison, so keep input-row counts distinct from comparable groups. If quantities grow after matching, see whether the key repeats in both inputs. Pairing each row on one side with every row on the other can multiply legitimate source quantities.

Verify one match, one discrepancy and one pending row yourself. Recalculate each from its sources. If normal rows agree but blanks turn into zeros, correct the method and rerun the full set.

When counting during operations, agree which time to compare

In a separate example, staff count 92 F10 units at 16:30. Eight units arrive before the 17:00 cutoff. A receipt confirms the same item and bin, physical arrival after the count, and inclusion in the 17:00 book balance. Assuming there were no other receipts, issues or transfers between the count and cutoff, roll the count forward to 92 + 8 = 100, then compare with the book balance of 100. Keep the observed 92 separate from the derived 100. If actual receipt time is unknown, leave the timing difference open.

Read physical movement time alongside document entry time. A receipt keyed in the evening could refer to goods already present when the count began. Adding it to the count would double-count those goods. Ask for each movement used in the time adjustment, its document ID and direction. If the receiving bin is unknown, keep it open rather than spreading the quantity over bins. The goods receipt guide provides useful context for the receiving team.

Turn the exception table into work the warehouse can complete

ObservationQuestion for the ownerEvidence to close it
Opposite differences in two binsDo the labels and a transfer record confirm a move?Transfer reference or accepted recounts for both bins.
Signed count of zeroAre units in staging, or is an issue awaiting posting?Area check and a document matching the item, bin and time.
Count line without a book rowIs this a new item, a miscoded count, or an incomplete extract?Item master check and confirmation of the export scope.
Quantity or conversion unconfirmedWho can confirm the accepted count or current pack size?Approved count or item-specific purchasing and storage units.

A warehouse lead might prioritise F10 because a pick is waiting. Accounting might start with R20 because it affects a period-close review. To rank by value, ask accounting for the applicable unit cost, currency and effective date, then multiply each verified variance by its unit cost. Keep the signed value to distinguish shortages from surpluses. Within each currency, sort by absolute variance value, largest first. Leave unpriced items on a separate list. Ranking raw quantities alone can hide one missing high-value component below many low-value pieces.

Before handover, attach a review date, owner, next action and document reference to each exception. For a recount, keep the original and replacement references and identify who accepted the revision. Tomorrow’s team should be able to explain why the quantity changed without reading the entire chat. See also how to verify an AI-generated answer.

Before upload, remove fields the investigation does not need, such as supplier names, phone numbers, signatures and unit costs when reviewing quantities only. Check hidden sheets too. Use the account and workspace approved for this data.

Keep Saeree ERP records and investigation evidence in their proper places

In this workflow, an authorised user prepares a stock balance report and supporting documents from Saeree ERP and shares the necessary copies for analysis. ChatGPT works with the supplied files. This file-based exercise has no direct database connection or automatic write-back to Saeree ERP. Where an adjustment is required, the count supervisor accepts the count, accounting checks the documents, and an authorised approver signs off before an authorised user posts the adjustment under the organisation’s procedures.

Conclusion

Start with one warehouse, one cutoff and records your team can check by hand. Expand to another warehouse once the count, book balance and movement records reconcile. A useful handover tells the next person how far a line differs, where the evidence lives and who can resolve the open question. Keep unresolved rows visible until that evidence arrives.

The total for F10 reconciles. But a picker at bin A still needs eight more units. A useful count report keeps that question visible.

References

OpenAI documentation checked on 1 December 2026. All count records and quantities in the examples are hypothetical.

Considering ChatGPT for your inventory team?

Tell us how many people will use ChatGPT and which files they need to analyse so we can prepare a quotation for your team.

Request a ChatGPT quotation
Saeree ERP Author

About the Author

Paitoon Butri

Network & Server Security Specialist, Grand Linux Solution Co., Ltd.