Ongoing AI Solution

Export AI — Export Workflow Automation for a Bangladeshi Exporter

The paperwork from a buyer's first email to the bank's delivery order, read and drafted by a privately hosted AI model, with every amount and date worked out in plain code.

Export AI — Export Workflow Automation for a Bangladeshi Exporter
01 — THE PROBLEM

A Bangladeshi yarn exporter runs every order through the same chain of documents: the buyer's inquiry, a quotation, the buyer's price confirmation, a proforma invoice (PI), the buyer's letter of credit (LC), and a delivery order to the bank. Every step was done by hand from email. Staff retyped quantities and prices, compared each LC clause against the PI by eye, and tracked PI validity, shipment dates and LC expiry themselves, often from scanned documents. A misread decimal point or an unnoticed certificate requirement becomes an LC discrepancy, which costs time or payment. And because the documents carry buyer, LC and bank details, they could not simply be sent to a public AI service.

02 — OUR SOLUTION

The system connects to the company's mailbox, sorts each message in code, and uses a privately hosted model only to read and draft, never to calculate. A buyer's inquiry is read into structured data, code matches each line to the product list by yarn count, type and blend (leaving ties to a person), and code prices the quotation. When the buyer replies, code compares every quantity and price with the quotation, and the PI is issued only when the reply confirms and nothing has changed; anything else goes to a person as a negotiation. The buyer's LC, whether SWIFT text, PDF or scan, is read through OCR and checked in code against the PI and the company's own rules, including the certificates it demands and their expiry dates, and each discrepancy comes with the amendment wording to request. In amendment emails, code writes every amendment point and the model only writes the opening and closing; if those contain a number the model wasn't given, they are replaced with standard wording. Every outgoing email stays a draft until a person clicks Send. A flow board shows every trade file by stage and whose turn it is.

Outcome

The system is running on a private server, connected to the company's mailbox, with its real trades flowing through the board and the LC review tuned on its real LCs. A staff user guide has been written. The customs pack, HS-code checks and user acceptance testing with the export team are next.

Key features

  • Mailbox connection (Gmail, Microsoft 365 or IMAP/SMTP); every reply sent only on a person's click
  • Quotation lines matched to the product list by yarn count, type and blend, with ties left to a person
  • PI issued automatically only when the buyer confirms and code finds no changed quantity or price
  • LC checked against the PI in code, each discrepancy with its amendment wording
  • Required certificates checked against the company's certificate list and expiry dates
  • OCR for scanned PIs and LCs, with sanity checks on prices, units and totals in words
  • Delivery order to the bank written entirely by code from the confirmed LC and PI
  • Flow board of every trade file by stage, showing whose turn it is
  • Deadline tracker for latest shipment, LC expiry, presentation period and proceeds
  • Privately hosted model, so buyer, LC and bank data never goes to a third-party AI service

Tech stack

Python Django 5.2 PostgreSQL Celery Redis Docker Ollama Qwen2.5 Tesseract OCR Gmail API Microsoft Graph

Build something similar?

Tell us about your project. We'll share how we'd approach it.

Start a project