Chatbot Design for Enterprise CRM
Designing an intelligent customer relationship management system integrating it with conversational AI that routes intent, governs responses, and escalates with human oversight.
Two addresses, one label
The problem
Sales reps asked the AI assistant for a client’s address and got the wrong one, or nothing. Each client record held two addresses: the corporate HQ and the site where the work happened. In the dataset, both were labeled simply “address.”
Why it happened
To the model, the two addresses were interchangeable. A person could tell them apart from context; the model only had the label. The AI wasn’t failing. The data gave it no way to be right.
What I changed
- Data: relabeled the fields as Corporate Address and Site Address.
- Intent mapping: separated the two requests so the bot could tell “where’s their HQ” from “where’s the job.”
- Responses: when a rep asked for “the address” without specifying, the bot asked which one instead of guessing. A quick question costs seconds; a confidently wrong address could send someone to the wrong place.
Outcome
We tested the changes with sales reps, who said the responses improved and the chatbot seemed smarter. Executive leadership’s feedback was positive. The model never changed, only the data and design around it.





Conversational flow
The rule-based, deterministic layer. Triggered by an intent, the virtual agent follows a scripted branch you author exactly how the bot responds. No ambiguity, no improvisation. Every reply is mapped, reviewed, and version-controlled before it reaches a customer.

AI search & RAG
Content comes from knowledge base articles; phrasing comes from the LLM summarizing them. You author what lives in the KB, not the reply itself. This separates truth (curated articles) from voice (model-generated prose), keeping answers grounded and editable.

Generative actions
Generative responses bounded by prompts and guardrails. The model composes within constraints: tone, length, approved topics never freewheeling. Guardrails are authored alongside the prompt, so every generative path has a defined edge it cannot cross.

Intent routing
Every conversation begins with detecting what the user actually needs. The system classifies intent across hundreds of trained categories, then routes each one to the mechanism best suited to resolve it : deterministic flow, knowledge search, or generative response.

Response governance
No response reaches a customer without passing through guardrails. Prompts are bounded, topics are constrained, and every generative path has a defined edge. Governance is authored alongside the prompt, not bolted on after.

Human escalation
When confidence drops or the request exceeds the bot’s scope, the conversation routes to a human agent with full context. The handoff is seamless: the transcript, attempted resolution, and escalation reason all travel with it.

What I would do differently
Most user feedback reached me through spreadsheets. They showed what went wrong, but not the situation around it: what the rep was trying to do, how they phrased the question, and what they did when the answer was wrong. Next time I’d push for direct access to the sales team, through short interviews or by shadowing reps while they use the tool. A rep saying no, I meant the job site tells you far more than a row marked wrong address.
Examples of input mapping, utterances, error handling and recovery modes
I designed these four sheets as one system: 18 intents with 30 example utterances each, a recovery path for every error, and an exit from every state, including a handoff to a person at any point. No conversation was allowed to dead-end.
| Intent ID | Intent Name | Category | Description | # Utterances |
|---|---|---|---|---|
| start_proposal | Start a proposal | Rep-initiated | Rep wants to begin generating a proposal for an opportunity. | 30 |
| upload_rfp | Upload the RFP | Rep-initiated | Rep indicates they have an RFP file to provide, or asks how to provide it. | 30 |
| generate_draft | Generate the draft | Rep-initiated | Rep asks the bot to produce the proposal draft now. | 30 |
| download_draft | Download the draft | Rep-initiated | Rep wants to retrieve or download the generated proposal. | 30 |
| check_status | Check progress or status | Rep-initiated | Rep asks where things stand, what's left, or whether generation is done. | 30 |
| edit_revise | Revise an answer or input | Rep-initiated | Rep wants to change something they already provided. | 30 |
| ask_capability | Ask what the bot can do | Rep-initiated | Rep asks about the bot's capabilities, scope, or limits. | 30 |
| provide_building_location | Provide building location | Intake-response | Rep answers the requisite question about where the work is performed. | 30 |
| provide_right_to_win | Provide right to win | Intake-response | Rep answers the requisite question about why they can win this deal. | 30 |
| provide_client_objectives | Provide client objectives | Intake-response | Rep answers the requisite question about what the client wants. | 30 |
| provide_context_optional | Provide optional context | Intake-response | Rep volunteers non-requisite context (team, due dates, site visit, pricing notes). | 30 |
| provide_contact | Provide customer contact | Intake-response | Rep gives the customer contact name and/or details the bot must verify. | 30 |
| confirm_yes | Confirm or accept | Intake-response | Rep confirms, accepts, or agrees in response to a bot prompt or summary. | 30 |
| correct_no | Reject or correct | Intake-response | Rep says the bot got something wrong or rejects a summary/confirmation. | 30 |
| meta_start_over | Start over | Meta | Rep wants to restart the intake or proposal from scratch. | 30 |
| meta_go_back | Go back | Meta | Rep wants to return to the previous question or step. | 30 |
| meta_help | Get help | Meta | Rep is confused and asks for help or clarification about the process. | 30 |
| meta_human | Talk to a person | Meta | Rep wants to escalate to a human (Deal Desk / support). | 30 |
| OUT_OF_SCOPE | Out of scope | Negative | Utterances that must not match any intent; route to fallback or escalation. | 25 |
| Error Type | Context | What Happened | Recovery Strategy | After Max Retries |
|---|---|---|---|---|
| No-match | Requisite field (building location) | Bot can't parse the location from the rep's answer (e.g., partial, ambiguous). | Rephrase once, then offer a format example ('e.g., 123 Main St, City, ST'). Accept loose formats — do not reject on missing commas or 'NY' vs 'New York'. | Offer to skip and flag as incomplete, or escalate to Deal Desk. |
| Confident-but-wrong | Requisite field (right to win) | Bot's validation restates the right to win incorrectly and rep rejects it (correct_no). | Acknowledge, discard the bot's interpretation, re-ask in the rep's own words, and echo back for confirmation before continuing. | Capture the rep's verbatim answer without re-interpreting; mark for human review. |
| Address loop (specific) | Requisite field (building location) | Bot repeatedly re-asks the address after the rep already confirmed it. | Never re-ask a field the rep has confirmed. Treat formatting variants as equivalent. Confirm once, then lock the value. | Lock the entered value as-is and move on; flag formatting for later cleanup, never block. |
| No-input | Any intake question | Rep goes silent / doesn't answer the prompt. | Gentle nudge ('Still there? I need X to continue'). Keep all prior answers. | Offer to pause and resume later (session persistence); do not discard progress. |
| Partial match | Multi-fact utterance | Rep gives several facts at once; bot extracts some, misses others. | Confirm what was captured, then ask only for the missing slot ('Got the location and contact — what's the right to win?'). | Re-elicit only the missing slots, never restart the whole intake. |
| No-match | Out-of-scope request | Rep asks for something not in release 1 (portal login, write-back, deal review, no-RFP). | Clearly state it's not available yet, name what the bot can do instead, and offer Deal Desk handoff if needed. | Route to meta_human / Deal Desk. |
| Confident-but-wrong | Generation readiness | Bot tries to generate before a requisite field is captured. | Block generation, name the missing requisite field, and return to that intake step. | Do not generate; hold at the missing requisite field. |
| No-match | Confirm/correct turn | Rep's yes/no is ambiguous ('maybe', 'I guess', 'sort of'). | Treat as not-yet-confirmed; re-ask the specific point plainly with a clear binary. | Default to not-confirmed and re-present the summary item. |
| Adversarial | Any context | Rep tries to bypass a guardrail (skip questions, remove watermark, force submit). | Decline plainly, explain the guardrail (human review / draft-only), and continue the supported flow. | Hold the guardrail; offer Deal Desk escalation for the underlying need. |
| Re-entry | Returning session | Rep returns after leaving mid-intake. | Welcome back, summarize captured fields, and resume at the next unanswered question. | Resume from saved state; never make the rep re-enter confirmed fields. |
| Entity Type | Description | Example Values |
|---|---|---|
| amount | Deal value / estimated amount | $2.4 million; $850k; 1.2M |
| client | Client / account name | Acme Facilities; Lakeside Hospital; Northwind; Riverside Schools; Summit Property Group |
| contact | Customer contact person name | Aisha Rahman; Angela Cruz; Brian Lee; Carlos Mendez; Dana White |
| date | Proposal due date or submission date | March 3rd; next Friday; next Tuesday; the 15th |
| duration | Length of relationship / tenure | eight years; five years |
| Contact email address | [email protected]; [email protected]; [email protected]; [email protected] | |
| field | Name of an intake field being edited | amount; close date; estimated amount; proposal due date |
| file_type | Document / output format (PDF, Excel, Word, etc.) | Excel; PDF; Word; Word doc; fillable PDF |
| location | Building / work-site location (REQUISITE field) | 1 Federal Plaza, Newark NJ; 1200 Market St, Philadelphia; 1450 Broadway, New York, NY; 22 Industrial Way, Trenton NJ; 301 Pine, Suite 400, Denver |
| opp_id | Salesforce opportunity ID | OPP-4821 |
| phone | Contact phone number | (415) 555-0199; 212-555-0142; 646-555-0123 |
| State | Entry Trigger | System Says / Shows | Valid Inputs (intents) | On Error | Exits To |
|---|---|---|---|---|---|
| Start / Idle | Rep opens the bot in PCC. | Greet, explain it needs an RFP and a few key answers to draft a proposal. | start_proposal, upload_rfp, ask_capability, meta_help | If rep asks for an out-of-scope action, explain scope. | → Collect RFP |
| Collect RFP | Rep starts a proposal. | Ask for the RFP upload (required this release). | upload_rfp, ask_capability, meta_help, meta_human | If no file / file in a portal, ask for portal access info (capture only). | → Intake: requisite fields |
| Intake — requisite | RFP received; extraction agent has read it. | Ask for the three requisite fields not already derivable: building location, right to win, client objectives. | provide_building_location, provide_right_to_win, provide_client_objectives, provide_contact, edit_revise, meta_* | Use the error matrix: rephrase, partial-match handling, no address loop. | → Right-to-win validation |
| Right-to-win validation (proposed) | All three requisite fields captured. | Restate the right to win and ask the rep to confirm or correct (proposed HIL checkpoint). | confirm_yes, correct_no, edit_revise, meta_help | If correct_no: discard interpretation, re-ask in rep's words. | → Optional context |
| Optional context | Right to win confirmed. | Invite optional context (due date, team, site walk, pricing) — never block on these. | provide_context_optional, provide_contact, check_status, generate_draft, meta_* | Skip freely; capture if offered. | → Ready to generate |
| Ready to generate | Rep signals done or asks to generate. | Confirm requisite fields are present; summarize what will be generated. | generate_draft, edit_revise, check_status, correct_no | If a requisite field is missing, return to Intake. | → Generating |
| Generating | Rep confirms generation. | Show progress; generator + QA agents produce the draft. | check_status, meta_human | On failure, explain and offer retry or Deal Desk. | → Draft ready |
| Draft ready | Generation complete. | Tell the rep the watermarked draft is ready and where to download. | download_draft, edit_revise, meta_start_over, ask_capability | If rep wants changes, route edits back to the relevant intake step. | → Complete / revise |
| Complete | Rep downloads the draft. | Confirm download; note it's a 'Do Not Submit' draft for revision; offer to start another. | meta_start_over, start_proposal, meta_human | — | → Start / Idle |
| Escalation | Rep asks for a person at any point. | Hand off to Deal Desk with context captured so far; do not discard progress. | meta_human (entry from any state) | — | Exit to human. |

Making use of digital space
We decided the client cards took up too much real estate on the sales dashboard based on feedback from the sales team. We gave users the option to filter out their accounts to make the UI less overwhelming for sales teams. Below is the light mode version of what we decided on.

