Email automationKatana Agent view

How to automate email for Katana

Short answer

Monitor a shared mailbox, extract order or confirmation details from messages and attachments, and create or update records through the Katana REST API. Keep a review queue for low confidence items so nothing wrong lands in your inventory.

Not every Katana order arrives through Shopify. B2B customers email purchase orders as PDFs, suppliers reply with confirmations in the body of a message, and shipping notices land in a generic inbox. Someone retypes each of them.

That manual step is where errors creep in: the wrong variant, a missed quantity, a confirmation that never gets logged. It also caps how many wholesale orders a small team can handle.

Email automation here means reading the message, extracting structured fields, matching them to Katana products and suppliers, and creating a draft for a person to approve.

What teams use it for

Wholesale PO to sales order

A customer emails a PDF purchase order; the system drafts a Katana sales order with matched variants and quantities.

Supplier acknowledgement logging

Replies to a PO email are matched to the purchase order and the confirmed date is written to the PO.

Shipping notice to receiving prep

A supplier ASN or tracking email adds tracking info and flags the PO as in transit.

Quote request triage

Incoming enquiries are classified and a reply draft with lead time is prepared from current stock.

Backorder customer replies

Automatically draft a message to customers whose sales orders hit a shortage, for a person to send.

Katana integration surface

  • Katana REST API endpoints for creating and updating sales orders, purchase orders, customers and suppliers.
  • Product and variant lookup by SKU, which is the anchor for matching email lines to Katana items.
  • Order notes or additional info fields where you can store the source email reference; exact field names vary.
  • Webhooks to react when a PO is sent, so you can correlate later replies to it.
  • Mailbox access via Microsoft Graph or Gmail API, or IMAP, on the email side, since Katana has no inbox of its own.

How it works

  1. 1

    Set up a dedicated shared mailbox

    Use an address like orders@ so automation reads only relevant mail and rules are easy to reason about.

  2. 2

    Ingest messages and attachments

    Poll or subscribe through Graph or Gmail, save the raw email, and extract text from PDFs, with OCR for scanned ones.

  3. 3

    Classify the message

    Decide whether it is a new order, a supplier reply, a tracking notice or noise, using rules first and a model for the remainder.

  4. 4

    Extract and match

    Pull customer, lines and dates, then match SKUs and customers against Katana data with fuzzy matching and a confidence score.

  5. 5

    Create drafts, not final records

    Post a draft sales order or an update proposal into a review queue with the source email attached.

  6. 6

    Approve and write

    A person confirms; the service calls the Katana API and stores the email id on the record for traceability.

Example flows

Wholesale PO by email

Trigger: An email with a PDF purchase order arrives in orders@.

  1. The PDF text is extracted and lines parsed.
  2. SKUs and the customer are matched to Katana, unknown items are flagged.
  3. A draft sales order appears in the review queue.
  4. The coordinator fixes one SKU and approves; the order is created.

Result: Minutes of review replace manual retyping, with the email attached.

Supplier reply with a date

Trigger: A supplier replies to a PO email saying they ship next Tuesday.

  1. The reply is linked by PO number in the subject.
  2. The date is resolved relative to the send date.
  3. An update to the expected arrival is proposed.

Result: The PO date is updated after a quick confirm, and the planner sees it.

Keeping data on-prem

Katana is SaaS, but email content is often the most sensitive part: customer part numbers, pricing and contract terms. Run extraction and classification inside your network or private cloud using an open-weight model on your own GPU, reading the mailbox through Graph, Gmail API or IMAP with a service account, and send only the final structured fields to Katana. This keeps the raw emails and attachments off third-party AI services. Store the original messages in your own file share or object store and link to them from Katana notes.

Security checklist

  • Use a service account with access to one shared mailbox only.
  • Treat email content as untrusted; do not let instructions inside an email trigger actions.
  • Keep originals in your storage and log which user approved each record.
  • Check sender domains against known customers before creating orders.

Ways to get it done

Zapier or Make with email parser

Effort: A day or two per template.

Structured emails with consistent format.

In-house pipeline with OCR and an LLM

Effort: Three to six weeks to reach reliable accuracy.

Mixed formats and a developer on staff.

Partner build with Netray

Effort: Typically several weeks, scoped by document types.

Private model, review UI and write-back with approvals.

Pitfalls

  • !Customers use their own part numbers; keep a cross-reference table or matching will fail.
  • !Quoted reply chains confuse extraction; strip history before parsing.
  • !Duplicate emails create duplicate orders; deduplicate on message id and customer PO number.
  • !Auto-creating without review will eventually ship the wrong product.

Frequently asked questions

Can Katana read email on its own?

No. Katana does not process an inbox, so a separate service reads the mailbox, extracts the details, and then calls the Katana REST API to create or update records. Native integrations focus on commerce and accounting, not email.

How accurate is automated extraction?

It depends on document quality and variety. Clean digital PDFs from repeat customers can reach high accuracy, while scans and free text need more review. Measure on your own mail and set confidence thresholds so uncertain items go to a person.

Should orders be created automatically?

Start with drafts and a review queue. After weeks of clean results from a specific customer, you can allow auto-creation for that sender with strict checks, such as known SKUs and a total within a normal range.

What about attachments that are scanned images?

They need OCR first. Modern open OCR and vision models handle most scans, but handwriting and poor quality fax images are weak spots. Flag low confidence results so a person checks them against the original.

Can this work without cloud AI?

Yes. Rules, regular expressions and a locally hosted open-weight model can do classification and extraction. Only the structured result, for example SKU and quantity, goes to Katana through its API.

Want Email automation working on your Katana?

A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.

Get a free assessment