Incomplete Lot Codes and Mixed Recipes: Exception Handling for Pet Food Agents
A tracing job that knows when to stop: partial codes and split shipments stay as candidates, and quality sees exactly which fact would close each branch.
- Author
- Ignacio Malpartida · GTM Engineer
- Published
- Read time
- 5 min read
The operating decision
Pet-food tracing agents need explicit stop conditions for incomplete lot codes, mixed recipes, and missing shipment associations. Keep candidate matches separate from confirmed links and preserve the original customer evidence. A useful exception result identifies the exact missing fact and responsible owner without claiming traceability that the records do not support.
Explore the complete pet food and treats integration and automation hub for the systems and processes around this guide.

What this looks like in pet food and treats
A photo shows only the final characters of a bag code, and the customer bought a variety pack shipped in two parcels. Several production lots are plausible. The agent can identify the order and candidate products, but it needs clearer packaging evidence or an authoritative fulfillment link before associating the complaint with a lot.
Records, ownership, and update rules
| Record | Owner | Operating rule |
|---|---|---|
| Partial code evidence | Support | Preserve the original image or text and extracted characters without silently filling gaps. |
| Candidate product | Operations | List plausible recipe and package identities with the evidence supporting each. |
| Lot-match decision | Quality owner | Confirm the authoritative relationship or document that the match remains unresolved. |
| Resumed trace | Case reviewer | Review new evidence and retain the prior ambiguity and decision history. |

Work through the process
- 01Distinguish extraction from identityIf a verified OCR action is used, treat the output as candidate text. Character recognition does not establish the product, batch, or shipment relationship.
- 02Track alternative pathsList which recipes and parcels could be involved and why. Keep each candidate’s missing evidence visible instead of ranking one as confirmed because it seems most likely.
- 03Ask a precise follow-upRequest the complete code, exact package photo, or authoritative warehouse reference needed to resolve the branch. Preserve the customer’s original account and avoid suggesting a code that may bias the response.
- 04Revalidate after new evidenceConfirm that the new record belongs to the same product and shipment. Update the trace packet with what changed and keep any remaining uncertainty visible to quality.
- 05Send a code from the wrong recipe and confirm the match is refusedUse a Zendesk ticket with a photo of a bag code that belongs to a recipe the customer did not buy. Run the Genie and check the trace row in Postgres. The extracted characters should appear as candidate text, and the lot field should read rejected because the code resolves in NetSuite to a product absent from the order. The row must list what would settle it, full code or warehouse reference, and name quality as the owner. In the reviewer view, every unresolved link must show its required evidence. A match accepted on character similarity alone, or an open link with no stated evidence need, stops the rollout.

Handle the exceptions explicitly
Code is valid for another recipe
Reject the proposed match and ask the owner to review the product identity.
Photo shows a different package size
Revisit the purchased-item relationship rather than forcing the code onto the first candidate.
Warehouse cannot establish lot linkage
Document the traceability gap and escalate through the quality process.
What to verify before expanding
- OCR output or fuzzy similarity cannot become a confirmed lot by itself.
- The quality reviewer sees every unresolved link and its required evidence.
- A code valid for another recipe fails the proposed lot match, even if its characters are recognized with high confidence.
- New packaging evidence reruns product and shipment checks while retaining the previous ambiguity and unresolved traceability gaps.
Connect this process to the rest of your operation
Explore Stacksync AI agents (Genies) and scope the records and actions against your actual systems. Book a demo with a real partial code evidence example and the exception your team handles most often, for example code is valid for another recipe.
- AI Agents for Pet Food Complaint Traceability
- AI Agents for Pet Food Brands: Trace Customer Complaints to Orders and Production Lots
- Pet Food and Treats EDI: Align Retailer Product Codes and Case Quantities
- Shopify–NetSuite Sync for Pet Food Brands: Match Recipes, Bag Sizes, and Variety Packs
- Give Support Agents Full Customer Context in the Helpdesk (No Tab-Switching)
- Two-Way Sync Field Mapping Workbook
The shared architecture guide covers record matching, ownership, and recovery across systems.
Technical references
FAQ
Frequently asked questions





