All articles
Integrations
CRM and integrations8 min

Electronic Document Exchange and AI: How an Agent Drafts Invoices and Delivery Notes, Checks Them Against the Order, and Only Then Sends Them to a Counterparty

The delivery note shows one quantity, the invoice shows another, because someone forgot to update the figure after the client trimmed the order at the warehouse. The e-invoice went out a day late. A product code on one line doesn't match the code used for the same item last time. None of these is dramatic on its own, but together they turn into a dispute with a counterparty, a question from the tax office, or a VAT deduction stuck in limbo. This is about which part of checking documents before they go into an electronic document exchange system an AI agent can take over, and which part has to stay with your accountant.

Why "just send the document" doesn't hold up

In Uzbekistan, a company cannot legally sell goods or services to another legal entity without an electronic invoice — it is a precondition for the buyer to claim a VAT deduction. The document is signed with a qualified electronic signature and passes through one of the EDI operators — Didox, Faktura.uz, E-invoice.uz and others; the registered list runs to roughly thirty operators as of early 2026. The invoice is normally issued on the day of the transaction itself; in some cases it can be issued by the 10th of the following month. The buyer must confirm the invoice with their own signature or reject it with a stated reason, and has ten calendar days to do so.

A separate complication arrived with 2026: if an invoice falls into the high tax-risk category, the buyer may need to pay the VAT themselves as a tax agent, or the deduction will not go through. For some line items — construction and installation work, for instance — the invoice must reference a contract registered on the tax committee's own platform. None of these rules are about the exchange mechanism itself; they are about what has to match, inside the document and around it, before it ever gets sent.

What usually goes wrong without a cross-check

The EDI operator isn't the weak link — it faithfully delivers whatever gets loaded into it. The weak link is the data before that point. Common failure patterns:

  • the quantity or amount on the invoice doesn't match the delivery note or the act for the same shipment;
  • the counterparty's registration details (tax ID, legal name) don't match what's on file for them as a taxpayer;
  • the same product line carries a different tax classification code across documents, which quietly changes the applicable rate and deduction logic;
  • the document is issued later than the transaction date allows;
  • the counterparty is flagged in the registry as not VAT-registered, or carries a high tax-risk marker, while the document is still being prepared on the standard template.

Each of these is easy to spot by eye when you're comparing two documents. It stops being easy at the volume of dozens of shipments a day, with data arriving from different systems — the order from a CRM, the stock and shipment from 1C or MoySklad, and the invoice needing to pull all of it together.

What the agent actually does, from order to draft document

The agent doesn't replace the EDI operator and doesn't sign anything — it works one step earlier, before a document is sent at all. The typical flow:

  1. It pulls shipment data from the accounting system — 1C, MoySklad or a CRM — and checks it against the order that generated the shipment.
  2. It assembles a draft invoice or act: line items, quantity, amount, product classification code — carrying over the same values already in the delivery note rather than re-entering them.
  3. It checks the counterparty against the registry: valid tax ID, VAT-registered status, any tax-risk flag.
  4. It compares the draft against previous documents for this same counterparty — if a classification code or terms suddenly differ from what's normal for them, that's worth a second look.
  5. If everything lines up, it queues the draft for the accountant's signature. If it doesn't, it states exactly what didn't match and waits for a human decision.

None of this is AI magic — it's ordinary field-matching between systems, done faster and without the fatigue that creeps in by the end of a long day of manual checking.

ProcessWhat the AI doesWhat stays with a person
Collecting shipment dataPulls line items, quantity and amount from 1C/MoySklad/CRMDecides which system is the source of truth
Cross-checking documentsCompares the delivery note, the order and the draft invoice against each otherDecides what to do with a mismatch
Counterparty checkReads VAT-registered status and any tax-risk flagDecides whether to keep working with a flagged counterparty
Drafting the documentFills in the form, carries over the classification code from that line's historyReviews and signs with a qualified signature
Deadline trackingFlags approaching confirmation or rejection deadlines on the buyer's sideFollows up with the counterparty when a deadline is close

What this looks like in practice

Accountant: prepare the invoice for shipment #4521.

Agent: the order lists 86 units of "Pump CN-15," the warehouse delivery note lists 80. That's a 6-unit mismatch. The classification code used for this item with this counterparty on past invoices is 28122100001000000; the order carries a different code. I'm not building a draft yet — I need this clarified.

Accountant: 80 is correct, the client picked up the rest later on a separate note. Fix the code to match the history.

Agent: draft assembled for 80 units with code 28122100001000000, amount recalculated. The counterparty is actively VAT-registered with no tax-risk flag. Draft is queued for signature.

The agent didn't make the call itself here — it found the mismatch and stopped, leaving the final decision to the accountant. That's a meaningfully different posture from sending documents through as-is: a quantity error would have gone straight into the exchange system and become either a dispute with the counterparty or grounds for them to reject the document outright.

What the agent should not be doing

Worth being direct about the limits here:

  • It does not sign anything with a qualified electronic signature — that remains the action of a person with signing authority, and it should stay that way.
  • It does not decide whether to keep doing business with a counterparty carrying a tax-risk flag — that's a commercial and legal call, not a technical one.
  • It does not replace an accountant in genuinely disputed cases: a VAT amount discrepancy, unusual contract wording, a claim from a counterparty — those go to a person.
  • It does not guarantee it's current with the latest changes to tax rules — those change, and the matching logic needs periodic review alongside your finance team.

Where the data feeding this cross-check travels between systems via webhooks, it's worth thinking through what happens when that transfer fails — covered in more depth in our piece on how business systems pass data to each other.

Where to start

If your accounting already runs on 1C or MoySklad, the task reduces to having the agent read shipments and orders from there rather than re-entering them — the same "the accounting system is the source of truth" rule that applies to the 1C and MoySklad setups. It's worth separately pulling together a list of the mismatches that actually occurred over the past few months — that list is what the first version of the matching rules should be built on, not an abstract template.

More on connecting AI agents to a company's existing systems is on the Unika Solutions AI agents page, and more integration write-ups live in the integrations section of the blog. If you need to size this specifically for your document volume and data, that's easier to work out in a first conversation than to guess at in advance.

FAQ

Can the agent issue the e-invoice itself inside the EDI system?

Technically a draft can be pushed to an EDI operator through an API, but signing with a qualified electronic signature stays with a person who has signing authority. The agent prepares and checks; a person confirms.

What if a mismatch between documents is only found after sending?

The buyer has ten calendar days to confirm or reject an e-invoice — the agent can flag that deadline and prepare a correction document, but the decision to reject or amend stays with the accountant.

Do we need to switch EDI operators to connect an agent?

No, as long as the current operator offers an API or a document export — the agent works on top of the existing setup rather than replacing it.

What if accounting runs on neither 1C nor MoySklad?

The matching logic works with any system you can pull order and shipment data from, spreadsheets included — though spreadsheets need a regular export set up first.

How many mismatches does a check like this actually catch?

It depends on how many systems sit in the chain and how often data changes after an order is confirmed — companies that move data between a CRM and an accounting system by hand tend to see more mismatches than those where an order isn't edited after confirmation.

Subscribe to AI Insights

Case studies, tips and AI automation trends — weekly

Want similar results?

Get a free consultation and ROI calculation for your company

Free Consultation

Related Articles

Integrations

Instagram API Limits in 2026: What a DM Bot Can and Cannot Do, and How to Plan Around It

A map of what the official Instagram API allows a bot to do: when you may message a customer, why long replies fail, and what to check before going live.

Integrations

Telegram Mini Apps for Business: Catalog, Booking and Payments Inside the Messenger

What a Telegram Mini App does better than a chat bot, how to connect it to your stock, calendar and an AI agent, and what to test before launch.

Integrations

Telegram Business: How to Connect a Bot to Your Company's Personal Account So It Replies to Customers in Your Name

Customers message your manager directly, not your bot. Here is how Telegram Business lets a bot answer from a personal account, what it can and cannot do, and how to keep it from embarrassing you.

Integrations

Legacy CRM Without an API: How to Connect AI When There Is No Integration

Your in-house or ageing CRM will not share data with anything. Here are five workarounds, where each one breaks, and how to pick the safe one for your system.

Integrations

Shared inbox triage: how AI reads incoming email and routes it to the right person

A shared info@ inbox is where leads and complaints get lost. Here is how AI reads each email, sets topic and urgency, and hands it to the right owner.

Integrations

Excel and Google Sheets Reports That Build Themselves: How the Pipeline Works and Where AI Fits

What a self-updating report is made of, why formulas rather than AI should calculate the numbers, and how to launch your first one without rework.

AI Agent for Electronic Document Exchange (EDI) | UNIKA