#003Everwood BookingImprovedIntermediate

The Hardest Part of AI Booking Is Not the AI - It Is the Flow

I thought the hard part would be making the AI sound natural. It was not. The real challenge was building a structured booking flow that the AI could follow without losing track, skipping steps, or inventing information.

By the Everwood founder · June 22, 2026 · 7 min read

Tools
Next.jsSupabaseOpenAITypeScript
Concepts
State ManagementBooking FlowTool CallingPrompt DesignAI Agents
Mission Brief
Goal

Make the AI booking assistant follow a structured flow: collect service, date, time, worker, name, phone, and optional details without skipping steps or re-asking questions.

Problem

The bot re-asked questions, skipped steps, invented services, and lost context as conversations grew longer.

Lesson

A booking assistant is not a chatbot. It is a structured state machine that happens to use natural language.

Read as

The Build

The AI booking widget was live, the architecture was in place, and the assistant could hold a conversation. The next step was making the actual booking flow work: collecting the right information in the right order so a customer could go from "I want to book" to a confirmed appointment without confusion.

The bot needed to handle service selection, date, time, worker preference, customer name, phone number, optional email, and notes. Each step had dependencies. You need a date before you can check worker availability. You need a service before you can show pricing. The order matters.

The Problem

The bot kept breaking the flow in ways that were hard to predict.

It would re-ask questions it already had answers to. A customer would say their preferred date and the bot would ask again two messages later. It did not recognize that information had already been provided earlier in the conversation.

It invented services. The bot would suggest nail services that were not part of the business. It took me a while to realize the AI was guessing based on what it thought a nail salon should offer instead of checking what the salon actually had. It needed a tool to query the real service list from the database.

It skipped the worker step. After collecting the date, the bot would jump ahead to collecting the customer name, completely skipping the worker preference. The customer never got asked who they wanted to book with.

It lost context. Date and time extraction usually worked fine, but when the conversation context grew too large, the AI would forget dates and times that were already mentioned. It would either re-ask or just move forward without them.

The conversation would drift away from the flow I prompted it to follow, and I could not always predict when or why.

Assumption vs Reality

What I Thought Would Work

I figured the chat history would be enough. If the conversation was there, the AI could read back through it and extract what it had already learned. I did not think I needed to track state separately. The AI should be able to figure out what was confirmed and what was still missing just by reading the conversation.

What Actually Happened

That did not work reliably. The AI would miss things, re-ask, or lose context as the conversation grew. The chat log is not state. It is a record of what was said, not a reliable source of what is confirmed. The AI needs a structured object that tracks exactly what has been collected: service, date, time, worker, name, phone, email, notes. The product has to tell the AI what is still missing instead of expecting the AI to figure it out on its own.

The Fix

I built a structured state object that tracks the information collected during a booking conversation. Instead of relying on the AI to parse the chat history, the product now maintains a clear record of which fields are confirmed and which are still missing.

The AI reads from this state object at each turn. It knows what to ask next because the product tells it, not because it is guessing from the conversation. If the customer already provided the date, that field is marked as collected and the AI does not ask again.

I also added a tool that lets the AI query the actual services from the database. No more guessing or inventing services. And I added the "one question at a time" rule early in the build. Asking multiple questions at once caused the AI to lose track of answers. One question keeps it focused and makes it less likely to skip something.

Lesson Unlocked

A booking assistant is not a chatbot. It is a structured state machine that happens to use natural language as its interface. The conversation is what the customer sees. The state is what the product actually runs on. If the product does not track what it knows, the AI will guess, skip, or repeat. Both chat and traditional forms have real strengths. A booking form is repeatable, follows the same order every time, never asks for information twice, and has every step stored and ready to send to the backend. Right now, forms are more reliable for pure data collection. But a chat-based flow can do things a form cannot. It can explain services the customer does not understand. It can answer questions about pricing or policies mid-flow. It can suggest additional services naturally, the way a real receptionist would. That is the actual advantage. The bigger lesson is about how AI gets integrated into software. It is not enough to know how to call the API. You have to understand how to build a product around it. The AI is one layer. The state, the tools, the rules, and the flow are the product. If another builder asked me for advice before starting an AI booking bot, I would tell them to learn how AI is actually integrated into software before writing the first prompt.

Business Translation

When a booking bot asks the same question twice, suggests a service that does not exist, or skips asking who you want to see, it does not feel like AI. It feels broken. Customers leave. The fix is not a smarter AI. It is a better product underneath the AI. The bot needs to know exactly what information it has, what it still needs, and what services and workers are actually available. When those pieces are in place, the conversation feels smooth and the customer gets to a confirmed appointment without frustration.

Builder Notes

The shift from "let the AI figure it out from the chat log" to "track state in a structured object and tell the AI what is missing" changed everything about how the booking flow works.

Technical Note 1

The state object tracks: service, date, time, worker, name, phone, email, and notes. Each field is either collected or missing.

Technical Note 2

The AI receives the list of missing fields at each turn and only asks about the next one.

Technical Note 3

Service selection uses a tool call that queries the real service list from the database. No more invented services.

Technical Note 4

Worker availability is only checked after the date is set, because availability depends on the day.

Technical Note 5

One question at a time. Asking multiple questions caused the AI to drop answers or skip fields.

Technical Note 6

Context size matters. When the conversation context grew too large, the AI started losing information. Keeping the state separate from the chat history helps because the AI does not need to re-read everything to know where it is.

Before / After

Before
  • No structured state tracking
  • AI parsed the chat history to figure out what was collected
  • Bot re-asked questions it already had answers to
  • Bot invented services not offered by the business
  • Bot skipped the worker preference step
  • Context size caused the AI to forget earlier information
After
  • Structured state object tracks every collected field
  • AI reads from the state object, not the chat history
  • No repeated questions for confirmed fields
  • Service selection queries the real database
  • Worker step is part of the required flow
  • State is maintained outside the conversation context

What I'd Do Differently

I would build the state object on day one, before writing a single prompt. The prompt should be designed around the state, not the other way around. I would also add the service query tool immediately instead of letting the AI guess. Every field the bot collects should come from real data, not from the model making assumptions about what a nail salon offers.

Next Experiment

The prompt itself. The booking flow has structure now, but the prompt that drives the AI still needs work. The next post covers how the system prompt grew, what went wrong, and how I started thinking about prompt design as a product decision.

AI AgentsBooking WidgetState ManagementPrompting

The information on this website is provided for general educational purposes only and may not apply to your specific setup or environment. It should not be considered professional advice. Always consult a qualified technician when appropriate.