Use casesRecipes

Salon & Spa Booking Agent

Let clients browse services, match with a stylist, and book appointments across WhatsApp and web chat — with Google Calendar handling availability.

DifficultyBeginner
TrackBuilder Track
ChannelsWhatsAppWeb Chat
IntegrationsGoogle Calendar (availability + booking)Service/staff data (knowledge base)

What you'll build

An agent that takes clients from "I want a haircut" to a confirmed appointment in one conversation: service descriptions and pricing from a knowledge base, stylist matching based on preference or expertise, real-time availability checked via Google Calendar, and a booking confirmation sent back to the client.

Customer journey

A client messages on WhatsApp or Web Chat to book a cut, colour, or spa treatment. The agent reads the services menu KB, checks stylist availability in Google Calendar, and confirms the appointment.

Loading diagram…

See Deploying and testing channels for connect and test steps per channel.

Prerequisites

  • BimpeAI account with an API key (sk_…)
  • Read Anatomy of a workflow agent first — this recipe skips steps covered there
  • Google Calendar connected in the Console dashboard (see Step 4)
  • WhatsApp Business number and/or web chat widget connected in the Console dashboard (see Step 4)

Steps

1. Find or create the workflow

import { BimpeAI } from "@bimpeai/sdk";

const bimpe = new BimpeAI({ apiKey: process.env.BIMPEAI_API_KEY! });

const page = await bimpe.workflows.list({ scope: "public", search: "salon" });
const workflow = page.data[0];
console.log(workflow.id, workflow.name);
import os
from bimpeai import BimpeAI

client = BimpeAI(api_key=os.environ["BIMPEAI_API_KEY"])

page = client.workflows.list(scope="public", search="salon")
workflow = page.data[0]
print(workflow.id, workflow.name)

Or build a new workflow from scratch with workflows.create instead of finding one. name and system_prompt are required; it returns the new Workflow whose id you bind the agent to. See Anatomy of a workflow agent for the full set of optional fields like rules and flows.

const workflow = await bimpe.workflows.create({
  name: "Salon booking agent",
  system_prompt: "You help clients browse services, match with a stylist, and book appointments.",
});
console.log(workflow.id);
workflow = client.workflows.create(
    name="Salon booking agent",
    system_prompt="You help clients browse services, match with a stylist, and book appointments.",
)
print(workflow.id)

2. Create the agent

const agent = await bimpe.agents.create(
  {
    name: "Salon booking agent",
    description: "Books salon and spa appointments, matching clients to stylists and checking availability.",
    workflow_id: workflow.id,
  },
  { idempotencyKey: "create-salon-booking-agent-v1" },
);

console.log(agent.id);
agent = client.agents.create(
    name="Salon booking agent",
    description="Books salon and spa appointments, matching clients to stylists and checking availability.",
    workflow_id=workflow.id,
    idempotency_key="create-salon-booking-agent-v1",
)

print(agent.id)

3. Add knowledge bases (optional)

Knowledge bases are optional; an agent whose workflow and integrations already cover everything it needs to say can skip this step. This recipe uses one to ground the agent in the details it must quote accurately.

Two knowledge bases cover the service menu and the staff profiles. The agent draws on both when matching clients to stylists.

// Service menu with durations and prices
await bimpe.agents.knowledgeBases.create(agent.id, {
  type: "text",
  name: "Services",
  content:
    "HAIR:\n" +
    "  Women's cut and blow-dry — 60 min — £45\n" +
    "  Men's cut — 30 min — £25\n" +
    "  Full highlights — 120 min — £95\n" +
    "  Balayage — 150 min — £120\n" +
    "  Keratin treatment — 180 min — £140\n\n" +
    "NAILS:\n" +
    "  Manicure — 45 min — £28\n" +
    "  Gel manicure — 60 min — £38\n" +
    "  Pedicure — 60 min — £35\n\n" +
    "SPA:\n" +
    "  Swedish massage (60 min) — £65\n" +
    "  Deep tissue massage (60 min) — £75\n" +
    "  Classic facial — 60 min — £55\n" +
    "  Luxury facial — 90 min — £80\n\n" +
    "Cancellation policy: 24 hours notice required. Late cancellations charged at 50% of service price.",
});

// Staff profiles and specialisms
await bimpe.agents.knowledgeBases.create(agent.id, {
  type: "text",
  name: "Staff",
  content:
    "Maya — Senior Stylist — specialises in colour work (balayage, highlights, creative colour)\n" +
    "James — Stylist — specialises in men's cuts, beard trims, and fades\n" +
    "Priya — Senior Stylist — specialises in textured hair, natural styles, and keratin treatments\n" +
    "Sofia — Nail Technician — all nail services including nail art\n" +
    "Tom — Massage Therapist — Swedish, deep tissue, sports massage\n" +
    "Aisha — Beauty Therapist — facials, waxing, brow and lash treatments\n\n" +
    "All stylists are qualified and insured. Junior stylists available at a 20% discount — ask to specify.",
});
# Service menu with durations and prices
client.agents.knowledge_bases.create(agent.id, {
    "type": "text",
    "name": "Services",
    "content": (
        "HAIR:\n"
        "  Women's cut and blow-dry — 60 min — £45\n"
        "  Men's cut — 30 min — £25\n"
        "  Full highlights — 120 min — £95\n"
        "  Balayage — 150 min — £120\n"
        "  Keratin treatment — 180 min — £140\n\n"
        "NAILS:\n"
        "  Manicure — 45 min — £28\n"
        "  Gel manicure — 60 min — £38\n"
        "  Pedicure — 60 min — £35\n\n"
        "SPA:\n"
        "  Swedish massage (60 min) — £65\n"
        "  Deep tissue massage (60 min) — £75\n"
        "  Classic facial — 60 min — £55\n"
        "  Luxury facial — 90 min — £80\n\n"
        "Cancellation policy: 24 hours notice required. Late cancellations charged at 50% of service price."
    ),
})

# Staff profiles and specialisms
client.agents.knowledge_bases.create(agent.id, {
    "type": "text",
    "name": "Staff",
    "content": (
        "Maya — Senior Stylist — specialises in colour work (balayage, highlights, creative colour)\n"
        "James — Stylist — specialises in men's cuts, beard trims, and fades\n"
        "Priya — Senior Stylist — specialises in textured hair, natural styles, and keratin treatments\n"
        "Sofia — Nail Technician — all nail services including nail art\n"
        "Tom — Massage Therapist — Swedish, deep tissue, sports massage\n"
        "Aisha — Beauty Therapist — facials, waxing, brow and lash treatments\n\n"
        "All stylists are qualified and insured. Junior stylists available at a 20% discount — ask to specify."
    ),
})

4. Connect channels and integrations (dashboard)

Channels and Google Calendar are connected in the dashboard

The API cannot create channel connections, but integrations can now be configured through it; see Configuring integrations. Connect your messaging channels on the Deploy screen and Google Calendar on the Integrations screen of the Console dashboard. The SDK lists what is active but cannot modify channel connections.

  1. In the Console dashboard, pick your agent from the switcher at the top, then open Deploy.
  2. Under Messaging & Chat, click Connect on the WhatsApp card and follow the prompts to link your WhatsApp Business number.
  3. Under Messaging & Chat, click Connect on the Web Chat Widget card to add the widget to your salon website.
  4. Open Integrations, find Google Calendar, and click Connect so the agent can check stylist availability and book appointments. Share each stylist's calendar with the connected Google account so the agent can check individual availability.

Connect WhatsApp

Customers message your WhatsApp Business number for support and transactions.

  1. Open the Deploy screen in the Console dashboard and select your agent.
  2. Under Messaging & Chat, click Connect on the WhatsApp card.
  3. Follow the prompts to link your WhatsApp Business number.
  4. Once connected, customers can message your business number and the agent replies within WhatsApp's 24-hour session window.

Full reference: Deploying and testing channels.

Connect Web Chat

Visitors use the chat widget embedded on your website or app.

  1. Open Deploy and select your agent.
  2. Under Messaging & Chat, click Connect on the Web Chat Widget card.
  3. Copy the embed snippet and paste it into your site's HTML before the closing body tag.
  4. Publish your site — the chat bubble appears in the corner and routes messages to this agent.

Full reference: Deploying and testing channels.

Also on Instagram and Messenger: the same Deploy → Connect flow applies. Testers use the Deploy panel links or getTestCode deep links for each network. Instagram · Messenger

5. Test your agent

Before going live, exercise the agent on a test channel. Fetch the test code (created on first request), then test on WhatsApp — share the deep link or start message with a human tester, or inject a message from your server.

Test WhatsApp

Human tester: fetch the test code with agents.getTestCode (or use the Deploy panel). Share the deep link or start <code> message with a tester.

SDK injection: call conversations.send with is_test_channel: true and the matching channel_type.

Full reference: Deploying and testing channels.

Test Web Chat

Playground: open Playground → Chat in the dashboard for a quick sanity check.

SDK injection: call conversations.send with channel_type: "webchat" and a stable channel_user_id, or set is_test_channel: true before go-live.

Full reference: Deploying and testing channels.

const { channels } = await bimpe.agents.getTestCode(agent.id);
// A tester opens channels.whatsapp.url, or sends channels.whatsapp.start_message
// to channels.whatsapp.phone_number, to open a 24-hour test window.
console.log(channels.whatsapp.start_message, channels.whatsapp.url);

// Or inject a test message yourself:
await bimpe.conversations.send(agent.id, {
  message: "Can I get a balayage with Maya this Saturday afternoon?",
  channel_type: "whatsapp",
  channel_user_id: "<tester-whatsapp-number>",
  is_test_channel: true,
});
test_code = client.agents.get_test_code(agent.id)
# A tester opens .url, or sends .start_message to .phone_number, to open a 24-hour window.
print(test_code.channels.whatsapp.start_message, test_code.channels.whatsapp.url)

# Or inject a test message yourself:
client.conversations.send(
    agent.id,
    message="Can I get a balayage with Maya this Saturday afternoon?",
    channel_type="whatsapp",
    channel_user_id="<tester-whatsapp-number>",
    is_test_channel=True,
)

See Test your agent for the other test channels and the pause-AI rule.

6. Verify and go live

const integrations = await bimpe.agents.integrations.list(agent.id);
const channels = await bimpe.agents.channels.list(agent.id);
console.log("Integrations:", integrations.map((i) => i.name));
console.log("Channels:", channels.map((c) => c.type));
integrations = client.agents.integrations.list(agent.id)
channels = client.agents.channels.list(agent.id)
print("Integrations:", [i.name for i in integrations])
print("Channels:", [c.type for c in channels])

Full example

import { BimpeAI } from "@bimpeai/sdk";

const bimpe = new BimpeAI({ apiKey: process.env.BIMPEAI_API_KEY! });

// 1. Find workflow
const page = await bimpe.workflows.list({ scope: "public", search: "salon" });
const workflow = page.data[0];

// 2. Create agent
const agent = await bimpe.agents.create(
  {
    name: "Salon booking agent",
    description: "Books salon and spa appointments, matching clients to stylists and checking availability.",
    workflow_id: workflow.id,
  },
  { idempotencyKey: "create-salon-booking-agent-v1" },
);

// 3. Add knowledge bases
await bimpe.agents.knowledgeBases.create(agent.id, {
  type: "text",
  name: "Services",
  content:
    "Women's cut and blow-dry — 60 min — £45\n" +
    "Men's cut — 30 min — £25\n" +
    "Balayage — 150 min — £120\n" +
    "Swedish massage — 60 min — £65",
});

await bimpe.agents.knowledgeBases.create(agent.id, {
  type: "text",
  name: "Staff",
  content:
    "Maya — Senior Stylist — colour work specialist\n" +
    "James — Stylist — men's cuts and fades\n" +
    "Priya — Senior Stylist — textured hair and keratin treatments",
});

// 4. Verify integrations and channels (configured via dashboard)
const integrations = await bimpe.agents.integrations.list(agent.id);
const channels = await bimpe.agents.channels.list(agent.id);
console.log("Agent ID:", agent.id);
console.log("Integrations:", integrations.map((i) => i.name));
console.log("Channels:", channels.map((c) => c.type));

// 5. Stream messages in a booking conversation
const controller = new AbortController();

for await (const event of bimpe.conversations.messages.stream(
  agent.id,
  "<conversation_id>",
  { signal: controller.signal },
)) {
  console.log(event.role, event.message);
}
import os
from bimpeai import BimpeAI

client = BimpeAI(api_key=os.environ["BIMPEAI_API_KEY"])

# 1. Find workflow
page = client.workflows.list(scope="public", search="salon")
workflow = page.data[0]

# 2. Create agent
agent = client.agents.create(
    name="Salon booking agent",
    description="Books salon and spa appointments, matching clients to stylists and checking availability.",
    workflow_id=workflow.id,
    idempotency_key="create-salon-booking-agent-v1",
)

# 3. Add knowledge bases
client.agents.knowledge_bases.create(agent.id, {
    "type": "text",
    "name": "Services",
    "content": (
        "Women's cut and blow-dry — 60 min — £45\n"
        "Men's cut — 30 min — £25\n"
        "Balayage — 150 min — £120\n"
        "Swedish massage — 60 min — £65"
    ),
})

client.agents.knowledge_bases.create(agent.id, {
    "type": "text",
    "name": "Staff",
    "content": (
        "Maya — Senior Stylist — colour work specialist\n"
        "James — Stylist — men's cuts and fades\n"
        "Priya — Senior Stylist — textured hair and keratin treatments"
    ),
})

# 4. Verify integrations and channels (configured via dashboard)
integrations = client.agents.integrations.list(agent.id)
channels = client.agents.channels.list(agent.id)
print("Agent ID:", agent.id)
print("Integrations:", [i.name for i in integrations])
print("Channels:", [c.type for c in channels])

# 5. Stream messages in a booking conversation
for event in client.conversations.messages.stream(agent.id, "<conversation_id>"):
    print(event.role, event.message)

Deploy and go live

Go-live checklist

  • Store your API key in BIMPEAI_API_KEY (server-side only).
  • Confirm Google Calendar appears in integrations.list or is connected in the dashboard.
  • Verify WhatsApp is connected on the Deploy screen (agents.channels.list shows it enabled).
  • Verify Web Chat is connected on the Deploy screen (agents.channels.list shows it enabled).
  • Set Escalation Email under Settings → Agent if humans must take over.
  • Switch the agent to live with updateLiveStatus / update_live_status.
  • Monitor the Conversations screen (or stream via SDK) after launch.

After go-live

Update services KB when prices change. Send WhatsApp reminders 24 hours before visits via conversations.send.

Variations

  • Add a promotions knowledge base entry and update it weekly to let the agent surface current deals (e.g. midweek colour discount).
  • Add a loyalty card section to the services knowledge base so the agent can explain how points are earned and redeemed.
  • Send an appointment reminder to the client's WhatsApp 24 hours before their visit using conversations.send (create-or-send by channel) from a scheduled script.

On this page