SutradharLabs · Build & Test
Case Studies

An ERP that answers its own WhatsApp

A manufacturing operation running enquiry to payment on a single system, with AI placed at the three steps that were costing a person their morning.

METNMATManufacturing · ERP & Automation

19 modules, one system, quote to cash

19

Modules in daily production use

2-way

WhatsApp inbox on the Meta Cloud API

0

Re-keying between the ERP and the books

Where the AI sits

  • Vertex AI for reply drafting grounded in customer order history
  • Structured extraction of enquiries from raw Gmail messages
  • AI-assisted quotation drafting from prior quotes for the same product
  • Confidence thresholds that route anything uncertain to a human

Built with

Next.js 16MongoDBMongooseNextAuthWhatsApp Cloud APIMeta WebhooksZoho Books APIVertex AI

The problem

The business was running on the arrangement most Indian manufacturers run on: enquiries arriving by email and WhatsApp, quotations written in Excel, orders tracked on a whiteboard, and invoices re-keyed into Zoho Books by hand at the end of the week. Nothing was broken enough to replace. Everything was slow enough to cost a person most of a morning, every morning.

The specific failure was reconciliation. The operations spreadsheet and the accountant's books disagreed, because both were maintained by hand from the same source. Finding out which one was right meant reading back through a WhatsApp thread, and the thread lived on one salesperson's phone.

Where AI belongs, and where it does not

The build started by separating the two. Most of an ERP is deterministic - a sales order either has stock against it or it does not, and asking a language model is slower, more expensive and less correct than asking the database. Those nineteen modules are ordinary, well-tested application code.

AI went to the three steps that need judgement: reading an unstructured enquiry and working out what the customer wants, drafting a reply that reflects that customer's actual history, and proposing a quotation from what was quoted for the same product before. Every one of those is a task where a person was reading text and making a call, which is exactly the shape of work a model does well.

  • Gmail intake reads enquiries out of the inbox and extracts them into structured records
  • The WhatsApp assistant drafts replies from the customer's own order and payment history
  • Quotation drafting proposes line items from prior quotes for the same product
  • Nothing reaches a customer without a human approving it

Architecture

One Next.js application against one MongoDB database, with role-based access so sales, production, QC, accounts and R&D each see their own surface. The integrations sit at the edges and are deliberately one-directional in their failure behaviour: if Zoho is unreachable the ERP keeps accepting orders and reconciles later, rather than blocking a sale on an accounting API.

The WhatsApp layer runs on the official Meta Cloud API over webhooks, with the 24-hour customer service window tracked per contact. That detail decides whether the channel works at all - send outside the window without an approved template and the message fails silently, and a business number that repeatedly breaks policy gets restricted, taking the whole channel down with it.

The AI layer is wrapped behind an internal interface rather than called directly from feature code, so the model provider is a configuration choice. That was not architectural purity for its own sake: model pricing and latency moved twice during the build.

What changed

Quote-to-cash runs on one platform. An enquiry arrives by email or WhatsApp, becomes a record without anybody copying it, moves through quotation, sales order, production tracking and invoice, and lands in Zoho Books through a two-way sync instead of a re-keying session. The double-entry ledger imports bank statements and reconciles against them, so the operations view and the accounts view are the same numbers.

The part the team noticed first was smaller than the architecture: the WhatsApp history stopped living on one person's phone. Every conversation is assigned, visible and searchable by anyone with the right role.

What it does not do

  • The AI drafts; a person sends. No customer-facing message goes out unreviewed, and that is a deliberate design choice rather than a phase-one limitation.
  • Quotation drafting works well where there is quoting history for a similar product and poorly on genuinely new items, where it is faster to write the quote by hand.
  • Vertex AI usage is billed on tokens by Google, separately from the build.

Read next

Build something like this

What gets built, how an engagement runs, and what it costs.

See AI solutions

Ready to work with an Engineer?

Skip the agency fees and communication gaps. Work directly with a developer who understands your business.

Sign Up For Newsletters

Get E-mail updates about our latest shop and Special offers.