AI Quoting Assistant in Microsoft Teams
From a Product List to a Priced B2B Quote
My Role
- Guided state-driven flow, not open chat
- Pricing rules as config, not code
- Exact-SKU first phase; LLM matching later
Approach at a Glance
Details- 1Guided Conversation, Not Open Chat
- 2Catalogue the Client Already Maintains
- 3Pricing Rules as Configuration
- 4A Simpler First Phase
- 5Matching Messy Inputs (Phase 2)
- 6Confidence Scores and Review
- 7Hard Inputs (Phase 3)
- 8Audit and Observability
Executive Summary
A chatbot in Microsoft Teams that prepares B2B quotes for the sales team of a UK photo and video equipment retailer. A sales manager gives it the client and the products, and it returns a fully priced, branded Excel quote, with sector pricing, brand discounts, delivery, VAT and disclaimers already applied. A quote that used to take hours now takes minutes.
I was the architect and tech lead, with engineers and a PM, from April to July 2026. I designed the system in three phases, each adding harder inputs on top of a working base:
- Exact SKUs: a guided Teams conversation, catalogue lookup and a rule-driven pricing engine.
- Messy requests: product names with typos, partial model numbers, spreadsheets and pasted emails, each line with a confidence score and a review step.
- Hard cases: products resolved through manufacturer sites and web search, screenshots read directly, and uncertain lines routed to a human.
The system met its accuracy targets: 95% for structured SKU lists, 80% for free-form requests and 60% for items found through external lookup. The first phases are in production with the sales team. I handed the project over when my engagement ended in July 2026.
Client Profile
The client is a UK retailer of photo and video equipment, new and used, which also sells B2B to studios, schools, resellers, media companies and public bodies. Its sales managers built these quotes by hand.
Each quote looks simple, but pricing it is not:
- Prices depend on the customer's sector. Studios, Education, Resellers, Media, Public Government, MOD and new private customers each have their own pricing rules.
- Brands stack their own discounts. Profoto, Canon, Sony, Nikon, Broncolor and the retailer's own brand each have discount chains on top of the sector rules, and some lines carry supplier rebates that need manager approval.
- Item status changes the price. Discontinued items must never be quoted, and used items are priced with VAT included.
- Delivery depends on item size and the delivery option chosen.
- Requests rarely arrive as clean SKU lists. Customers send product names, partial model numbers, spreadsheets, emails and screenshots of other websites.
A wrong quote costs money or credibility, so the system had to be predictable and transparent about how it reached every total.
Technical Approach
-
Guided Conversation, Not Open Chat – I designed the Teams bot as a state-driven sequence of questions: client, products, then the parameters that affect price, such as sector and delivery option. Sales managers get the same predictable flow every time, and each step can be validated, with a clear message for an invalid SKU, a missing client or a malformed list instead of a silent failure. The flow is a LangGraph state machine with persistable state, so a quote can pause for a correction and resume.
-
Catalogue the Client Already Maintains – The product catalogue loads from the Excel file the retailer already keeps, validated and upserted into PostgreSQL. Refreshing the catalogue means uploading the file again, with no new process for the team. Discontinued items are filtered out, and used items are tagged for their VAT treatment.
-
Pricing Rules as Configuration – Pricing lives in a JSON rules format I designed, not in code. It covers cost-plus bands per sector, brand discount chains, supplier rebates with approval flags, and delivery tiers. The client's team can change a rule without a code release. Every quote also records a rule trace showing which rules fired on each line, so a sales manager can see exactly how a total was reached.
-
A Simpler First Phase – The first estimate put LLM extraction, embeddings and vector search into the first release. I cut it down: phase 1 handles exact SKU lookup only, with the full pricing engine, branded output, deployment and validation on real example quote requests from discovery. The client got a production tool early, and the harder matching was built on top of it rather than delaying it.
-
Matching Messy Inputs (Phase 2) – Sales managers can attach CSV/XLSX files or paste free text. An LLM with structured output and curated few-shot examples extracts the line items: product name, manufacturer, model and quantity. Each line is matched in tiers: an exact SKU or manufacturer-plus-model lookup first, then fuzzy matching that combines Qdrant vector similarity with RapidFuzz token-set scoring, so misspellings, partial model numbers and format variations still find the right product.
-
Confidence Scores and Review – Every quote line gets a composite confidence score that combines the input source, the match tier and how certain the pricing rules are, banded against the 95/80/60 thresholds. Before a quote is finalised, the bot shows the matched products and prices back in Teams, and the score tells the sales manager which lines deserve a second look. Corrections are captured and logged for tuning the thresholds.
-
Hard Inputs (Phase 3) – When a product can't be matched confidently, the system searches manufacturer sites and the web for the product's canonical name, then matches again against the catalogue with a cleaner query. A vision LLM reads products and quantities directly from screenshots, with OCR as a fallback for text-heavy images. Brand-aware disambiguation and tiered confidence send ambiguous lines to human review automatically. Items that still can't be found are quoted as a stock deposit with the standard disclaimer.
-
Audit and Observability – LangFuse stores every quote with its inputs, match decisions and rule traces. Metrics track the match rate, the spread of confidence scores and how often external lookup succeeds. An accuracy benchmark measures each input type against its target and replays real example requests as regression tests.
Business Outcome
Sales managers now get a priced B2B quote in minutes instead of hours, without leaving Teams. The first phases are in production with the sales team, and the system met its accuracy targets for each kind of input: 95% for SKU lists, 80% for free-form requests and 60% for products found through external lookup.
The design kept the risky parts contained. Prices come from rules the client controls, not from a model. Every total comes with a trace of the rules behind it, and each line's confidence score shows the team where to look before a quote goes out.
Technologies
Planning something similar?
Tell me about it on a short call. New projects can start within 2 weeks