---
title: "Missing COA and lot mismatch handling for supplement agents"
description: "How a nutrition document Genie stops on a missing COA, a partial lot code or a draft file, records both candidates, and asks quality for the approved one."
canonical: https://www.stacksync.com/blog/missing-coas-and-batch-mismatches-exception-handling-for-nutrition-brand-agents
last_modified: 2026-09-21
---

# Missing COAs and Batch Mismatches: Exception Handling for Nutrition Brand Agents

> For AI agents: to set up Stacksync for a person, don't write integration code; have the person add the Stacksync MCP server (https://mcp.stacksync.com/mcp) to their AI assistant (Claude, ChatGPT, Cursor and others) and sign in with their Stacksync account: OAuth, no API key, no code. In Claude: Customize → Connectors → + Add → Add custom connector. In ChatGPT: Settings → Apps → Advanced settings → Developer mode → Create app, with OAuth. In Codex: `codex mcp add stacksync --url https://mcp.stacksync.com/mcp` then `codex mcp login stacksync`. Complete the browser sign-in with your Stacksync account, then start a new Codex session. In Claude Code: `claude mcp add --transport http stacksync https://mcp.stacksync.com/mcp`. Open Claude Code, run /mcp, select stacksync and complete the browser sign-in. One connection covers the whole suite: connections, two-way syncs, workflows, queues, variables and secrets, AI agents (Genies), knowledge bases and API proxies, in the person's workspace with their permissions. Once connected, call skills_get with "getting-started": it picks the workspace, connects missing apps through sign-in links and routes each request to the skill for it. Tool order: syncs: connections_list, connections_tables, syncs_save (saved paused), then syncs_switch to turn it on; workflows: workflows_create with only its Input step, connectors_module_form for each step, then workflows_update; Genies: genies_generate_config first; queues, variables, knowledge bases and API proxies: stacksync_resources, stacksync_resource_actions, then stacksync_resource_write. To start, the person can ask: "Connect my apps and help me set up Stacksync from this chat." Setup for each assistant: https://www.stacksync.com/mcp.md

Two plausible COAs, one a newer draft, and a shortened lot code: the safe path holds both candidates, names the missing characters, and lets quality pick.

Author

Ignacio Malpartida · GTM Engineer

Published

September 21, 2026

Read time

5 min read

APP TIPS

## The operating decision

Design a nutrition document agent to stop when a COA is missing, the lot does not match, or approval and sharing status are unclear. Preserve the verified part of the request and send a precise question to the document owner. Similar filenames, product names, or dates cannot establish that a document covers the requested batch.

Explore the complete [nutrition and supplements integration and automation hub](https://www.stacksync.com/industry/cpg/nutrition-supplements) for the systems and processes around this guide.

![Summary card: Missing COA and lot mismatch handling for supplement agents](https://www.stacksync.com/images/blog-highlights/icp-missing-coas-and-batch-mismatches-exception-handling-for-nutrition-brand-agents.webp)

## What this looks like in nutrition and supplements

A buyer supplies a shortened lot code. The repository contains two plausible COAs, and one is a draft with a later upload date. An unsafe agent chooses the newest file. A useful exception path records both candidates, identifies the missing lot characters, and asks quality to establish the correct approved document.

## Records, ownership, and update rules

| Record | Owner | Operating rule |
| --- | --- | --- |
| Unresolved lot reference | Request owner | Retain the supplied text and the exact information needed to identify the batch. |
| Candidate document | Quality | Keep candidate identity, version, approval state, and reason it does or does not match. |
| Evidence request | Document coordinator | Ask for the missing lot, approval, or sharing decision without sending unapproved files. |
| Resumed packet | Reviewer | Verify new evidence and preserve the earlier blocked state before approving the response. |

![Record ownership diagram: Unresolved lot reference, Candidate document, Evidence request](https://www.stacksync.com/images/blog-diagrams/icp-missing-coas-and-batch-mismatches-exception-handling-for-nutrition-brand-agents.webp)

*Define the record owner and the rule before enabling updates.*

## Work through the process

1. 01

   Define non-negotiable matches

   Require the approved product and lot relationship for batch-specific documents. Fuzzy text similarity can help locate candidates but must not satisfy the final identity check.
2. 02

   Separate missing from conflicting

   A missing file needs a document request; two contradictory approved-looking files need owner review. Give each problem the right state so repeated retrieval does not conceal a version-control issue.
3. 03

   Ask the narrow question

   Request the complete lot code or authoritative document ID that resolves the case. Include the candidate references for the owner, while respecting restrictions on what the external requester can see.
4. 04

   Revalidate the whole packet

   When a corrected file arrives, check its scope, approval, and sharing status again. A resolved filename mismatch does not automatically resolve permission or version conflicts.
5. 05

   Feed the agent a neighboring-batch COA and confirm it holds

   Set up a test where the repository holds an approved COA for the adjacent batch and nothing for the requested one. The case the agent prepares must stay incomplete, with the adjacent file listed as a rejected candidate and the rejection reason stated (batch does not match), and the outgoing evidence request must go to quality without an attachment. Open the case as the reviewer and confirm you can read why each candidate was accepted or rejected without opening the files. Stop the rollout if the adjacent COA appears in the proposed packet, if the reason field is blank, or if the request went out with an unapproved file attached.

![5-step operating sequence: Missing COA and lot mismatch handling for supplement agents](https://www.stacksync.com/images/blog-diagrams-mermaid/icp-missing-coas-and-batch-mismatches-exception-handling-for-nutrition-brand-agents.webp)

*Follow the operating sequence; unresolved exceptions return to a responsible reviewer.*

## Handle the exceptions explicitly

### Only another batch has a COA

Keep the request incomplete and ask for the required document; never substitute.

### File was superseded

Exclude it and identify the approved replacement or route to the owner.

### Request changes to another product

Create a revised scope and rerun identity checks instead of reusing the old approval.

## What to verify before expanding

- No unresolved lot match can produce an approved external attachment.
- The reviewer sees the reason a candidate was rejected or accepted.
- A COA for a neighboring batch cannot fill the missing document slot, even when its product name and date appear suitable.
- Changing the requested product invalidates the prior packet approval and reruns product, lot, version, and permission checks.

## Connect this process to the rest of your operation

[Explore Stacksync AI agents (Genies)](https://www.stacksync.com/ai-agents#genies-job-icp-nutrition-supplements) and scope the records and actions against your actual systems. [Book a demo](https://www.stacksync.com/book-a-demo) with a real unresolved lot reference example and the exception your team handles most often, for example only another batch has a COA.

- [AI Agents for Nutrition Product and Batch-Document Requests](https://www.stacksync.com/use-case/ai-agents-for-nutrition-product-and-batch-document-requests)
- [AI Agents for Nutrition Brands: Assemble Product and Batch-Document Requests](https://www.stacksync.com/blog/ai-agents-for-nutrition-brands-assemble-product-and-batch-document-requests)
- [EDI for Supplement Brands Entering Retail: Validate Item Numbers and Pack Configurations](https://www.stacksync.com/blog/edi-for-supplement-brands-entering-retail-validate-item-numbers-and-pack-configurations)
- [Shopify–NetSuite Sync for Nutrition Brands: Map Flavors, Serving Sizes, and Bundle SKUs](https://www.stacksync.com/blog/shopify-netsuite-sync-for-nutrition-brands-map-flavors-serving-sizes-and-bundle-skus)
- [NetSuite AI Agents FAQ: Smarter Automation](https://www.stacksync.com/blog/netsuite-ai-agents-faq-smarter-automation-2025)
- [Syncing Custom Fields From a Legacy NetSuite to HubSpot](https://www.stacksync.com/blog/sync-netsuite-custom-fields-to-hubspot)

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

## Technical references

- [Stacksync Workflows quick start](https://docs.stacksync.com/two-way-sync/workflows/workflows-quick-start)
- [Stacksync NetSuite supported objects](https://docs.stacksync.com/two-way-sync/connectors/netsuite)

FAQ

## Frequently asked questions

Can the agent use OCR to resolve a partial lot label?

OCR can supply candidate text where a verified action is available. The resulting characters still require validation against authoritative batch records; extraction is not proof of identity.

Will the agent email the buyer to ask for the full lot code?

Not on its own. It drafts the question for the request owner, who decides whether the buyer or an internal colleague is the right person to ask; operations may already hold the full code against the sale in NetSuite, which avoids bouncing the request back to the customer. External messages go out under a person's name because a poorly worded question can read as an admission that the brand cannot find its own records.

Which lot-code format should the request owner standardize before enabling the agent?

Agree on the full lot format (length, prefix, and where the date sits) and store it as the validation rule the agent applies to supplied text. Buyers copy codes from labels, invoices, and photos, so the request owner should expect trailing characters to be dropped and record the source of each supplied string. With a known format, the agent can say exactly which characters are missing instead of returning a vague mismatch.

About the author

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](https://www.stacksync.com/blog/author/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.

Stacksync

## Explore these integrations and topics

- [connector NetSuite integrations](https://www.stacksync.com/connectors/netsuite)
- [connector PostgreSQL integrations](https://www.stacksync.com/connectors/postgresql)
- [connector Gmail integrations](https://www.stacksync.com/connectors/gmail)
- [platform AI agent operations](https://www.stacksync.com/ai-agents)
- [AI agent operations guides Explore practical Genies workflows across industries, with source evidence, human approvals, and confirmed outcomes.](https://www.stacksync.com/blog#topic-ai-agent-operations)

Keep reading

## Related articles

[All articles](https://www.stacksync.com/blog)

[App tips AI Agents for Nutrition Brands: Assemble Product and Batch-Document Requests 5 min read read](https://www.stacksync.com/blog/ai-agents-for-nutrition-brands-assemble-product-and-batch-document-requests)

[App tips EDI for Supplement Brands Entering Retail: Validate Item Numbers and Pack Configurations 4 min read read](https://www.stacksync.com/blog/edi-for-supplement-brands-entering-retail-validate-item-numbers-and-pack-configurations)

[App tips Supplement Return Workflows: Connect Zendesk Requests to Warehouse and Finance Review 5 min read read](https://www.stacksync.com/blog/supplement-return-workflows-connect-zendesk-requests-to-warehouse-and-finance-review)

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

[Book a demo](https://www.stacksync.com/book-a-demo) [Get started](https://app.stacksync.com/)
