How the agent takes a visitor from "hello" to a submitted quote or support ticket. Each question the agent asks is a stage, stored on the visitor's session, so the conversation can pick up where it left off.
For what visitors can say at any point (questions, small talk, changing their mind), see the Conversation Guide.
Last reviewed: 31 October 2026.
1. Starting a request
A visitor can start in three ways, at any time:
| How | Example | Result |
|---|---|---|
| Starter buttons, shown after a greeting | ๐ Get a website quote ยท ๐ Check a domain ยท ๐ง Hosting & email ยท ๐ ๏ธ Get support ยท ๐งญ Something else | Starts that flow straight away |
| Typing a request | "I need a website for my bakery", "is sambakes.co.uk free?", "my site is down", "I want an app" | Starts the matching flow, using any details already given (domain, website type) |
| Browsing the full list | ๐งญ Something else | Category (๐ฑ Apps, ๐ง Comms, ๐ Storage, ๐ Web), then the service in it |
Details already in the request are not asked for again. "A shop for my bakery" fills in the website type, and "is sambakes.co.uk free?" checks that domain straight away.
When a request matches past work, the agent suggests one similar example once per flow: a showcase website for the same kind of business, or an app in the same store category.
2. The flows
The stage names are what the session stores (SessionStageEnum).
๐ Website quote
| # | Stage | The agent asks | Accepts |
|---|---|---|---|
| 1 | SELECT_WEBSITE_TYPE | What kind of website do you need? | Buttons (Brochure / info site, Online shop, Bookings & appointments, Portfolio or blog, Something else) or a typed description ("a site for my band") |
| 2 | SELECT_BUDGET_RANGE | Roughly what budget do you have in mind? | Buttons (Under ยฃ1,000, ยฃ1,000 โ ยฃ2,500, ยฃ2,500 โ ยฃ5,000, ยฃ5,000+, Not sure yet) or a typed amount ("about 2k", "not sure") |
| 3 onwards | Contact details, then project details | See sections 3 and 4 |
๐ฑ Apps, ๐ง Comms, ๐ Storage and web scraping
SERVICE_CATEGORY_SELECTION: the category, unless the request already named it.SERVICE_ITEM_SELECTION: the service, such as Desktop or Mobile. "A mobile app" skips straight past it.SELECT_BUDGET_RANGE: the budget.- Contact details, then project details (sections 3 and 4).
๐ Domain check
| # | Stage | The agent asks |
|---|---|---|
| 1 | VERIFY_DOMAIN_NAME | Which domain to search for. A name without an ending ("sambakes") gets a choice of endings |
| 2 | DOMAIN_REGISTRATION_DECISION | When available: Register Domain Immediately or Add/Explore Other Services |
| 3 | Contact details | Section 3 |
| 4 | Register only: the summary (section 5). Explore: project details (section 4) |
๐ง Hosting & email (on a domain the visitor already owns)
CAPTURE_EXISTING_DOMAIN: which domain.PROMPT_UNIQUE_EMAIL_PREFIX: the email prefix, such as info@ ("skip" for none).PROMPT_HOSTING_SUBSCRIPTION: Monthly, Quarterly, Yearly or Bi-Yearly.- Contact details (section 3), then straight to the summary (section 5).
๐ ๏ธ Support request
CAPTURE_SUPPORT_ISSUE: what's wrong, which site or service, and what the visitor sees.CAPTURE_PROSPECT_EMAIL, thenCAPTURE_PROSPECT_NAME(skipped when the name is already known).- The ticket is saved with a reference such as TS-7K4Q2M and emailed to help@tecsmith.info, and staff get an in-app notification. A visitor who verified their email (section 3) has the ticket linked to their account.
Replies continue on the ticket at Dashboard โบ Support. Emailed replies to the ticket thread are added to it too.
3. Contact details and returning visitors
Every flow asks for the email address first (CAPTURE_PROSPECT_EMAIL).
- New email: the agent asks for the visitor's full name (
CAPTURE_PROSPECT_NAME). - Email already on an account: the agent emails a 6-digit code (
VERIFY_EMAIL_TOKEN), valid for 10 minutes.- Typing "resend" (or "I didn't get a code") sends a new one, as does an expired code.
- After several wrong tries the code is cancelled, and the visitor asks for a new one.
- Once verified, the name comes from the account and the flow carries on where it was. The agent only offers the returning-visitor menu (
RETURNING_USER_OPTIONS: New Quote, Something Else, View Quotes, Update Details) when nothing is in progress.
4. Project details
After contact details, quotes continue with:
| Stage | The agent asks | Notes |
|---|---|---|
CAPTURE_PROJECT_TITLE | What shall we call this project? | |
CAPTURE_FEATURES_REQUIRED | Any unique features you need? | |
PROMPT_WANTS_EMAIL_SERVICE | Would you like a branded email service? | Yes leads to PROMPT_UNIQUE_EMAIL_PREFIX |
PROMPT_WANTS_DOMAIN_NAME | Would you like to purchase a domain name? | Skipped when a domain was already chosen. Yes leads to VERIFY_DOMAIN_NAME |
PROMPT_WANTS_DATA_HOSTING | Do you need us to host your web application? | Yes leads to PROMPT_HOSTING_SUBSCRIPTION |
Yes/No questions accept typed answers ("yes please", "nah") as well as the buttons.
5. Summary, submission and editing
CONFIRMATIONshows everything collected and asks to submit: Yes, No or Edit Details.- Yes submits the request. The visitor gets an account (new visitors are sent a verification link), the lead is saved to the leads list and the Google Sheet, and the admin is notified on the chat platform. The session is then cleared.
- No or Edit Details opens
EDITING. The visitor picks a field, answers it again, and returns to the summary. Changing the email to one on an account asks for a code first, then returns to the summary.
6. Leaving and coming back
- "cancel", "start again" or "restart" ends the request at any stage.
- "bye" or "I'll be back" keeps the answers. Saying hi later carries on from the same question.
- Other side remarks and questions are covered in the Conversation Guide.
VIEW_PAST_QUOTESlists a verified visitor's earlier requests.- "/help" explains how to use the agent and how to reach a person.
Where this lives in the code
- Stage handlers:
app/lib/bot-core/handlers/stage/, one file per stage, routed bysession-stage.handler.ts. - Questions and button sets:
app/lib/bot-core/helpers/prompt-helpers.ts. Options such as website types, budgets and the service catalogue:app/lib/bot-core/config/definitions.ts. - Starting flows from requests:
starter-flow.helper.tsandutils/service-intent.ts. - Whole conversations are tested in
tests/lib/bot-core/conversations.test.ts. Add a scenario there when a flow changes.
@COPYRIGHT (c) 2026. Thomas EC. Smith (https://www.TECSmith.info). All rights reserved.