"I want an AI that quotes in my ERP." It sounds simple, but most attempts crash because they skip steps or do them in the wrong order. Here's the complete process that actually works: the same one we follow when we build an AI sales rep on top of a real ERP like Odoo.
This isn't theory: it's the script that keeps your project from becoming a pretty demo nobody uses.
Before you start: why almost everyone fails
The number-one mistake is starting with the AI. People open ChatGPT, plug in a couple of no-code connectors and expect magic. And it works… in the demo. The moment a real case shows up (a client with a special tier, a product out of stock, a price that changed yesterday) the castle collapses.
The AI isn't the hard part. The hard part is the data and the integration. Get those two right and the AI is almost the easy bit.
Step 1: Audit and organize the data
AI doesn't fix bad data, it amplifies it, and with confidence. Before touching anything, run this audit:
- Prices and tiers. Are they all in the ERP? Does a given client have one clear tier, or are there exceptions "only Manolo knows"?
- Stock. Is it reliable and real-time? By location/warehouse?
- Clients. Are they clean, de-duplicated, with their price tier assigned?
- Business rules. What happens if there's no stock? If the client doesn't exist? If they order below the minimum?
If any of this is shaky, stop and fix it first. This step is 80% of success and the one everyone wants to skip.
Step 2: Give the AI "hands", not just a "mouth"
An AI that only talks can't operate. It needs tools: concrete functions it can call to act on the ERP. For a quoter, the minimum is usually:
find_client(name)→ validates and returns the client and their tier.get_price(product, tier)→ the correct price for the tier.get_stock(product, location)→ real availability.create_opportunity(client)→ opens the opportunity in the CRM.create_order(client, lines)→ creates the formal quote/order.
Each tool connects to the ERP through its API (for example, JSON-RPC in Odoo), not with a generic connector. This gives you three things a no-code can't: fine-grained control, reliability and your data never leaving to a third party.
A key detail: tools should return data, not free text. The AI decides what to call and with which arguments; the structured result is what prevents hallucinations.
Step 3: Turn it into a guided conversation (a state machine)
A good quoter isn't a form or a free chat: it's a phased conversation. The most robust way to steer it is a state machine:
- Client → the AI finds and validates it in the ERP. If it doesn't exist, it says so; it doesn't invent it.
- Tier → it applies the correct price list for the client.
- Products → it adds items with quantities, showing real price and stock for each.
- Confirmation → it summarizes and, on confirmation, creates the formal quote in the ERP.
Why a state machine and not "let the AI figure it out"? Because at each phase you bound what can happen. The AI doesn't wander: it knows where it is and what's missing. Transitions are driven by flags in the database, not by the model's intuition.
Step 4: Make it leave the work done (and verifiable)
The goal isn't a pretty PDF or a friendly message. It's leaving a real order in the ERP, with its number. The test: open the ERP and look. If it's not there, you haven't integrated anything, you've built a chatbot.
A note on honesty: don't promise what the tool doesn't do. If your quoter doesn't generate the PDF or upload it to Drive, don't sell it as if it does. Trust is built by being precise.
Step 5: Handle errors like real production
This is where the pro shows. What does your AI do when something fails?
- The ERP doesn't respond → retry with backoff and an honest message, never an invented figure.
- Product out of stock → it says so and offers alternatives, it doesn't add it anyway.
- Ambiguous client (two "Garcías") → it asks which one, it doesn't guess.
- Price that doesn't add up → it stops before creating the order.
The AI must fail safe: when in doubt, stop and ask. On business data, a silent error is worse than doing nothing.
Step 6: Harden it before handing it to the team
Before production:
- Access list: who can use it (and who can't).
- Anti-flood buffer: so it doesn't get overwhelmed if five messages arrive in a row.
- Logging: every action on the ERP is traced. If something's off, you see it.
- Staging environment: test with real orders on a staging ERP before touching production.
How long this takes (realistic expectations)
It depends on the state of your data, but a focused quoter integration usually goes like this:
| Phase | Rough time |
|---|---|
| Data audit and cleanup | 1-2 weeks |
| Tools + API connection | 1-2 weeks |
| State machine + conversation | 1-2 weeks |
| Testing, errors and hardening | 1 week |
If someone promises "AI in your ERP in two days", either your data is already immaculate, or they're selling you a demo.
The result
Done right, an employee types "quote" on WhatsApp and in 3-5 minutes has the order created in the ERP, instead of 15-30 minutes by hand with a 5-8% price-error rate. And it works at any hour. You can see a real case, with actual order numbers, in our AI sales rep that quotes in the ERP.
If you want to understand the why behind all this before diving in, also read what it really means to integrate AI.
Have an ERP and want AI to work inside it? Tell us your case and we'll tell you, with no commitment, where to start and what we would NOT do yet.


