Skip to content

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
Incomplete Lot Codes and Mixed Recipes: Exception Handling for Pet Food Agents
APP TIPS

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.

Summary card: Genie stop conditions for partial pet food lot codes

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

RecordOwnerOperating rule
Partial code evidenceSupportPreserve the original image or text and extracted characters without silently filling gaps.
Candidate productOperationsList plausible recipe and package identities with the evidence supporting each.
Lot-match decisionQuality ownerConfirm the authoritative relationship or document that the match remains unresolved.
Resumed traceCase reviewerReview new evidence and retain the prior ambiguity and decision history.
Record ownership diagram: Partial code evidence, Candidate product, Lot-match decision
Define the record owner and the rule before enabling updates.

Work through the process

  1. 01
    Distinguish extraction from identity
    If a verified OCR action is used, treat the output as candidate text. Character recognition does not establish the product, batch, or shipment relationship.
  2. 02
    Track alternative paths
    List 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.
  3. 03
    Ask a precise follow-up
    Request 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.
  4. 04
    Revalidate after new evidence
    Confirm 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.
  5. 05
    Send a code from the wrong recipe and confirm the match is refused
    Use 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.
5-step operating sequence: Genie stop conditions for partial pet food lot codes
Follow the operating sequence; unresolved exceptions return to a responsible reviewer.

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.
Book a demo for pet food and treats integration and automation

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.

The shared architecture guide covers record matching, ownership, and recovery across systems.

Technical references

Book a demo for pet food and treats integration and automation

FAQ

Frequently asked questions

Would the order date be enough to pick the production lot?
No. A ship date narrows the candidates and nothing more, because a warehouse can pick from two lots of the same recipe in one day. The Genie may list lots produced in the window as candidates, labeled as date-based, but the confirmed field stays empty until a fulfillment record or packaging evidence names one. Reviewers should see the date reasoning so they know why a candidate is there and what it lacks.
When should the Genie ask the customer for another photo?
Only after it has exhausted internal evidence. Sequence the job so it checks the order line, the shipment parcels, and any warehouse lot reference first; a customer request goes out when those leave more than one candidate standing. The request states what is needed, the full printed code or the package panel, and never suggests characters. Support sends it; the Genie drafts the ask for a person to approve.
What changes in the trace when a customer sends the full code later?
A second run under the same case ID, not a new case. The job appends the evidence with a timestamp and produces a fresh result, while the prior result stays readable so quality can see what the code changed. A person still closes the case. If the full code contradicts the parcel evidence, both facts are shown together and the case escalates instead of resolving on the newer input.

About the author

Ignacio Malpartida
Ignacio Malpartida
GTM Engineer

Ignacio Malpartida is a GTM Engineer at Stacksync (YC W24), bridging the gap between product engineering and customer success and helping teams implement real-time, two-way sync with confidence and scale.

All posts by Ignacio Malpartida

About Stacksync

Stacksync powers real-time, two-way sync between CRMs, ERPs, and databases. Engineers sync data at scale and automate workflows, not dirty API plumbing.

Coworkers laughing in front of a laptop in a casual office setting

You just read how it should work.
See it run on your own data.