Section 1 · Website AI Salesperson
1.1Smart opening by page/source
Built in the POC- No.
- 1.1
- DMA's reference
- Decision Book p.10
- Phase
- Phase 1
- Autonomy
- L4 · Autonomous
- DMA's decision
- Yes
What DMA asked for · Decision Book p.10
The chat's first message should match the page the visitor is on and how they got there. Someone who clicked a paid ad gets an ad-aware opener, not a generic hello.
Why it matters to DMA: A first line that fits what the visitor came for gets more replies, and the visitor feels understood straight away.
In our words, from DMA's Product Decision Book v3, page 10.
How we do it
- When the chat opens, the widget sends the address of the page the visitor is on, plus any campaign tags on the link (the utm_campaign and utm_term that ads and emails carry).
- A small set of rules reads the page path and those tags and picks one of DMA's approved openers: search and SEO, paid ads, pricing, or a general opener for everything else.
- No AI call is needed, so the opener appears in under a second. It follows a first line that says plainly the visitor is talking to DMA's AI assistant and that a person from DMA can join any time; the header keeps that label and a "Talk to a person" button on screen for the whole chat.
- The opener the chat used and the page the visitor started on are saved with the conversation. If the visitor becomes a lead, the page and campaign go onto the Nutshell lead as its source.
The flow
It plays on its own while it's on screen; hover or use the controls to pause or step through.
A visitor arrives
Someone clicks a Google ad for local SEO and lands on the matching page, with the ad's campaign tag on the link.
- Person
- Screen
- Rule in code
- Stored data
- Nutshell
Where the data goes
The same six stages on every page. Nothing reaches Nutshell except through the write gate.
- 1Website chat
Source
The page address and campaign tags, sent when the chat opens.
- 2Sync
Copies Nutshell changes into the bridge database
Mirrors the lead back from Nutshell after it is written.
- 3Bridge database
A copy of the CRM data, plus what the AI works out
Stores the conversation, its starting page and the opener used.
- 4AI
Claude models, only through DMA's own gateway
Not used for the first line: rules choose it, so it is instant.
- 5Write gate
The only way back into Nutshell: checked, approved when needed, sent once
Carries the source page and campaign onto the new lead.
- 6Nutshell
The system of record
The lead shows where the visitor started.
The tables behind it
Drawn from the POC's database catalogue: structure only, no data.
PK primary keyFK reference the database enforces (solid line)ID reference kept by id (dashed line)
| Table | What it holds | Columns |
|---|---|---|
| conv.conversations | One row per chat: the channel, the page it started on, its stage and the AI version that ran it. | 22 |
| conv.messages | Every line of the chat, encrypted. The opener's line records which approved opener was used. | 21 |
| agent.runs | One row per AI session, with its token use and cost. | 17 |
How the tables connect (7)
| Column | Points to | Kept by |
|---|---|---|
| conv.conversations.agent_version_id | agent.agent_versions | The application (by id) |
| conv.messages.conversation_id | conv.conversations | The database (foreign key) |
| conv.messages.participant_id | conv.participants | The application (by id) |
| conv.messages.decision_id | ctrl.decision_log | The application (by id) |
| conv.messages.agent_version_id | agent.agent_versions | The application (by id) |
| agent.runs.agent_version_id | agent.agent_versions | The application (by id) |
| agent.runs.conversation_id | conv.conversations | The application (by id) |
Worked example
Synthetic demo data: every name, business and number is made up.
One visitor, opener by opener: the screen and the system side by side
What you see
1.The visitor opens the chat
They arrived from a local-SEO campaign link and click the chat button. The header says straight away that this is DMA's AI assistant.

What happens in the system
- Conversation service
POST /sessionThe conversation service starts a chat with the page address and the campaign tag (local-seo). Nothing else about the visitor is needed.
- Bridge database
conv.conversations · conv.participantsA conversation row is created, with two participants: the visitor and the AI.
- AI agent
agent.runsA website-salesperson session is prepared in the background, so the first real answer is quick. No AI call yet.
Right-hand values come from a real run of the POC on September 25, 2026 (trace tr_muh5sqrd142bp4fx0nhpf). Rows marked “sample” are illustrative.
Four visitors open the chat on different pages (synthetic examples). Each first sees the same disclosure line ("You're chatting with DMA's AI assistant. A person from DMA can join any time"), then the opener for their topic.
Which opener each visitor sees after the disclosure
| Page the chat opened on | Campaign tag | Topic picked | First message |
|---|---|---|---|
| /local-seo | none | Search and SEO | Hi, I'm DMA's AI assistant. Want me to take a quick look at your site's SEO? Paste your website address and I'll show you three things I'd fix. |
| / (home page) | spring-ppc | Paid ads | Hi, I'm DMA's AI assistant. Are your ads bringing the right leads? Tell me a bit about your business, or paste your website and I'll take a quick look. |
| /pricing | none | Pricing | Hi, I'm DMA's AI assistant. Pricing depends on what you need, and a strategist covers it on a short call. Want me to look at your website first so the call is useful? |
| /about | none | General | Hi, I'm DMA's AI assistant. What does your business do, and what would you like more of: calls, leads or sales? Or paste your website and I'll show you three things I'd fix. |
What is saved for the first visitor
- Conversation
- Website chat on /local-seo
- Opener used
- Search and SEO opener, version 1
- Shown after
- Under 1 second (no AI call)
- Lead source in Nutshell
- Page /local-seoWritten only if the visitor books a call or leaves an email.
In the running POC

1 / 3The chat opened from a local-SEO campaign link: the SEO opener, with the AI disclosure in the header.
- 1The header says this is DMA's AI assistant, with a "Talk to a person" button that stays on screen.
- 2The first message repeats it: an AI assistant, and a person from DMA can join any time.
- 3The opener matches the campaign: it offers a quick SEO look at the visitor's own site.
Website chat · widget test page, local-SEO campaign link. Captured from the running POC on September 25, 2026; synthetic data.
See it live
Opens the exact screen in the running POC, in a new tab.
| Open | Where | What to try |
|---|---|---|
| Chat opened from a local-SEO link | Website chat | Open the chat button at the bottom right: the SEO opener appears. |
| Chat opened from a paid-ads link | Website chat | Same page, ads campaign tag: the ads opener appears. |
| Live chats | DMA AI dashboard | Every open chat, the page it started on, and a Join button. |
Status
Built in the POC. This capability runs in the POC today, on synthetic data, end to end.